Polybench® Reference
Used in an action sequence to make a decision based upon the values of the specified variables.

Action Decision


Use this operator as part of an action sequence. An action sequence consists of two kind of operators: the Action operator (link) and this operator.

This operator is used to split an action sequence in two routes; which route is taken depends on a logical equation that is specified in the properties.

You can also this operator to calculate a logical equation on fixed values, variables, values as well as any texts.

Operator ports

Input action: Specific sample type, see below.

Output Yes: Action sequence blobs

Output No: Action sequence blobs


Find more information about changing properties here: link

type: Address, starts with '$' sign (see link)
An equation based on which this operator decides to continue on the Yes or No output. You may use fixed value, variable parameters, AND and OR.

You may type or paste the address, or you may press the small button on the right to open the Address Searcher dialog (link)

Parsed equation (to check)
type: See description
Displays the equation like how Polybench interprets it. Use this to check if your equation is correct.

Partial results (to check)
type: Parameter list (see link)
Displays comparison results of parts in your equation. Use this to check if your equation is correct.

type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.


In the properties dialog of the Action Decision you can specify a logical equation. The equation should contain at least one comparison between two values or variables.
A comparison looks like this:

a = b : is a equal to b?
a != b : is a not equal to b?
a > b : is a greater than b?
a >= b : is a greater than or equal to b?
a < b : is a less than b?
a <= b : is a less than or equal to b?

where a and b should be substituted by any of the following:
- a fixed text string, for example hypertension
- a fixed numerical value, for example 12.3, also valid is 12,3
- a global variable, for example $hour$
- a variable parameter of any other object, for example $Design.Constant 1.Value$

If a text string is to be compared to another text string, then comparison is handled in an ordinal fashion according to the ASCII character order. If a numerical value is used, then the comparison is handled according to numerical rules.

Logical equations

The Decision Operator allows to specify multiple comparisons. Those comparisons, as described above, are then glued together using the logical operators AND and OR (they must be written in capitals, so and or or is wrong).

To be able to structure the equation, you may use brackets: ( to open a sub-section, and ) to close a sub-section.
Note the following rules:

a = a AND b < c : result is TRUE, so the 'Yes' route is taken.
(a = a AND b < c) OR c > d : result is TRUE
a = a AND b < c OR c > d : this is equal to the previous equation, since AND goes before OR.
(a < b AND (c > d OR (e = f AND e > d))) : well, the answer is... FALSE

The last equation takes some more time to understand. To help check if an equation is parsed and handled the way you intend it to be, the properties dialog of the Action Decision provides the parsed equation (with extra brackets to see what is calculated first), as well as a list of comparisons, so you are able to evaluate each and every part of the equation.
The last equation above, according to the parser, translates to:

((a < b) AND ((c > d) OR ((e = f) AND (e > d))))

which is FALSE, because either (c > d) is FALSE, or (e = f) is FALSE. The action sequence will continue its route via the 'No' output of this operator.

Wrong equation

If a problem is detected in the logical equation, then the Action Decision operator symbol issues a warning and becomes red. Any actions that are connected at the output will not be executed!


Example: Action Decision Test
Demonstrates the use of the Action Decision operator in an action sequence. The action sequence is started when you press the 'Go' button (it uses an ACTIONSEQUENCE action). In the Action Decision a random example equation is set. Change the equation to see if it evaluates to TRUE or FALSE. You may also change the constant values. Then press 'Go' again and check the result. If the equation evaluates to TRUE, then 'YES' is written in the input field, otherwise 'NO'.