Class GeneratorPositions.GeneratorLanePosition

  • Enclosing class:
    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-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version 23 dec. 2017
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • GeneratorLanePosition

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

      • 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

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

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

        GTUDirectionality getDirection()
        Returns the direction of travel.
        Returns:
        GTUDirectionality; direction of travel