Discrete blocks

Discrete blocks

Branch block

The Branch block routes messages to different parts of an algorithm based on the Boolean formula in the Branch block when triggered by an incoming discrete event message. If the formula evaluates to TRUE, the block routes the discrete event message to its yes output port; otherwise, it sends the message through its no output port.

Example The Branch block looks at the incoming discrete event message for an existing order and routes the message through the yes port if the message represents a hedge order; otherwise, send it through the no port.

The Branch block uses the following formula:

Note Though both the Branch block and the State block look alike, they are fundamentally different. While the State block waits until one of the internalized Boolean statements turns TRUE to output a message, the Branch block immediately directs the incoming message either through the yes or the no output port.

Block properties

To customize the block, update the Block Properties.

Property Description
Name Name to display beneath the block on the ADL canvas
Formula

Equations used to determine which branch (output port) to take

The edit link opens the Formula Editor.

Note The formula must evaluate to a Boolean value.