Class StrategiesDemo

java.lang.Object
org.opentrafficsim.swing.script.AbstractSimulationScript
org.opentrafficsim.demo.strategies.StrategiesDemo
All Implemented Interfaces:
Serializable, Remote, EventListener, org.djutils.cli.Checkable, org.djutils.event.EventListener

public class StrategiesDemo extends AbstractSimulationScript
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
See Also:
  • Constructor Details

    • StrategiesDemo

      protected StrategiesDemo()
      Constructor.
  • Method Details

    • main

      public static void main(String[] args)
      Main method.
      Parameters:
      args - arguments
    • setupDemo

      protected void setupDemo(OtsAnimationPanel animation, org.opentrafficsim.road.network.RoadNetwork network)
      Overrides:
      setupDemo in class AbstractSimulationScript
    • setupSimulation

      protected org.opentrafficsim.road.network.RoadNetwork setupSimulation(org.opentrafficsim.core.dsol.OtsSimulatorInterface sim) throws Exception
      Specified by:
      setupSimulation in class AbstractSimulationScript
      Throws:
      Exception
    • createGtu

      public void createGtu(org.opentrafficsim.road.network.lane.Lane lane, org.djunits.value.vdouble.scalar.Length pos, org.opentrafficsim.core.gtu.GtuType gtuType, org.djunits.value.vdouble.scalar.Speed initialSpeed, org.opentrafficsim.road.network.RoadNetwork net) throws NamingException, org.opentrafficsim.core.gtu.GtuException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException
      Creates a GTU.
      Parameters:
      lane - lane
      pos - position
      gtuType - GTU type
      initialSpeed - initial speed
      net - network
      Throws:
      NamingException - on exception
      org.opentrafficsim.core.gtu.GtuException - on exception
      org.opentrafficsim.core.network.NetworkException - on exception
      nl.tudelft.simulation.dsol.SimRuntimeException - on exception