Action Evaluation Order

The default order of action evaluation is determined by the dependencies of the actions on objects. The most common scenario is the following:

Object1 --> ReadDep1 --> Action1 --> WriteDep1 --> Object2 --> ReadDep2 --> Action2 --> WriteDep2 --> Object3.

In this case, Action1 modifies Object2, which Action2 uses. Note that there are two (or more) dependencies attached to Object2 and the write dependency owned by Action1 precedes the read dependency owned by Action2. It establishes the order that Action1 needs to be evaluated first, before Action2 can be evaluated, because Action2 expects the object to be in the state reached by Action1 modifing it.

Another scenario is when there is more than one action that modifies the same object. In this case the object undergoes several modifications by several actions, similar to the feature history known from the feature based parametric modeling systems.

Action1 --> WriteDep --> Object (State1)

Action2 <-- ReadDep <-- Object

Action2 --> WriteDep --> Object (State2)

In this case, the evaluation of Action2 also requires that Action1 be evaluated in order to bring the Object to State1, because when Action2 is evaluated, it expects the Object to be in State1.

The evaluation of a network ignores the sub network hierarchy. An evaluation of sub networks is attempted by evaluating as many sub network actions as possible. If some of the sub network actions cannot be evaluated, the evaluation of that sub network is suspended, and other actions/sub networks of the higher level network are evaluated; the evaluation of the other actions can enable the evaluation of the actions in the suspended sub network. Then the evaluation of the suspended sub network is resumed. This process is repeated until all actions in all sub networks are sucessfully evaluated. Each sub network is marked as evaluated only after all of its actions have been evaluated. Finally, the whole network is marked as evaluated after all of its actions have been evaluated.