Package com.anylogic.engine
- java.lang.Object
-
- com.anylogic.engine.EventOriginator
-
- com.anylogic.engine.Transition
-
- com.anylogic.engine.TransitionRate
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,java.io.Serializable
public class TransitionRate extends Transition
Statechart transition with trigger of type rate. Such transition is executed with
the timeout distributed exponentially with the parameter rate (counted from the
moment the statechart came to the transition's source state), i.e. if
the rate is 5, the timeout will on average be 1/5 of thr time unit. If the rate
changes dynamically, the timeout gets re-evaluated; such changes may
only be noticed by TransitionRate if onChange() is called for the agent.
If the guard appears to be
Memory: sizeof(Transition) + 8 = 30 bytes
false
when the transition is about to execute,
it is not taken and becomes inactive until the rate changes.Memory: sizeof(Transition) + 8 = 30 bytes
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
TransitionRate(Agent ao) |
Constructs the transition object with Rate trigger.
|
Constructor | Description |
---|
void |
cancel() |
Should be called when this transition becomes deactivated e.g.
|
java.lang.String |
getName() |
Returns the name of the rate transition as specified by the user.
|
void |
start() |
Should be called when the statechart enters to the transition's source state.
|
Modifier and Type | Method | Description |
---|
isLoggingToDB, restoreOwner
getActiveObject, getAgent, getFullName, getRest, getRest, isActive, isCurrent, onDestroy, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public TransitionRate(Agent ao)
Constructs the transition object with Rate trigger. Does not activate it.
- Parameters:
ao
- agent where this transition belongs to
public java.lang.String getName()
Returns the name of the rate 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.
Schedules event in exponential( rate ) time.
@AnyLogicInternalCodegenAPI public void cancel()
Should be called when this transition becomes deactivated e.g. as a result
of alternative transition being taken. Removes this transition from the
statechart active list
- Specified by:
cancel
in classTransition
-
How can we improve this article?
-