Class GeneratorPositions.LaneBiases

java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.LaneBiases
Enclosing interface:
GeneratorPositions

public static final class GeneratorPositions.LaneBiases extends Object
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 Details

    • LaneBiases

      public LaneBiases()
  • Method Details

    • addBias

      Adds a GTU bias for randomly drawing a lane.
      Parameters:
      gtuType - GtuType; gtu type
      bias - LaneBias; bias
      Returns:
      LaneBiases; lane biases for method chaining
    • contains

      public boolean contains(GtuType gtuType)
      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

      public GeneratorPositions.LaneBias getBias(GtuType gtuType)
      Returns the bias of given GTU type, or Bias.None if none defined for the GTU type.
      Parameters:
      gtuType - GtuType; GTU type
      Returns:
      Bias; bias of the GTU type
    • toString

      public String toString()
      Overrides:
      toString in class Object