Tip 17. Units of nonphysical values

  

Fig. 17. Units of nonphysical values

See new picture too

In tip 15 we have considered the problem of linear programming about search of optimum plan of issue of chairs. But we have not used the units even they have been mentioned in the problem (see the table tip 15). In the given problem both calculating units (chairs, people) and financial units are used along with physical ones (meter, square meter and hour).

The system variables  ïàêåò âñòðîåíû ñèñòåìíûå ïåðåìåííûå (see the sketch «Mathcad and physical values» – http://twt.mpei.ac.ru/ochkov/Units/unit.htm) are built-in in Mathcad, which keep units of physical values. But if you wish you are able not only to introduce new units (see previous tip) but also new values. The problem about plan of issue of chairs using units of all values is solved in the fig. 17.

Unit of American currency ($US) is introduced in the calculation on the principle, as «Time is money»: physical value «time» is not used[1] in the given calculation and it is possible to be «burdened» by the other function. Certainly it is simpler to write: $US := 1 and thing := 1 (we have things are «attached» to moles, which are not used in the calculation). But it is fraught with the following mistake:

$US + thing = 2

Here the error message must appear: «Incompatible dimensions» instead of numerical answer (two). In the calculation, which you could see in the fig. 17, physical and other values are introduced not only for more ôèçè÷åñêèå è ïðî÷èå âåëè÷èíû ââåäåíû íå òîëüêî äëÿ áîëüøåé «readability» of the problem but also for additional control of compliance of dimensions in the inputted formulas.



[1] Or rather it is used. But we release hours and seconds (the variables hr and sec) from their functions (see the discussion about meter in tip 16) having introduced new units of new physical value – man-hr in the calculation.  The multiplication hides behid the hyphen in the variable: this mathematical sign can be changed not only on gap (see tip 9) but also on hyphen (minus) both in Mathcad and in «manual» calculations.