Class DefaultGraphSchedule

java.lang.Object
repast.simphony.engine.schedule.Schedule
repast.simphony.engine.graph.DefaultGraphSchedule
All Implemented Interfaces:
IGraphSchedule, IAction, ISchedule

public class DefaultGraphSchedule extends Schedule implements IGraphSchedule
Base implementation of a graph schedule running on top of the default Repast schedule.

This class delegates the scheduling to GraphScheduleUtilities. The ScheduleUtilities class actually performs the scheduling of the root node execution.

Author:
Jerry Vos
See Also:
  • Constructor Details

    • DefaultGraphSchedule

      public DefaultGraphSchedule()
    • DefaultGraphSchedule

      public DefaultGraphSchedule(ISchedulableActionFactory factory)
  • Method Details

    • schedule

      public ISchedulableAction schedule(ScheduleParameters baseParams, Object rootNode, GraphExecutor<?> executor)
      Schedules the execution of a graph starting with the specified root node. The base parameters object is used to schedule the execution of the primary node, other nodes' execution should be based on these parameters but should not be scheduled as repeating actions. The base node itself can be scheduled as a repeating action, allowing for repeated execution of the graph.

      Specified by:
      schedule in interface IGraphSchedule
      Parameters:
      baseParams - the parameters for scheduling the root node and a basis for the scheduling of the following nodes
      rootNode - the node to start execution on
      executor - the action that will execute the graph
      Returns:
      the action scheduled for the root node
    • schedule

      public ISchedulableAction schedule(ScheduleParameters baseParams, Object rootNode, Network topology, Executor<Object> nodeExecutor)
      Schedules a Repast network to be executed. This is functions the same as schedule(ScheduleParameters, Object, GraphExecutor) but automatically builds the GraphExecutor.
      Specified by:
      schedule in interface IGraphSchedule
      Parameters:
      baseParams - the parameters for scheduling the root node and a basis for the scheduling of the following nodes
      rootNode - the node to start execution on
      topology - the topology to execute
      nodeExecutor - the action that will execute nodes in the graph
      Returns:
      the action scheduled for executing the root node
      See Also: