prev_state¶
Syntax¶
Parameters¶
condition-name- The name of a condition defined in the model.
Returns¶
This action returns the index of the previous state of agent in the given condition.
The states of each condition are numbered in the order they are defined in the model, with Start always numbered 0 and Excluded always the last state in the condition.
The index of state State in condition COND can be referred to with the notation COND.State, so the value of this action can be compared for equality with the symbolic names of the states.
If the agent is in the Start state, then the value returned is 0, corresponding to COND.Start.
If the agent is in the Excluded state, then the value returned is the index of the Excluded state. That is, once an agent reaches the Excluded state, no other history of the agent within the condition is available.
Description¶
This action returns the index of the previous state of agent in the given condition.