public abstract class AbstractWrappableSimulation extends Object implements WrappableSimulation, Serializable
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2018-09-19 13:55:45 +0200 (Wed, 19 Sep 2018) $, @version $Revision: 4006 $, by $Author: averbraeck $,
initial version Jun 18, 2015
Modifier and Type | Field and Description |
---|---|
protected ArrayList<AbstractProperty<?>> |
properties
The properties exhibited by this simulation.
|
Constructor and Description |
---|
AbstractWrappableSimulation() |
Modifier and Type | Method and Description |
---|---|
protected SimpleSimulator |
buildSimpleSimulator(Time startTime,
Duration warmupPeriod,
Duration runLength,
OTSModelInterface model)
Build the simulator.
|
protected SimpleSimulator |
buildSimpleSimulator(Time startTime,
Duration warmupPeriod,
Duration runLength,
OTSModelInterface otsModel,
int replicationNumber)
Build the simulator with the specified replication number.
|
SimpleSimulator |
buildSimulator(Time startTime,
Duration warmupPeriod,
Duration runLength,
ArrayList<Property<?>> userModifiedProperties)
Build the simulation.
|
ArrayList<AbstractProperty<?>> |
getProperties()
Retrieve a list of visible properties of the simulation.
|
protected abstract OTSModelInterface |
makeModel() |
void |
setNextReplication(Integer nextReplication)
Set the number of the next spawned replication.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
description, shortName
protected ArrayList<AbstractProperty<?>> properties
protected SimpleSimulator buildSimpleSimulator(Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface model) throws SimRuntimeException, NamingException, PropertyException
startTime
- Time; the start timewarmupPeriod
- Duration; the warm up periodrunLength
- Duration; the duration of the simulation / animationmodel
- OTSModelInterface; the simulation modelSimRuntimeException
- on ???NamingException
- when context for the animation cannot be createdPropertyException
- when one of the user modified properties has the empty string as keyprotected SimpleSimulator buildSimpleSimulator(Time startTime, Duration warmupPeriod, Duration runLength, OTSModelInterface otsModel, int replicationNumber) throws SimRuntimeException, NamingException, PropertyException
startTime
- Time; the start timewarmupPeriod
- Duration; the warm up periodrunLength
- Duration; the duration of the simulation / animationotsModel
- OTSModelInterface; the simulation modelreplicationNumber
- int; the replication numberSimRuntimeException
- on ???NamingException
- when context for the animation cannot be createdPropertyException
- when one of the user modified properties has the empty string as keypublic SimpleSimulator buildSimulator(Time startTime, Duration warmupPeriod, Duration runLength, ArrayList<Property<?>> userModifiedProperties) throws SimRuntimeException, NamingException, OTSSimulationException, PropertyException
buildSimulator
in interface WrappableSimulation
startTime
- 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 simulationuserModifiedProperties
- ArrayList<AbstractProperty<?>>; the (possibly user-modified) properties. This list must
contain all the properties returned by getProperties(); any additional properties may be ignoredSimRuntimeException
- on ???NamingException
- when context for the animation cannot be createdOTSSimulationException
- when the construction of the simulation, the control panel, the animation, or the charts
failsPropertyException
- when one of the user modified properties has the empty string as keyprotected abstract OTSModelInterface makeModel() throws OTSSimulationException
OTSSimulationException
- when the construction of the model failspublic final ArrayList<AbstractProperty<?>> getProperties()
getProperties
in interface WrappableSimulation
public final void setNextReplication(Integer nextReplication)
setNextReplication
in interface WrappableSimulation
nextReplication
- Integer; the next replication number, or null to use the built-in auto-incrementing replication
counterCopyright © 2014–2018 Delft University of Technology. All rights reserved.