Enum StateChartScheduler

  • All Implemented Interfaces:
    Serializable, Comparable<StateChartScheduler>

    public enum StateChartScheduler
    extends Enum<StateChartScheduler>
    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.
    • Field Detail

      • resolveActions

        protected Map<Double,​repast.simphony.statecharts.StateChartScheduler.ResolveActionsMapValue> resolveActions
      • beginActions

        protected Map<Double,​repast.simphony.statecharts.StateChartScheduler.BeginActionsMapValue> beginActions
    • Method Detail

      • values

        public static StateChartScheduler[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StateChartScheduler c : StateChartScheduler.values())
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StateChartScheduler valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        name - the name of the enum constant to be returned.
        the enum constant with the specified name
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - 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

        protected void scheduleResolveTime​(double nextTime,
                                           StateChart<?> sc)
      • beginNow

        public static void beginNow​(StateChart<?> sc)
        Convenience method to schedule a statechart for immediate activation.
        sc - statechart to be activated
      • beginLater

        public static void beginLater​(double later,
                                      StateChart<?> sc)
        Convenience method to schedule a statechart for activation at a later time.
        later - ticks from current time when statechart should be activated
        sc - statechart to be activated
      • beginNowWithoutScheduling

        public void beginNowWithoutScheduling​(StateChart<?> sc)
        Method to begin the statechart now without using the schedule. This is necessary for calling when the simulation is paused.
        sc -
      • scheduleBeginTime

        public void scheduleBeginTime​(double nextTime,
                                      StateChart<?> sc)
        Called by generated statechart code to schedule the begin time for a statechart.
        nextTime -
        sc -
      • removeResolveTime

        protected void removeResolveTime​(double nextTime,
                                         StateChart<?> sc)