Class GeneratorPositions.GeneratorLanePosition

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

public static final class GeneratorPositions.GeneratorLanePosition extends Object
Class representing a vehicle generation lane, providing elementary information for randomly drawing links and lanes.

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

    • GeneratorLanePosition

      GeneratorLanePosition(int laneNumber, LanePosition position, CrossSectionLink link)
      Constructor.
      Parameters:
      laneNumber - int; lane number, where 1 is the right-most lane
      position - LanePosition; position set, representing a single GTU position on the network
      link - CrossSectionLink; link
  • Method Details

    • getLaneNumber

      int getLaneNumber()
      Returns the lane number, where 1 is the right-most lane.
      Returns:
      lane number, where 1 is the right-most lane
    • allows

      boolean allows(GtuType gtuType)
      Returns whether this lane is accessible to the GTU type.
      Parameters:
      gtuType - GtuType; gtu type
      Returns:
      boolean; whether this lane is accessible to the GTU type
    • getPosition

      LanePosition getPosition()
      Returns the contained position set, representing a single GTU position on the network.
      Returns:
      LanePosition; contained position set, representing a single GTU position on the network
    • getLink

      CrossSectionLink getLink()
      Returns the link.
      Returns:
      CrossSectionLink; link
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object