Package repast.simphony.engine.graph
Class AbstractGraphExecutor<E>
- java.lang.Object
-
- repast.simphony.engine.graph.AbstractGraphExecutor<E>
-
- All Implemented Interfaces:
Executor<GraphParams<E>>
,GraphExecutor<E>
- Direct Known Subclasses:
NetworkTopologyExecutor
public abstract class AbstractGraphExecutor<E> extends Object implements GraphExecutor<E>
Base implementation of a GraphExecutor. Subclasses of this executor should provide a validation method and this class will perform the execution of the graph.- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Jerry Vos
- See Also:
GraphExecutor
-
-
Constructor Summary
Constructors Constructor Description AbstractGraphExecutor(ISchedule schedule, ScheduleParameters baseParams, Traverser<E> traverser, Executor<E> nodeExecutor)
Constructs this graph executor to work with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(GraphParams<E> params)
Performs execution of the graph.protected double
getNextTime(GraphParams<E> params, E nextNode)
protected double
getRootTime()
protected ScheduleParameters
getScheduleParameters(double time)
-
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.graph.GraphExecutor
validateForExecution
-
-
-
-
Constructor Detail
-
AbstractGraphExecutor
public AbstractGraphExecutor(ISchedule schedule, ScheduleParameters baseParams, Traverser<E> traverser, Executor<E> nodeExecutor)
Constructs this graph executor to work with the specified parameters. This GraphExecutor will visit the nodes with the specified visitor, execute them with the given node executor and reschedule itself according to baseParams.- Parameters:
schedule
- the schedule this graph executor will use to reschedule itselfbaseParams
- the parameters to base its scheduling ontraverser
- the visitor for finding successors to nodesnodeExecutor
- the executor for executing the nodes
-
-
Method Detail
-
execute
public void execute(GraphParams<E> params)
Performs execution of the graph. This involves validating the params for execution, executing the current node with the given node executor, then scheduling this to perform execution on the current node's successors.
-
getScheduleParameters
protected ScheduleParameters getScheduleParameters(double time)
-
getNextTime
protected double getNextTime(GraphParams<E> params, E nextNode)
-
getRootTime
protected double getRootTime()
-
-