Interface ISchedulableAction

All Superinterfaces:
IAction
All Known Implementing Classes:
AbstractAction, DefaultAction, ThreadedAction

public interface ISchedulableAction extends IAction
Interface for actions that can be scheduled and executed by a Schedule.
Author:
Nick Collier
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add this ScheduableAction to the specified group for execution.
    double
    Gets the next time this ScheduledAction is to execute.
    long
    Gets an index indicating where this IAction was added to a schedule w/r to all other actions added to a schedule.
    double
    Gets the priority of this action.
    Gets the PriorityType of this action.
    boolean
    This is used by the schedule to determine if the action is a model related action or a back-end action.
    void
    Reschedule this ScheduableAction using the specified queue.

    Methods inherited from interface repast.simphony.engine.schedule.IAction

    execute
  • Method Details

    • getNextTime

      double getNextTime()
      Gets the next time this ScheduledAction is to execute.
      Returns:
      the next time this ScheduledAction is to execute.
    • reschedule

      void reschedule(ActionQueue queue)
      Reschedule this ScheduableAction using the specified queue. If an action is non-repeating then this method would typically do nothing.
      Parameters:
      queue -
    • addForExecution

      void addForExecution(ScheduleGroup group)
      Add this ScheduableAction to the specified group for execution.
      Parameters:
      group - the group to add the ISchedulableAction to.
    • getPriority

      double getPriority()
      Gets the priority of this action. The priority refers to this ISchedulableAction's place in the order of execution with respect to all the other actions that will execute at the same clock tick. The range is from Double.NEGATIVE_INFINITY (execute first) to Double.POSITIVE_INFINITY (execute last). The default is ScheduleParameters.RANDOM_PRIORITY which means the priority will be randomly assigned from a uniform distribution.
      Returns:
      the priority of this ScheduableAction.
    • getPriorityType

      PriorityType getPriorityType()
      Gets the PriorityType of this action.
      Returns:
      the PriorityType of this action.
    • getOrderIndex

      long getOrderIndex()
      Gets an index indicating where this IAction was added to a schedule w/r to all other actions added to a schedule.
      Returns:
      an index indicating where this IAction was added to a schedule w/r to all other actions added to a schedule.
    • isNonModelAction

      boolean isNonModelAction()
      This is used by the schedule to determine if the action is a model related action or a back-end action. Normal IActions use NonModelAction to specify this, but ISchedulableActions should use this method.
      Returns:
      if this is a back-end type action or not