public class OTSSimulator extends nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDoubleUnit implements OTSSimulatorInterface, Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2018-10-30 14:03:57 +0100 (Tue, 30 Oct 2018) $, @version $Revision: 4727 $, by $Author: pknoppers $,
initial version 12 nov. 2014
nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDoubleUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeFloatUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeLongnl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeFloatUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeLongreplication, running, semaphore, simulatorTime, workerEVENTLIST_CHANGED_EVENT| Constructor and Description |
|---|
OTSSimulator()
Construct an OTSSimulator.
|
| Modifier and Type | Method and Description |
|---|---|
OTSReplication |
getReplication() |
void |
initialize(Time startTime,
Duration warmupPeriod,
Duration runLength,
OTSModelInterface model)
Initialize a simulation engine without animation; the easy way.
|
void |
initialize(Time startTime,
Duration warmupPeriod,
Duration runLength,
OTSModelInterface model,
int replicationNr)
Initialize a simulation engine without animation and prescribed replication number; the easy way.
|
nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<nl.tudelft.simulation.dsol.simtime.SimTimeDoubleUnit> |
scheduleEvent(Time executionTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
Construct and schedule a SimEvent using a Time to specify the execution time.
|
String |
toString() |
autoPauseSimulator, cancelEvent, endReplication, getEventList, initialize, isPauseOnError, run, runUpTo, runUpToAndIncluding, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError, stepcleanUp, getSimTime, getSimulatorTime, isRunning, start, start, step, stop, stopaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcancelEvent, getEventList, isPauseOnError, runUpTo, runUpToAndIncluding, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnErrorpublic void initialize(Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface model) throws nl.tudelft.simulation.dsol.SimRuntimeException, NamingException
initialize in interface OTSSimulatorInterfacestartTime - Time; the start time of the simulationwarmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what
this is)runLength - Duration; the duration of the simulationmodel - OTSModelInterface; the simulation to executenl.tudelft.simulation.dsol.SimRuntimeException - when e.g., warmupPeriod is larger than runLengthNamingException - when the context for the replication cannot be createdpublic void initialize(Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface model, int replicationNr) throws nl.tudelft.simulation.dsol.SimRuntimeException, NamingException
initialize in interface OTSSimulatorInterfacestartTime - Time; the start time of the simulationwarmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what
this is)runLength - Duration; the duration of the simulationmodel - OTSModelInterface; the simulation to executereplicationNr - int; the replication numbernl.tudelft.simulation.dsol.SimRuntimeException - when e.g., warmupPeriod is larger than runLengthNamingException - when context for the animation cannot be createdpublic final nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<nl.tudelft.simulation.dsol.simtime.SimTimeDoubleUnit> scheduleEvent(Time executionTime, short priority, Object source, Object target, String method, Object[] args) throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEvent in interface OTSSimulatorInterfaceexecutionTime - Time; the time at which the event must happenpriority - short; should be between SimEventInterface.MAX_PRIORITY and
SimEventInterface.MIN_PRIORITY; most normal events should use
SimEventInterface.NORMAL_PRIORITYsource - Object; the object that creates/schedules the eventtarget - Object; the object that must execute the eventmethod - String; the name of the method of target that must execute the eventargs - Object[]; the arguments of the method that must execute the eventnl.tudelft.simulation.dsol.SimRuntimeException - when the executionTime is in the pastpublic OTSReplication getReplication()
getReplication in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface<Time,Duration,nl.tudelft.simulation.dsol.simtime.SimTimeDoubleUnit>getReplication in interface OTSSimulatorInterfacegetReplication in class nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDoubleUnitCopyright © 2014–2019 Delft University of Technology. All rights reserved.