Class StraightModel

java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.model.AbstractDSOLModel<Duration,org.opentrafficsim.core.dsol.OtsSimulatorInterface>
org.opentrafficsim.core.dsol.AbstractOtsModel
org.opentrafficsim.demo.StraightModel
All Implemented Interfaces:
Serializable, Remote, DSOLModel<Duration,org.opentrafficsim.core.dsol.OtsSimulatorInterface>, UNITS, org.djutils.event.EventProducer, org.opentrafficsim.core.dsol.OtsModelInterface

public class StraightModel extends org.opentrafficsim.core.dsol.AbstractOtsModel implements UNITS
Simulate a single lane road of 5 km length. Vehicles are generated at a constant rate of 1500 veh/hour. At time 300s a blockade is inserted at position 4 km; this blockade is removed at time 500s. The used car following algorithm is IDM+ Integrated Lane Change Model with Relaxation and Synchronization, by Wouter J. Schakel, Victor L. Knoop and Bart van Arem, 2012.
Output is a set of block charts:
  • Traffic density
  • Speed
  • Flow
  • Acceleration
All these graphs display simulation time along the horizontal axis and distance along the road along the vertical axis.

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:
Peter Knoppers
See Also:
  • Constructor Details

    • StraightModel

      public StraightModel(org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator)
      Parameters:
      simulator - OtsSimulatorInterface; the simulator for this model
  • Method Details

    • constructModel

      public final void constructModel() throws SimRuntimeException
      Specified by:
      constructModel in interface DSOLModel<Duration,org.opentrafficsim.core.dsol.OtsSimulatorInterface>
      Throws:
      SimRuntimeException
    • createBlock

      protected final void createBlock()
      Set up the block.
    • removeBlock

      protected final void removeBlock()
      Remove the block.
    • getNetwork

      public RoadNetwork getNetwork()
      Specified by:
      getNetwork in interface org.opentrafficsim.core.dsol.OtsModelInterface
    • getPath

      public final List<Lane> getPath()
      Returns:
      the path for sampling the graphs