After adding and setting up parameters of calculation algorithm it is available to set up calculation algorithm execution conditions by means of branching. Branching is used to create conditions for executing single elements of calculation algorithm.
To set up calculation algorithm execution conditions:
Click the Branching button on the Home ribbon tab. As a result, a branching in the calculation tree and the Else condition are created:
Select the created branching and select the Branch item in the drop-down menu of the Branching button. As a result, a branch is created in the branching:
NOTE. The number of branches in the branching is unlimited. If there are several branches, only the first branch, which condition is executed, is calculated by default. To check the condition and execution of other branches, select the Execute All Appropriate Branches branching's context menu item. All branches, which conditions are executed, are executed on algorithm calculation.
Drag calculation algorithm elements to the Branch and Else conditions:
Open the Branching Parameters dialog box to set calculation block execution conditions:
Double-click the Branch object in the calculation tree.
Select the Edit item in the context menu of the Branch object in the calculation tree.
As a result, the Branching Parameters dialog box opens:
Click the Add button on the toolbar to add a condition:
Set parameters:
NOTE. It is available only for the Parameter condition type.
Condition. In the drop-down list select one of the condition types:
Contained.
Not contained.
Equal.
Not equal.
Greater.
Less.
NOTE. It is available only for the Parameter condition type. The set of displayed condition types depends on the parameter or data type of its attribute selected in the Branching Parameter column.
Value. Set value for the selected condition type:
Parameter. Set the value that will be compared with the value of branching parameter. If calculation algorithm parameter is selected as a branching parameter, select parameter elements to be compared in the drop-down list. If parameter attribute is selected as a branching parameter, specify the value to be compared, which data type is set according to the attribute data type.
Formula. To set condition formula, click the button and create a condition formula identically to setting up calculation formulas in the Branch Condition Formula dialog box that opens:
The created formula will be displayed as a string disabled for editing in the Value column.
NOTE. The formula can be set and edited only in the Branch Condition Formula dialog box.
AND/OR. Select one of logical operators in the drop-down list if several conditions are added:
AND. It is used by default. If all conditions are executed, the calculation algorithm is executed too.
OR. If at least one condition is executed, the calculation algorithm is executed too.
To delete one of the conditions, select the condition and click the Delete button on the toolbar.
To delete all conditions, click the Clear button.
The example creates a branching with two branches, each of the branches has algorithm calculation execution conditions.
See also: