Engee documentation

Transition graphs

Transition graphs (flow charts) are graphical constructs that represent the flow of operations or logic in a system. Graphs are constructed using nodes, transitions and transitions by default. Such graphs are used in modelling decision trees, iterative loops, etc.

The logic of operation of the transition graph:

  • The transition graph is executed at each step of the Chart block operation;

  • The execution of the transition graph usually starts with a transition by default and ends at an output node that has no available transitions with true conditions. If all outgoing transitions from a node have false conditions, backtracking[1] to find an alternative path;

  • The actions and conditions that determine the behaviour of the model are set on the transitions.

For more details on the logic of the transition graph, see. here.

Transitions in the transition graph occur according to transition priority. The priority of a transition determines the order in which they are evaluated and executed if the conditions of multiple transitions are simultaneously true. If multiple transitions are possible from a node, their priorities will be assigned automatically. They can be changed later manually.


Examples of realisation of if-else and while constructions with the help of transition graphs:

If-Else While

stateflow flow chart 1

sf loop 1 1

if x > 2
    y = 9;
else
    y = 15;
end
i = 0
while y < 15
    y += 2 * i
    i += 1
end

1. Backtracking is a problem-solving technique based on attempting to sequentially search through all possible solutions in order to find the correct one. When a programme reaches a solution node (e.g. in a transition graph, it may be an output node) and all possible options for further actions are incorrect (e.g. all transitions from the node have false conditions), it returns (backtracks) to the previous solution node and tries another (alternative) option