Class GeneratorPositions.LaneBiases
java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.LaneBiases
- Enclosing interface:
- GeneratorPositions
Set of lane biases per GTU type.
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
-
Method Summary
Modifier and TypeMethodDescriptionaddBias
(GtuType gtuType, GeneratorPositions.LaneBias bias) Adds a GTU bias for randomly drawing a lane.boolean
Whether a bias is defined for the given type.Returns the bias of given GTU type, orBias.None
if none defined for the GTU type.toString()
-
Constructor Details
-
LaneBiases
public LaneBiases()
-
-
Method Details
-
addBias
Adds a GTU bias for randomly drawing a lane.- Parameters:
gtuType
- GtuType; gtu typebias
- LaneBias; bias- Returns:
- LaneBiases; lane biases for method chaining
-
contains
Whether a bias is defined for the given type.- Parameters:
gtuType
- GtuType; GTU type- Returns:
- whether a bias is defined for the given type
-
getBias
Returns the bias of given GTU type, orBias.None
if none defined for the GTU type.- Parameters:
gtuType
- GtuType; GTU type- Returns:
- Bias; bias of the GTU type
-
toString
-