Package repast.simphony.engine.graph
Class DefaultGraphSchedule
java.lang.Object
repast.simphony.engine.schedule.Schedule
repast.simphony.engine.graph.DefaultGraphSchedule
- All Implemented Interfaces:
IGraphSchedule
,IAction
,ISchedule
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:
-
Field Summary
Fields inherited from class repast.simphony.engine.schedule.Schedule
actionFactory, actionQueue, endActions, groupToExecute, tickCount, userTimeQuantity
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionschedule
(ScheduleParameters baseParams, Object rootNode, GraphExecutor<?> executor) Schedules the execution of a graph starting with the specified root node.schedule
(ScheduleParameters baseParams, Object rootNode, Network topology, Executor<Object> nodeExecutor) Schedules a Repast network to be executed.Methods inherited from class repast.simphony.engine.schedule.Schedule
convertTicksToTimeQuantity, convertTimeQuantityToTicks, createAction, execute, executeEndActions, getActionCount, getModelActionCount, getTickCount, getTickCountInTimeQuantity, getTimeQuantity, isFinishing, peekNextAction, preExecute, removeAction, schedule, schedule, schedule, schedule, scheduleIterable, setFinishing, setTimeQuantity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface repast.simphony.engine.schedule.ISchedule
createAction, execute, executeEndActions, getActionCount, getModelActionCount, getTickCount, getTickCountInTimeQuantity, getTimeQuantity, isFinishing, removeAction, schedule, schedule, schedule, schedule, scheduleIterable, setFinishing, setTimeQuantity
-
Constructor Details
-
DefaultGraphSchedule
public DefaultGraphSchedule() -
DefaultGraphSchedule
-
-
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 interfaceIGraphSchedule
- Parameters:
baseParams
- the parameters for scheduling the root node and a basis for the scheduling of the following nodesrootNode
- the node to start execution onexecutor
- 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 asschedule(ScheduleParameters, Object, GraphExecutor)
but automatically builds the GraphExecutor.- Specified by:
schedule
in interfaceIGraphSchedule
- Parameters:
baseParams
- the parameters for scheduling the root node and a basis for the scheduling of the following nodesrootNode
- the node to start execution ontopology
- the topology to executenodeExecutor
- the action that will execute nodes in the graph- Returns:
- the action scheduled for executing the root node
- See Also:
-