Interface LaneStructureRecord
-
- All Superinterfaces:
LaneRecord<LaneStructureRecord>
- All Known Implementing Classes:
RollingLaneStructureRecord
public interface LaneStructureRecord extends LaneRecord<LaneStructureRecord>
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 13 aug. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
allowsRoute(Route route, GTUType gtuType)
Returns whether this lane allows the route to be followed.boolean
allowsRouteAtEnd(Route route, GTUType gtuType)
Returns whether the end of this lane allows the route to be followed.Node
getFromNode()
Returns the the 'from' node of the link belonging to this lane, in the driving direction.LaneStructureRecord
getLeft()
Returns the left LSR or null if not available.LaneStructureRecord
getRight()
Returns the right LSR or null if not available.Node
getToNode()
Returns the the 'to' node of the link belonging to this lane, in the driving direction.boolean
isCutOffEnd()
Returns whether this lane has no next records as the lane structure was cut-off.boolean
isCutOffStart()
Returns whether this lane has no previous records as the lane structure was cut-off.boolean
isDeadEnd()
Returns whether the record forms a dead-end.boolean
legalLeft()
Returns whether a left lane change is legal.boolean
legalRight()
Returns whether a right lane change is legal.boolean
physicalLeft()
Returns whether a left lane change is physically possible.boolean
physicalRight()
Returns whether a right lane change is physically possible.default boolean
possibleLeft(boolean legal)
Returns the left lane change possibility.default boolean
possibleRight(boolean legal)
Returns the right lane change possibility.-
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.LaneRecord
getDirection, getDistanceToPosition, getLane, getLength, getNext, getPrev, getStartDistance, isDownstreamBranch
-
-
-
-
Method Detail
-
getFromNode
Node getFromNode()
Returns the the 'from' node of the link belonging to this lane, in the driving direction.- Returns:
- Node; the 'from' node of the link belonging to this lane, in the driving direction
-
getToNode
Node getToNode()
Returns the the 'to' node of the link belonging to this lane, in the driving direction.- Returns:
- Node; the 'to' node of the link belonging to this lane, in the driving direction
-
getLeft
LaneStructureRecord getLeft()
Returns the left LSR or null if not available. Left and right are relative to the driving direction.- Returns:
- LaneStructureRecord; the left LSR or null if not available
-
getRight
LaneStructureRecord getRight()
Returns the right LSR or null if not available. Left and right are relative to the driving direction.- Returns:
- LaneStructureRecord; the right LSR or null if not available
-
legalLeft
boolean legalLeft()
Returns whether a left lane change is legal.- Returns:
- whether a left lane change is legal
-
legalRight
boolean legalRight()
Returns whether a right lane change is legal.- Returns:
- whether a right lane change is legal
-
physicalLeft
boolean physicalLeft()
Returns whether a left lane change is physically possible.- Returns:
- whether a left lane change is physically possible
-
physicalRight
boolean physicalRight()
Returns whether a right lane change is physically possible.- Returns:
- whether a right lane change is physically possible
-
possibleLeft
default boolean possibleLeft(boolean legal)
Returns the left lane change possibility.- Parameters:
legal
- boolean; legal, or otherwise physical, possibility- Returns:
- boolean; left lane change possibility
-
possibleRight
default boolean possibleRight(boolean legal)
Returns the right lane change possibility.- Parameters:
legal
- boolean; legal, or otherwise physical, possibility- Returns:
- boolean; right lane change possibility
-
isCutOffEnd
boolean isCutOffEnd()
Returns whether this lane has no next records as the lane structure was cut-off.- Returns:
- whether this lane has no next records as the lane structure was cut-off
-
isCutOffStart
boolean isCutOffStart()
Returns whether this lane has no previous records as the lane structure was cut-off.- Returns:
- whether this lane has no previous records as the lane structure was cut-off
-
isDeadEnd
boolean isDeadEnd()
Returns whether the record forms a dead-end.- Returns:
- whether the record forms a dead-end
-
allowsRoute
boolean allowsRoute(Route route, GTUType gtuType) throws NetworkException
Returns whether this lane allows the route to be followed.- Parameters:
route
- Route; the route to followgtuType
- GTUType; gtu type- Returns:
- whether this lane allows the route to be followed
- Throws:
NetworkException
- if no destination node
-
allowsRouteAtEnd
boolean allowsRouteAtEnd(Route route, GTUType gtuType) throws NetworkException
Returns whether the end of this lane allows the route to be followed.- Parameters:
route
- Route; the route to followgtuType
- GTUType; gtu type- Returns:
- whether the end of this lane allows the route to be followed
- Throws:
NetworkException
- if no destination node
-
-