Logic Tree Elements

In addition to the And, Or and Not logical elements, GoldSim has an additional element that provides an alternative way to create complex logic: the  Logic Tree element.

Graphical user interface, text, application, email

Description automatically generated

Logic Tree elements have a single output, which is a scalar condition (True or False). The logical framework of Logic Trees is constructed using a number of gate nodes (e.g.,, AND-gates, OR-gates). The various gate nodes have child nodes (sub-nodes) and the gates are evaluated based on the value (True or False) of their child nodes and the type of gate (e.g., in order for an AND-gate to be True, all of the child nodes defining the gate must be True).

Gates can be nested with no limit (hence, creating a “tree”), which allows very complex logic to be represented. The various nodes in the tree are evaluated hierarchically to determine if the output of the element is True or False.

To illustrate this, consider the simple logic tree shown below:

Text

Description automatically generated

In this example, there are two gate nodes: the top AND-gate (the top of a logic tree is always an AND-gate) and an OR-gate (that is one of the children of the AND-gate). “Water_Rising” is a child of the AND-gate and “Pump_Failed” and “Water_Level > 10 m” are children of the OR-gate. “Water_Rising” and “Pump_Failed” are element outputs defined as conditions and “Water_Level > 10 m” is a conditional expression

Hence, the logic expressed here is:

   If

       (Water_Rising) AND (Water_Level>10m OR Pump_Failed)

   Then

       The Logic Tree is True

   Else

        The Logic Tree is False

The topics below describe the details of how logic trees are created.

An example model which uses the Logic Tree element, as well as other logical elements (Logical.gsm) can be found in the General Examples folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu).

Related Topics…

Learn more about: