public class StrategiesDemo extends AbstractSimulationScript
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.
Modifier | Constructor and Description |
---|---|
protected |
StrategiesDemo(String[] properties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createGtu(Lane lane,
Length pos,
GTUType gtuType,
Speed initialSpeed,
OTSRoadNetwork net)
Creates a GTU.
|
static void |
main(String[] args)
Main method.
|
protected void |
setDefaultProperties() |
protected void |
setupDemo(OTSAnimationPanel animation,
OTSRoadNetwork network) |
protected OTSRoadNetwork |
setupSimulation(OTSSimulatorInterface sim) |
addTabs, animateNetwork, getBooleanProperty, getDoubleProperty, getDurationProperty, getGtuColorer, getIntegerProperty, getLongProperty, getNetwork, getProperty, getSimulator, getTimeProperty, notify, onSimulationEnd, setAnimationToggles, setGtuColorer, setProperty, start
protected StrategiesDemo(String[] properties)
properties
- String[]; propertiespublic static void main(String[] args)
args
- String[]; argumentsprotected void setDefaultProperties()
setDefaultProperties
in class AbstractSimulationScript
protected void setupDemo(OTSAnimationPanel animation, OTSRoadNetwork network)
setupDemo
in class AbstractSimulationScript
protected OTSRoadNetwork setupSimulation(OTSSimulatorInterface sim) throws Exception
setupSimulation
in class AbstractSimulationScript
Exception
public void createGtu(Lane lane, Length pos, GTUType gtuType, Speed initialSpeed, OTSRoadNetwork net) throws NamingException, GTUException, NetworkException, SimRuntimeException, OTSGeometryException
lane
- Lane; lanepos
- Length; positiongtuType
- GTUType; GTU typeinitialSpeed
- Speed; initial speednet
- OTSRoadNetwork; networkNamingException
- on exceptionGTUException
- on exceptionNetworkException
- on exceptionSimRuntimeException
- on exceptionOTSGeometryException
- on exceptionCopyright © 2014–2019 Delft University of Technology. All rights reserved.