public class OTSDEVSSimulator extends DEVSSimulator<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> implements OTSDEVSSimulatorInterface
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
DEVSSimulator.CalendarDouble, DEVSSimulator.CalendarFloat, DEVSSimulator.CalendarLong, DEVSSimulator.TimeDouble, DEVSSimulator.TimeDoubleUnit, DEVSSimulator.TimeFloat, DEVSSimulator.TimeFloatUnit, DEVSSimulator.TimeLong, DEVSSimulator.TimeLongUnitDEVSSimulatorInterface.CalendarDouble, DEVSSimulatorInterface.CalendarFloat, DEVSSimulatorInterface.CalendarLong, DEVSSimulatorInterface.TimeDouble, DEVSSimulatorInterface.TimeDoubleUnit, DEVSSimulatorInterface.TimeFloat, DEVSSimulatorInterface.TimeFloatUnit, DEVSSimulatorInterface.TimeLong, DEVSSimulatorInterface.TimeLongUniteventListreplication, running, semaphore, simulatorTime, workerlistenersEVENTLIST_CHANGED_EVENTEND_OF_REPLICATION_EVENT, START_EVENT, START_REPLICATION_EVENT, STEP_EVENT, STOP_EVENT, TIME_CHANGED_EVENT, WARMUP_EVENTFIRST_POSITION, LAST_POSITION| Constructor and Description |
|---|
OTSDEVSSimulator() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Replication<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> initReplication,
ReplicationMode replicationMode) |
void |
runUpTo(org.djunits.value.vdouble.scalar.Time.Abs when)
Runs the simulator up to a certain time; events at that time will not yet be executed.
|
void |
scheduleEventAbs(org.djunits.value.vdouble.scalar.Time.Abs absoluteTime,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at an absolute time.
|
void |
scheduleEventAbs(org.djunits.value.vdouble.scalar.Time.Abs absoluteTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at an absolute time.
|
void |
scheduleEventRel(org.djunits.value.vdouble.scalar.Time.Rel relativeDelay,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at a relative duration.
|
void |
scheduleEventRel(org.djunits.value.vdouble.scalar.Time.Rel relativeDelay,
short priority,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at a relative duration.
|
void |
start() |
autoPauseSimulator, cancelEvent, getEventList, isPauseOnError, run, runUpTo, runUpToAndIncluding, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError, step, stopcleanUp, getReplication, getSimulatorTime, isRunningaddListener, 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, toString, wait, wait, waitcancelEvent, getEventList, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, setEventListisPauseOnError, runUpTo, runUpToAndIncluding, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setPauseOnErrorgetSimulatorTime, isRunning, step, stopgetReplicationaddListener, addListener, addListener, addListener, removeListenerpublic final void initialize(Replication<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> initReplication, ReplicationMode replicationMode) throws SimRuntimeException
initialize in interface SimulatorInterface<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>initialize in interface OTSSimulatorInterfaceinitialize in class DEVSSimulator<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>SimRuntimeExceptionpublic final void scheduleEventRel(org.djunits.value.vdouble.scalar.Time.Rel relativeDelay,
short priority,
Object source,
Object target,
String method,
Object[] args)
throws SimRuntimeException
scheduleEventRel in interface OTSDEVSSimulatorInterfacerelativeDelay - the relativeDelay in timeUnits of the simulator.priority - the priority compared to other events scheduled at the same time.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventRel(org.djunits.value.vdouble.scalar.Time.Rel relativeDelay,
Object source,
Object target,
String method,
Object[] args)
throws SimRuntimeException
scheduleEventRel in interface OTSDEVSSimulatorInterfacerelativeDelay - the relativeDelay in timeUnits of the simulator.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventAbs(org.djunits.value.vdouble.scalar.Time.Abs absoluteTime,
Object source,
Object target,
String method,
Object[] args)
throws SimRuntimeException
scheduleEventAbs in interface OTSDEVSSimulatorInterfaceabsoluteTime - the exact time to schedule the method on the simulator.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventAbs(org.djunits.value.vdouble.scalar.Time.Abs absoluteTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
throws SimRuntimeException
scheduleEventAbs in interface OTSDEVSSimulatorInterfaceabsoluteTime - the exact time to schedule the method on the simulator.priority - the priority compared to other events scheduled at the same time.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.SimRuntimeException - whenever the event is scheduled in the past.public final void runUpTo(org.djunits.value.vdouble.scalar.Time.Abs when)
throws SimRuntimeException
runUpTo in interface OTSDEVSSimulatorInterfacewhen - the absolute time till when we want to run the simulationSimRuntimeException - whenever starting fails. Possible occasions include starting a started simulatorpublic void start()
throws SimRuntimeException
start in interface SimulatorInterface<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>start in interface OTSSimulatorInterfacestart in class Simulator<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>SimRuntimeExceptionCopyright © 2014–2016 Delft University of Technology. All rights reserved.