Calculations on semantics of selected objects

Previous Top Next

The program is intended for values of semantic characteristics of the selected objects by formulas.

The formula represents a symbolical line up to 256 symbols, containing numbers, mathematical operations, references to values of semantics of object, its area and perimeter.  

Admissible operations:  

            +                  - add;

            -                   - subtract;

            *                   - multiply;

            /                   - divide;

            max (...,...,), - separator of operands - a comma «,» (comma);

            min (...,...,);

            arm (...,...,)   - arithmetic mean;

            sin                - sin from an angle in degrees;

            cos               - cos from an angle in degrees;

            tg                  - tg from an angle in degrees;

            ctg                - ctg from an angle in degrees;

            abs(...)          - absolute value;

            sqrt2(...)        - a square root;

            sqrt3(...)        - a cube root;

            pow2(...)       - squaring;

            pow3(...)       - raising to a cube;

            P                  - perimeter of object;

            S                  - area of object;

            PI                 - number pi;

            #                     - specifies, that further there is a code of semantics in which the value lays, further in brackets the value by default contains. It is admissible to use figures from 0 up to 9, with a separator «.» (point), round braces, square  braces and braces (« () », « [] », « {} »).

 

Example:  

#1 (0) - to take value of semantics 1, at absence of semantics to take value 0.

For operations: +,-, *,/, max, min, abs - quantity of operands no more than 10.

Examples of formulas:

1. Calculation of the hatch height. The height of the hatch consists of a mark of height of the deepest laying and radius of a pipe. Semantics 213 (Height of a laying) is a repeated one. We shall take the minimal value (at absence of such semantics, we shall take the value in brackets). By semantics 60 (Diameter of a pipe) - we shall calculate radius. We shall finally receive.

                         min (#213 (0)) +#60 (2)/2

2. Calculation of approximated volume of a building. Multiply area S onto the value of semantics 1 (Absolute height) (at absence 3).

                           S*#1 (3)

3. Calculation of the area of a roadbed. We shall multiply semantics 46 (Width of a covering) onto Р - perimeter.

                           P * #46 (4)

4. Approximate calculation of a wood's stock. We shall divide the area of wood P onto the area occupied by one tree - semantics 61 (Distance between trees) in a square and we shall multiply onto volume of wood of the tree, received by semantics 60 (Thickness) and 1 (Relative height).

                         P / (#61 (1) * #61 (1)) * PI * #60 (0.5) * #60 (0.5)/4 * #1 (4)  

The list of formulas for calculation is requested from ini-file and the classifier. The user can create the own formulas.

The list of admissible operations is intended for addition of operations into the formula.

Operation is inserted into the formula in a position of the cursor by double pressing onto the chosen line. The code of semantics used in calculations, is inserted into the formula in a position of the cursor by double pressing onto the chosen line in the list of numerical semantics of object (the top list).

In brackets the user should specify value used in calculations, at absence in semantics of object of the specified characteristic.

The user can write down the created formula into an ini-file. If the formula is incorrect by syntax neither record, nor calculations are not spent. Thus the message "Erroneous task of the formula " with brief decoding a possible error is shown.  

The calculated value, by pressing the Execute button, is entered as numerical or symbolical value of semantics marked in the bottom list into all marked objects.

If "Transactions log" is included, changes in semantics of objects are written down into transactions log.

The list of objects for which calculations were not executed by any reasons are written down into LOG.

On the termination of calculations the message about quantity of successfully or not successfully updated objects is shown.