Class LanePathInfo
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.LanePathInfo
- All Implemented Interfaces:
java.io.Serializable
public class LanePathInfo
extends java.lang.Object
implements java.io.Serializable
This class provides the following information for an operational plan:
- the lanes to follow, with the direction to drive on them
- the starting point on the first lane
- the path to follow when staying on the same lane
Copyright (c) 2013-2020 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
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description LanePathInfo(OTSLine3D path, java.util.List<LaneDirection> laneDirectionList, Length referencePosition)
-
Method Summary
Modifier and Type Method Description java.util.List<LaneDirection>
getLaneDirectionList()
java.util.List<Lane>
getLanes()
OTSLine3D
getPath()
Lane
getReferenceLane()
The reference lane is the widest lane on which the reference point of the GTU is fully registered.LaneDirection
getReferenceLaneDirection()
The reference lane is the widest lane on which the reference point of the GTU is fully registered.Length
getReferencePosition()
java.lang.String
toString()
-
Constructor Details
-
LanePathInfo
public LanePathInfo(OTSLine3D path, java.util.List<LaneDirection> laneDirectionList, Length referencePosition)- Parameters:
path
- OTSLine3D; the path it the GTU keeps driving in the same lane, and follows the route if possible in the same lane. The path stops when the lane or a continuation lane does not lead in the direction of the route provided by the strategical planner.laneDirectionList
- List<LaneDirection>; the current lane on which the reference point of the GTU is registered (if the GTU is registered on multiple lanes with the reference point, one lane is chosen where the reference point has a fractional lane position between 0.0 and 1.0), and consecutive lanes that follow the route if possible in the same lane. The list of lanes stops when a continuation lane does not lead in the direction of the route provided by the strategical planner. For each lane, the direction to drive is provided.referencePosition
- Length; the start point on the first lane in the laneDirectionList. When this is a point that represents a GTU position, it should represent the reference point of the GTU.
-
-
Method Details
-
getPath
- Returns:
- path the path it the GTU keeps driving in the same lane, and follows the route if possible in the same lane. The path stops when the lane or a continuation lane does not lead in the direction of the route provided by the strategical planner.
-
getLaneDirectionList
- Returns:
- laneList the current lane on which the reference point of the GTU is registered (if the GTU is registered on multiple lanes with the reference point, one lane is chosen where the reference point has a fractional lane position between 0.0 and 1.0), and consecutive lanes that follow the route if possible in the same lane. The list of lanes stops when a continuation lane does not lead in the direction of the route provided by the strategical planner. For each lane, the direction to drive is provided.
-
getLanes
- Returns:
- list of lanes
-
getReferenceLaneDirection
The reference lane is the widest lane on which the reference point of the GTU is fully registered.- Returns:
- the reference lane on which the GTU is registered, plus the driving direction on this lane, or null if the GTU is not registered on any lane.
-
getReferenceLane
The reference lane is the widest lane on which the reference point of the GTU is fully registered.- Returns:
- the reference lane on which the GTU is registered, or null if the GTU is not registered on any lane.
-
getReferencePosition
- Returns:
- the start point on the first lane in the laneDirectionList. When this is a point that represents a GTU position, it should represent the reference point of the GTU.
-
toString
public final java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-