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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ScheduleParametersgetSimilarOneTimeParams(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.static ScheduleParametersgetSimilarParams(ScheduleParameters baseParameters, double newTime) Creates a similar ScheduleParameters object with the same properties as the given base, but with a different time.static ScheduleParametersgetSimilarParams(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> ISchedulableActionscheduleGraph(ISchedule schedule, ScheduleParameters baseParams, Object rootNode, Executor<GraphParams<E>> graphExecutor) Schedules the execution of a graph starting with the specified root node.static ISchedulableActionscheduleGraph(ISchedule schedule, ScheduleParameters baseParams, Object rootNode, Network topology, Executor<Object> nodeExecutor) Schedules a Repast network to be executed.
- 
Constructor Details- 
GraphScheduleUtilitiespublic GraphScheduleUtilities()
 
- 
- 
Method Details- 
scheduleGraphpublic 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 to
- 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
 
- 
scheduleGraphpublic 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 to
- 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:
- 
- #schedule(ScheduleParameters, Object, GraphExecutor)
 
 
- 
getSimilarParamspublic 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 parameters
- newTime- the time for the returned object
- Returns:
- a ScheduleParameters object with time, newTime
 
- 
getSimilarOneTimeParamspublic 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 parameters
- newTime- the time for the returned object
- Returns:
- a ScheduleParameters object with time, newTime
 
- 
getSimilarParamspublic 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 parameters
- newTime- the time for the returned object
- newFrequency- the Frequency for the returned object
- newInterval- the interval for the returned object
- Returns:
- a ScheduleParameters object with time, newTime, Frequency, newFrequency, and interval, newInterval
 
 
-