Class GeneratorPositions.GeneratorLanePosition
- java.lang.Object
-
- org.opentrafficsim.road.gtu.generator.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 Summary
Constructors Constructor Description GeneratorLanePosition(int laneNumber, Set<DirectedLanePosition> position, CrossSectionLink link)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
allows(GTUType gtuType)
Returns whether this lane is accessible to the GTU type.(package private) GTUDirectionality
getDirection()
Returns the direction of travel.(package private) int
getLaneNumber()
Returns the lane number, where 1 is the right-most lane.(package private) CrossSectionLink
getLink()
Returns the link.(package private) Set<DirectedLanePosition>
getPosition()
Returns the contained position set, representing a single GTU position on the network.String
toString()
-
-
-
Constructor Detail
-
GeneratorLanePosition
GeneratorLanePosition(int laneNumber, Set<DirectedLanePosition> position, CrossSectionLink link)
Constructor.- Parameters:
laneNumber
- int; lane number, where 1 is the right-most laneposition
- Set<DirectedLanePosition>; position set, representing a single GTU position on the networklink
- 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
-
-