Package repast.simphony.statecharts
Enum Class StateChartScheduler
- All Implemented Interfaces:
Serializable
,Comparable<StateChartScheduler>
,java.lang.constant.Constable
This is singleton responsible for managing the scheduling of statechart begin
and resolve actions. Both of these actions need to be managed because they
are added and removed based on statechart or simulation logic.
- Author:
- jozik
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
beginLater
(double later, StateChart<?> sc) Convenience method to schedule a statechart for activation at a later time.static void
beginNow
(StateChart<?> sc) Convenience method to schedule a statechart for immediate activation.void
Method to begin the statechart now without using the schedule.protected void
protected void
void
Initializes the scheduler.protected void
removeResolveTime
(double nextTime, StateChart<?> sc) void
scheduleBeginTime
(double nextTime, StateChart<?> sc) Called by generated statechart code to schedule the begin time for a statechart.protected void
scheduleResolveTime
(double nextTime, StateChart<?> sc) static StateChartScheduler
Returns the enum constant of this class with the specified name.static StateChartScheduler[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
resolveActions
-
beginActions
-
integrator
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
initialize
public void initialize()Initializes the scheduler. This is automatically called by a simulation end action or for simulations using other forms of initialization during a simulation run, from initialization appropriate places if (e.g., ReLogo setup methods, via clearAll()) -
clearOldResolveActions
protected void clearOldResolveActions() -
clearOldBeginActions
protected void clearOldBeginActions() -
scheduleResolveTime
-
beginNow
Convenience method to schedule a statechart for immediate activation.- Parameters:
sc
- statechart to be activated
-
beginLater
Convenience method to schedule a statechart for activation at a later time.- Parameters:
later
- ticks from current time when statechart should be activatedsc
- statechart to be activated
-
beginNowWithoutScheduling
Method to begin the statechart now without using the schedule. This is necessary for calling when the simulation is paused.- Parameters:
sc
-
-
scheduleBeginTime
Called by generated statechart code to schedule the begin time for a statechart.- Parameters:
nextTime
-sc
-
-
removeResolveTime
-