-
-
Constructor Summary
Constructors Constructor Description Engine(Environment<T, P> e)Builds a simulation for a given environment. Engine(Environment<T, P> e, long maxSteps)Builds a simulation for a given environment. Engine(Environment<T, P> e, long maxSteps, Time t)Builds a simulation for a given environment. Engine(Environment<T, P> e, Time t)Builds a simulation for a given environment.
-
Method Summary
Modifier and Type Method Description Environment<T, P>getEnvironment()TimegetFinalTime()longgetFinalStep()StatusgetStatus()Optional<Throwable>getError()voidaddOutputMonitor(OutputMonitor<T, P> op)longgetStep()TimegetTime()voidgoToStep(long step)voidgoToTime(Time t)voidneighborAdded(Node<T> node, Node<T> n)voidneighborRemoved(Node<T> node, Node<T> n)voidnodeAdded(Node<T> node)voidnodeMoved(Node<T> node)voidnodeRemoved(Node<T> node, Neighborhood<T> oldNeighborhood)voidpause()voidplay()voidreactionAdded(Reaction<T> reactionToAdd)voidreactionRemoved(Reaction<T> reactionToRemove)voidremoveOutputMonitor(OutputMonitor<T, P> op)voidrun()voidschedule(CheckedRunnable r)voidterminate()StringtoString()StatuswaitFor(Status next, long timeout, TimeUnit tu)-
-
Constructor Detail
-
Engine
Engine(Environment<T, P> e)
Builds a simulation for a given environment.- Parameters:
e- the environment at the initial time
-
Engine
Engine(Environment<T, P> e, long maxSteps)
Builds a simulation for a given environment.- Parameters:
e- the environment at the initial timemaxSteps- the maximum number of steps to do
-
Engine
Engine(Environment<T, P> e, long maxSteps, Time t)
Builds a simulation for a given environment.- Parameters:
e- the environment at the initial timemaxSteps- the maximum number of steps to dot- the maximum time to reach
-
Engine
Engine(Environment<T, P> e, Time t)
Builds a simulation for a given environment.- Parameters:
e- the environment at the initial timet- the maximum time to reach
-
-
Method Detail
-
getEnvironment
Environment<T, P> getEnvironment()
-
getFinalTime
Time getFinalTime()
-
getFinalStep
long getFinalStep()
-
addOutputMonitor
void addOutputMonitor(OutputMonitor<T, P> op)
-
getStep
long getStep()
-
goToStep
void goToStep(long step)
-
neighborAdded
void neighborAdded(Node<T> node, Node<T> n)
-
neighborRemoved
void neighborRemoved(Node<T> node, Node<T> n)
-
nodeRemoved
void nodeRemoved(Node<T> node, Neighborhood<T> oldNeighborhood)
-
pause
void pause()
-
play
void play()
-
reactionAdded
void reactionAdded(Reaction<T> reactionToAdd)
-
reactionRemoved
void reactionRemoved(Reaction<T> reactionToRemove)
-
removeOutputMonitor
void removeOutputMonitor(OutputMonitor<T, P> op)
-
run
void run()
-
schedule
void schedule(CheckedRunnable r)
-
terminate
void terminate()
-
-
-
-