Class StrategiesDemo
java.lang.Object
org.opentrafficsim.swing.script.AbstractSimulationScript
org.opentrafficsim.demo.strategies.StrategiesDemo
- All Implemented Interfaces:
Serializable,Remote,EventListener,Checkable,org.djutils.event.EventListener
Demo of lane change strategies.
Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classPerception factory.(package private) classIDM factory with socio speed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateGtu(Lane lane, Length pos, org.opentrafficsim.core.gtu.GtuType gtuType, Speed initialSpeed, RoadNetwork net) Creates a GTU.static voidMain method.protected voidsetupDemo(OtsAnimationPanel animation, RoadNetwork network) protected RoadNetworksetupSimulation(org.opentrafficsim.core.dsol.OtsSimulatorInterface sim) Methods inherited from class org.opentrafficsim.swing.script.AbstractSimulationScript
addTabs, animateNetwork, check, getGtuColorer, getNetwork, getSeed, getSimulationTime, getSimulator, getStartTime, getWarmupTime, isAutorun, notify, onSimulationEnd, setAnimationToggles, setGtuColorer, start
-
Constructor Details
-
StrategiesDemo
protected StrategiesDemo()Constructor.
-
-
Method Details
-
main
Main method.- Parameters:
args- String[]; arguments
-
setupDemo
- Overrides:
setupDemoin classAbstractSimulationScript
-
setupSimulation
protected RoadNetwork setupSimulation(org.opentrafficsim.core.dsol.OtsSimulatorInterface sim) throws Exception - Specified by:
setupSimulationin classAbstractSimulationScript- Throws:
Exception
-
createGtu
public void createGtu(Lane lane, Length pos, org.opentrafficsim.core.gtu.GtuType gtuType, Speed initialSpeed, RoadNetwork net) throws NamingException, org.opentrafficsim.core.gtu.GtuException, org.opentrafficsim.core.network.NetworkException, SimRuntimeException, org.opentrafficsim.core.geometry.OtsGeometryException Creates a GTU.- Parameters:
lane- Lane; lanepos- Length; positiongtuType- GtuType; GTU typeinitialSpeed- Speed; initial speednet- RoadNetwork; network- Throws:
NamingException- on exceptionorg.opentrafficsim.core.gtu.GtuException- on exceptionorg.opentrafficsim.core.network.NetworkException- on exceptionSimRuntimeException- on exceptionorg.opentrafficsim.core.geometry.OtsGeometryException- on exception
-