Class StrategiesDemo
java.lang.Object
org.opentrafficsim.swing.script.AbstractSimulationScript
org.opentrafficsim.demo.strategies.StrategiesDemo
- All Implemented Interfaces:
EventListener,Checkable,EventListener
Demo of lane change strategies.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates a GTU.static voidMain method.protected voidsetupDemo(OtsAnimationPanel animation, RoadNetwork network) protected RoadNetworkMethods inherited from class org.opentrafficsim.swing.script.AbstractSimulationScript
addTabs, animateNetwork, check, getGtuColorers, getGtuMarkers, getNetwork, getSeed, getSimulationTime, getSimulator, getStartTime, getWarmupTime, isAutorun, notify, onSimulationEnd, setAnimationToggles, setGtuColorers, start
-
Constructor Details
-
StrategiesDemo
protected StrategiesDemo()Constructor.
-
-
Method Details
-
main
Main method.- Parameters:
args- arguments
-
setupDemo
- Overrides:
setupDemoin classAbstractSimulationScript
-
setupSimulation
- Specified by:
setupSimulationin classAbstractSimulationScript- Throws:
Exception
-
createGtu
public void createGtu(Lane lane, Length pos, GtuType gtuType, Speed initialSpeed, RoadNetwork net) throws NamingException, GtuException, NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException Creates a GTU.- Parameters:
lane- lanepos- positiongtuType- GTU typeinitialSpeed- initial speednet- network- Throws:
NamingException- on exceptionGtuException- on exceptionNetworkException- on exceptionnl.tudelft.simulation.dsol.SimRuntimeException- on exception
-