Package com.anylogic.engine
- java.lang.Object
- com.anylogic.engine.EventOriginator
- com.anylogic.engine.Transition
- com.anylogic.engine.TransitionCondition
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,Serializable
public class TransitionCondition extends Transition
Statechart transition with trigger of type condition. The transition is executed when the
condition becomes
Memory: sizeof(Transition) = 22 bytes
true
. If the agent has continuously changing variables,
the numeric engine constantly monitors the condition. In purely discrete models
the condition is tested when something changes in the active obejct, i.e. when
onChange() is called. If the guard appears to be false
when the transition is about
to execute, it is not taken and becomes inactive until the next next condition evaluation.Memory: sizeof(Transition) = 22 bytes
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
TransitionCondition |
Constructs the transition object with Condition trigger.
|
Modifier and Type | Method | Description |
---|---|---|
void | cancel() |
Should be called when this transition becomes deactivated e.g.
|
String | getName() |
Returns the name of the condition transition as specified by the user.
|
void | onDestroy() |
Discards the scheduled event, if any (deletes it from the engine).
|
void | start() |
Should be called when the statechart enters to the transition's source state.
|
public TransitionCondition(Agent ao)
Constructs the transition object with Condition trigger. Does not activate it.
- Parameters:
ao
- agent where this transition belongs to
public String getName()
Returns the name of the condition transition as specified by the user.
- Specified by:
getName
in classEventOriginator
- Returns:
- The name of the transition
@AnyLogicInternalCodegenAPI public void start()
Should be called when the statechart enters to the transition's source state.
Checks condition and, if
true
, schedules event in 0 time. Also submits condition
to the numeric engine@AnyLogicInternalCodegenAPI public void cancel()
Should be called when this transition becomes deactivated e.g. as a result
of alternative transition being taken. Unsubmits condition from numeric engine
- Specified by:
cancel
in classTransition
@AnyLogicInternalCodegenAPI public void onDestroy()
Description copied from class:
EventOriginator
Discards the scheduled event, if any (deletes it from the engine).
Must be called when the agent is destroyed. We assume it is
common behavior of all event originators
- Overrides:
onDestroy
in classEventOriginator