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
ConstructorDescriptionHeadwayGenerator
(org.djunits.value.vdouble.scalar.Frequency demand, nl.tudelft.simulation.jstats.streams.StreamInterface stream) Constructor. -
Method Summary
-
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 interfaceGenerator<org.djunits.value.vdouble.scalar.Duration>
- Throws:
ProbabilityException
org.opentrafficsim.base.parameters.ParameterException
-