Package org.opentrafficsim.core.dsol
Interface OtsSimulatorInterface
- All Superinterfaces:
nl.tudelft.simulation.naming.context.Contextualized,DevsSimulatorInterface<org.djunits.value.vdouble.scalar.Duration>,EventProducer,Remote,SimulatorInterface<org.djunits.value.vdouble.scalar.Duration>
- All Known Implementing Classes:
OtsAnimator,OtsSimulator
public interface OtsSimulatorInterface
extends DevsSimulatorInterface<org.djunits.value.vdouble.scalar.Duration>, nl.tudelft.simulation.naming.context.Contextualized
Interface for simulators within OTS.
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate$, @version $Revision$, by $Author$, initial version 11 mei 2015
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
Fields inherited from interface nl.tudelft.simulation.dsol.simulators.DevsSimulatorInterface
EVENTLIST_CHANGED_EVENTFields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITIONFields inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
START_EVENT, STARTING_EVENT, STOP_EVENT, STOPPING_EVENT, TIME_CHANGED_EVENT -
Method Summary
Modifier and TypeMethodDescriptiondefault nl.tudelft.simulation.naming.context.ContextInterfacedefault org.djunits.value.vdouble.scalar.DurationReturns the current time-of-day, a value in the range [0 24)h.voidinitialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager) Initialize a simulation engine without animation; the easy way.voidinitialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager, int replicationNr) Initialize a simulation engine without animation and prescribed replication number; the easy way.voidinitialize(OtsModelInterface model, OtsReplication replication) Initialize a simulation engine without animation; the easy way.Methods inherited from interface nl.tudelft.simulation.dsol.simulators.DevsSimulatorInterface
cancelEvent, getEventList, isPauseOnError, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnErrorMethods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListenerMethods inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
addScheduledMethodOnInitialize, addScheduledMethodOnInitialize, cleanUp, endReplication, getErrorLogLevel, getErrorStrategy, getModel, getReplicationState, getRunState, getSimLogger, getSimulatorTime, initialize, initialize, isInitialized, isStarted, isStarting, isStartingOrRunning, isStopped, isStopping, isStoppingOrStopped, runUpTo, runUpToAndIncluding, setErrorLogLevel, setErrorStrategy, setErrorStrategy, start, step, stop
-
Method Details
-
initialize
Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;- Parameters:
model- the simulation to executereplication- the replication with the run control parameters- Throws:
SimRuntimeException- when e.g., warmupPeriod is larger than runLength
-
initialize
void initialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager) throws SimRuntimeException, NamingException Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;- Parameters:
startTimeOfDay- the start time of the simulationwarmupPeriod- the warm up period of the simulation (use Duration.ZERO if you don't know what this is)runLength- the duration of the simulationmodel- the simulation to executehistoryManager- history manager- Throws:
SimRuntimeException- when e.g., warmupPeriod is larger than runLengthNamingException- when the context for the replication cannot be created
-
initialize
void initialize(org.djunits.value.vdouble.scalar.Duration startTimeOfDay, org.djunits.value.vdouble.scalar.Duration warmupPeriod, org.djunits.value.vdouble.scalar.Duration runLength, OtsModelInterface model, HistoryManager historyManager, int replicationNr) throws SimRuntimeException, NamingException Initialize a simulation engine without animation and prescribed replication number; the easy way. PauseOnError is set to true;- Parameters:
startTimeOfDay- the start time of the simulationwarmupPeriod- the warm up period of the simulation (use Duration.ZERO if you don't know what this is)runLength- the duration of the simulationmodel- the simulation to executehistoryManager- history managerreplicationNr- the replication number- Throws:
SimRuntimeException- when e.g., warmupPeriod is larger than runLengthNamingException- when context for the animation cannot be created
-
getReplication
OtsReplication getReplication()- Specified by:
getReplicationin interfaceSimulatorInterface<org.djunits.value.vdouble.scalar.Duration>
-
getContext
default nl.tudelft.simulation.naming.context.ContextInterface getContext()- Specified by:
getContextin interfacenl.tudelft.simulation.naming.context.Contextualized
-
getTimeOfDay
default org.djunits.value.vdouble.scalar.Duration getTimeOfDay()Returns the current time-of-day, a value in the range [0 24)h.- Returns:
- current time-of-day
-