Class HeadwayGenerator

java.lang.Object
org.opentrafficsim.road.gtu.generator.headway.HeadwayGenerator
All Implemented Interfaces:
Generator<org.djunits.value.vdouble.scalar.Duration>

public class HeadwayGenerator extends Object implements Generator<org.djunits.value.vdouble.scalar.Duration>
Headway generator using independent arrivals (exponential distribution) at a fixed average rate.

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:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Summary

    Constructors
    Constructor
    Description
    HeadwayGenerator(org.djunits.value.vdouble.scalar.Frequency demand, nl.tudelft.simulation.jstats.streams.StreamInterface stream)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djunits.value.vdouble.scalar.Duration

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HeadwayGenerator

      public HeadwayGenerator(org.djunits.value.vdouble.scalar.Frequency demand, nl.tudelft.simulation.jstats.streams.StreamInterface stream)
      Constructor.
      Parameters:
      demand - Frequency; demand.
      stream - StreamInterface; the stream to use for generation.
  • Method Details

    • draw

      public org.djunits.value.vdouble.scalar.Duration draw() throws ProbabilityException, org.opentrafficsim.base.parameters.ParameterException
      Specified by:
      draw in interface Generator<org.djunits.value.vdouble.scalar.Duration>
      Throws:
      ProbabilityException
      org.opentrafficsim.base.parameters.ParameterException