public class SimpleSimulator extends OTSDEVSSimulator implements SimpleSimulatorInterface
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.
$LastChangedDate: 2015-12-29 03:56:14 +0100 (Tue, 29 Dec 2015) $, @version $Revision: 1668 $, by $Author: averbraeck $,
initial version 12 nov. 2014
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 |
|---|
SimpleSimulator(org.djunits.value.vdouble.scalar.Time.Abs startTime,
org.djunits.value.vdouble.scalar.Time.Rel warmupPeriod,
org.djunits.value.vdouble.scalar.Time.Rel runLength,
OTSModelInterface model)
Create a simulation engine without animation; the easy way.
|
| Modifier and Type | Method and Description |
|---|---|
SimEvent<OTSSimTimeDouble> |
scheduleEvent(org.djunits.value.vdouble.scalar.Time.Abs executionTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
Construct and schedule a SimEvent using a Time.Abs to specify the execution time.
|
initialize, runUpTo, scheduleEventAbs, scheduleEventAbs, scheduleEventRel, scheduleEventRel, startautoPauseSimulator, cancelEvent, getEventList, isPauseOnError, run, runUpTo, 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, runUpTo, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, setEventListisPauseOnError, runUpTo, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setPauseOnErrorgetSimulatorTime, initialize, isRunning, start, step, stopgetReplicationaddListener, addListener, addListener, addListener, removeListenerpublic SimpleSimulator(org.djunits.value.vdouble.scalar.Time.Abs startTime,
org.djunits.value.vdouble.scalar.Time.Rel warmupPeriod,
org.djunits.value.vdouble.scalar.Time.Rel runLength,
OTSModelInterface model)
throws SimRuntimeException,
NamingException
startTime - OTSSimTimeDouble; the start time of the simulationwarmupPeriod - Time.Rel; the warm up period of the simulation (use new Time.Rel(0, SECOND) if you don't know what
this is)runLength - Time.Rel; the duration of the simulationmodel - OTSModelInterface; the simulation to executeSimRuntimeException - on ???NamingException - when the context for the replication cannot be createdpublic final SimEvent<OTSSimTimeDouble> scheduleEvent(org.djunits.value.vdouble.scalar.Time.Abs executionTime, short priority, Object source, Object target, String method, Object[] args) throws SimRuntimeException
scheduleEvent in interface SimpleSimulatorInterfaceexecutionTime - Time.Abs; 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 eventSimRuntimeException - when the executionTime is in the pastCopyright © 2014–2016 Delft University of Technology. All rights reserved.