-
-
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()
Time
getFinalTime()
long
getFinalStep()
Status
getStatus()
Optional<Throwable>
getError()
void
addOutputMonitor(OutputMonitor<T, P> op)
long
getStep()
Time
getTime()
void
goToStep(long step)
void
goToTime(Time t)
void
neighborAdded(Node<T> node, Node<T> n)
void
neighborRemoved(Node<T> node, Node<T> n)
void
nodeAdded(Node<T> node)
void
nodeMoved(Node<T> node)
void
nodeRemoved(Node<T> node, Neighborhood<T> oldNeighborhood)
void
pause()
void
play()
void
reactionAdded(Actionable<T> reactionToAdd)
void
reactionRemoved(Actionable<T> reactionToRemove)
void
removeOutputMonitor(OutputMonitor<T, P> op)
void
run()
void
schedule(CheckedRunnable runnable)
void
terminate()
String
toString()
Status
waitFor(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
-
-
Method Detail
-
getEnvironment
Environment<T, P> getEnvironment()
-
getFinalTime
Time getFinalTime()
-
getFinalStep
long getFinalStep()
-
getStatus
Status getStatus()
-
addOutputMonitor
void addOutputMonitor(OutputMonitor<T, P> op)
-
getStep
long getStep()
-
getTime
Time getTime()
-
goToStep
void goToStep(long step)
-
goToTime
void goToTime(Time t)
-
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(Actionable<T> reactionToAdd)
-
reactionRemoved
void reactionRemoved(Actionable<T> reactionToRemove)
-
removeOutputMonitor
void removeOutputMonitor(OutputMonitor<T, P> op)
-
run
void run()
-
schedule
void schedule(CheckedRunnable runnable)
-
terminate
void terminate()
-
-
-
-