Package org.baseagent.sim
Class Simulation
java.lang.Object
org.baseagent.sim.Simulation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(SimulationComponent simulatee) void
addScheduler
(Scheduler scheduler) void
addSimulationListener
(SimulationListener listener) void
afterEachStep
(Consumer<Simulation> function) void
beforeEachStep
(Consumer<Simulation> function) void
endWhen
(Predicate<Simulation> endCondition) long
long
boolean
isPaused()
boolean
boolean
void
pause()
void
remove
(SimulationComponent simulatee) void
removeSchedule
(Scheduler scheduler) void
removeSimulationListener
(SimulationListener listener) void
removeUniverse
(Universe universe) void
reset()
void
resume()
void
setCommunicator
(Communicator communicator) void
setDelayAfterEachStep
(int millis) void
setProperties
(Map<String, Object> props) void
setUniverse
(Universe universe) void
start()
boolean
stepTimeInterval
(long interval) void
stop()
-
Constructor Details
-
Simulation
public Simulation()
-
-
Method Details
-
setUniverse
-
getUniverse
-
removeUniverse
-
setCommunicator
-
getCommunicator
-
getSchedulers
-
addScheduler
-
removeSchedule
-
getDataCollectors
-
getProperties
-
setProperties
-
add
-
remove
-
getAgents
-
getBeacons
-
getPatches
-
getHasSteps
-
getMessageListeners
-
getMetrics
-
addSimulationListener
-
removeSimulationListener
-
endWhen
-
beforeEachStep
-
afterEachStep
-
getStepTime
public long getStepTime() -
reset
public void reset() -
setDelayAfterEachStep
public void setDelayAfterEachStep(int millis) -
getDelayAfterEachStep
public long getDelayAfterEachStep() -
isPaused
public boolean isPaused() -
isRunning
public boolean isRunning() -
isStopped
public boolean isStopped() -
start
public void start() -
pause
public void pause() -
resume
public void resume() -
stop
public void stop() -
stepTimeInterval
public boolean stepTimeInterval(long interval)
-