Class StraightModel

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

public class StraightModel extends 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-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Peter Knoppers
  • Constructor Details

    • StraightModel

      public StraightModel(OtsSimulatorInterface simulator)
      Constructor.
      Parameters:
      simulator - the simulator for this model
  • Method Details

    • constructModel

      public final void constructModel() throws nl.tudelft.simulation.dsol.SimRuntimeException
      Specified by:
      constructModel in interface nl.tudelft.simulation.dsol.model.DsolModel<Duration,OtsSimulatorInterface>
      Throws:
      nl.tudelft.simulation.dsol.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 OtsModelInterface
    • getPath

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