Class GeneratorPositions.GeneratorLinkPosition

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

public static final class GeneratorPositions.GeneratorLinkPosition extends Object
Class representing a vehicle generation link to provide individual generation positions.

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

  • Method Details

    • getLink

      Link getLink()
      Return the link.
      Returns:
      link
    • getWeight

      double getWeight(GtuType gtuType)
      Returns the weight for this link. This is either a predefined weight, or the number of lanes for the GTU type.
      Parameters:
      gtuType - GTU type
      Returns:
      weight for this link
    • getViaNode

      Node getViaNode()
      Returns the node by which a connector connects.
      Returns:
      the node by which a connector connects
    • getNumberOfLanes

      int getNumberOfLanes(GtuType gtuType)
      Returns the number of accessible lanes for the GTU type.
      Parameters:
      gtuType - GTU type
      Returns:
      number of accessible lanes for the GTU type
    • draw

      GeneratorPositions.GeneratorLanePosition draw(GtuType gtuType, Map<Integer,Integer> unplaced, org.djunits.value.vdouble.scalar.Speed desiredSpeed)
      Draws a specific GeneratorLanePosition utilizing lane biases of GTU types.
      Parameters:
      gtuType - GTU type
      unplaced - number of unplaced GTUs per lane. The lane number should match with GeneratorLanePosition.getLaneNumber(), where 1 is the right-most lane. Missing lanes are assumed to have no queue.
      desiredSpeed - desired speed, possibly used to determine the biased road position
      Returns:
      specific GeneratorLanePosition utilizing lane biases of GTU types
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • speedLimit

      public org.djunits.value.vdouble.scalar.Speed speedLimit(GtuType gtuType)
      Parameters:
      gtuType - GTU type
      Returns:
      speed limit