Package repast.simphony.engine.graph
Class GraphScheduleUtilities
java.lang.Object
repast.simphony.engine.graph.GraphScheduleUtilities
Utilities for working with the schedule.
- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:35 $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScheduleParameters
getSimilarOneTimeParams
(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.static ScheduleParameters
getSimilarParams
(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.static ScheduleParameters
getSimilarParams
(ScheduleParameters baseParameters, double newTime, Frequency frequency, double interval) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.static <E> ISchedulableAction
scheduleGraph
(ISchedule schedule, ScheduleParameters baseParams, Object rootNode, Executor<GraphParams<E>> graphExecutor) Schedules the execution of a graph starting with the specified root node.static ISchedulableAction
scheduleGraph
(ISchedule schedule, ScheduleParameters baseParams, Object rootNode, Network topology, Executor<Object> nodeExecutor) Schedules a Repast network to be executed.
-
Constructor Details
-
GraphScheduleUtilities
public GraphScheduleUtilities()
-
-
Method Details
-
scheduleGraph
public static <E> ISchedulableAction scheduleGraph(ISchedule schedule, ScheduleParameters baseParams, Object rootNode, Executor<GraphParams<E>> graphExecutor) 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.- Parameters:
schedule
- the schedule to schedule the graph tobaseParams
- 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
-
scheduleGraph
public static ISchedulableAction scheduleGraph(ISchedule 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.- Parameters:
schedule
- the schedule to schedule the graph tobaseParams
- 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:
-
#schedule(ScheduleParameters, Object, GraphExecutor)
-
getSimilarParams
public static ScheduleParameters getSimilarParams(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.- Parameters:
baseParameters
- the base for finding the next parametersnewTime
- the time for the returned object- Returns:
- a ScheduleParameters object with time, newTime
-
getSimilarOneTimeParams
public static ScheduleParameters getSimilarOneTimeParams(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.- Parameters:
baseParameters
- the base for finding the next parametersnewTime
- the time for the returned object- Returns:
- a ScheduleParameters object with time, newTime
-
getSimilarParams
public static ScheduleParameters getSimilarParams(ScheduleParameters baseParameters, double newTime, Frequency frequency, double interval) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.- Parameters:
baseParameters
- the base for finding the next parametersnewTime
- the time for the returned objectnewFrequency
- the Frequency for the returned objectnewInterval
- the interval for the returned object- Returns:
- a ScheduleParameters object with time, newTime, Frequency, newFrequency, and interval, newInterval
-