Class GeneratorPositions.GeneratorLanePosition
java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.GeneratorLanePosition
- Enclosing interface:
- GeneratorPositions
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 Summary
ConstructorDescriptionGeneratorLanePosition
(int laneNumber, LanePosition position, CrossSectionLink link) Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
Returns whether this lane is accessible to the GTU type.boolean
(package private) int
Returns the lane number, where 1 is the right-most lane.(package private) CrossSectionLink
getLink()
Returns the link.(package private) LanePosition
Returns the contained position set, representing a single GTU position on the network.int
hashCode()
toString()
-
Constructor Details
-
GeneratorLanePosition
GeneratorLanePosition(int laneNumber, LanePosition position, CrossSectionLink link) Constructor.- Parameters:
laneNumber
- int; lane number, where 1 is the right-most laneposition
- LanePosition; position set, representing a single GTU position on the networklink
- 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
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() -
equals
-
toString
-