public interface DefaultSimplePerception extends LaneBasedPerceptionCategory
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
Lane |
bestAccessibleAdjacentLane(Lane currentLane,
LateralDirectionality lateralDirection,
Length longitudinalPosition)
Determine whether there is a lane to the left or to the right of this lane, which is accessible from this lane, or null
if no lane could be found.
|
Map<Lane,Set<Lane>> |
getAccessibleAdjacentLanes(LateralDirectionality lateralDirection) |
Map<Lane,Set<Lane>> |
getAccessibleAdjacentLanesLeft() |
Map<Lane,Set<Lane>> |
getAccessibleAdjacentLanesRight() |
Headway |
getBackwardHeadway() |
Headway |
getForwardHeadwayGTU() |
Headway |
getForwardHeadwayObject() |
LanePathInfo |
getLanePathInfo()
Retrieve the last perceived lane path info.
|
Collection<Headway> |
getNeighboringHeadways(LateralDirectionality lateralDirection) |
Collection<Headway> |
getNeighboringHeadwaysLeft() |
Collection<Headway> |
getNeighboringHeadwaysRight() |
Collection<Headway> |
getParallelHeadways(LateralDirectionality lateralDirection) |
Collection<Headway> |
getParallelHeadwaysLeft() |
Collection<Headway> |
getParallelHeadwaysRight() |
Speed |
getSpeedLimit() |
default void |
updateAccessibleAdjacentLanes()
Update the accessible adjacent lanes.
|
void |
updateAccessibleAdjacentLanesLeft()
Update the accessible adjacent lanes on the left.
|
void |
updateAccessibleAdjacentLanesRight()
Update the accessible adjacent lanes on the right.
|
default void |
updateAll() |
void |
updateBackwardHeadway()
Update the backward headway and first object (e.g., a GTU) behind.
|
void |
updateForwardHeadwayGTU()
Update the forward headway and first object (a GTU) in front.
|
void |
updateForwardHeadwayObject()
Update the forward headway and first object (but not a GTU) in front.
|
void |
updateLanePathInfo() |
void |
updateNeighboringHeadways(LateralDirectionality lateralDirection)
Update the objects (e.g., GTUs) in parallel, in front and behind for the lane in the given direction, with their headway
relative to our GTU, and information about the status of the adjacent objects.
|
void |
updateNeighboringHeadwaysLeft()
Update the objects (e.g., GTUs) in parallel, in front and behind on the left neighboring lane, with their headway
relative to our GTU, and information about the status of the adjacent objects.
|
void |
updateNeighboringHeadwaysRight()
Update the objects (e.g., GTUs) in parallel, in front and behind on the right neighboring lane, with their headway
relative to our GTU, and information about the status of the adjacent objects.
|
void |
updateParallelHeadways(LateralDirectionality lateralDirection)
Update the parallel objects (e.g., GTUs) for the given direction, with information about their status and parallel
overlap with our GTU.
|
void |
updateParallelHeadwaysLeft()
Update the parallel objects (e.g., GTUs) on the left, with information about their status and parallel overlap with our
GTU.
|
void |
updateParallelHeadwaysRight()
Update the parallel objects (e.g., GTUs) on the right, with information about their status and parallel overlap with our
GTU.
|
void |
updateSpeedLimit()
Update speedLimit.
|
void updateLanePathInfo() throws GTUException, NetworkException, ParameterException
GTUException
- when the GTU was not initialized yet.NetworkException
- when the speed limit for a GTU type cannot be retrieved from the network.ParameterException
- in case of not being able to retrieve parameter ParameterTypes.LOOKAHEADvoid updateForwardHeadwayGTU() throws GTUException, NetworkException, ParameterException
GTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptionvoid updateForwardHeadwayObject() throws GTUException, NetworkException, ParameterException
GTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptionvoid updateBackwardHeadway() throws GTUException, ParameterException, NetworkException
GTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptiondefault void updateAccessibleAdjacentLanes() throws GTUException
GTUException
- when the GTU was not yet initializedvoid updateAccessibleAdjacentLanesLeft() throws GTUException
GTUException
- when the GTU was not yet initializedvoid updateAccessibleAdjacentLanesRight() throws GTUException
GTUException
- when the GTU was not yet initializedvoid updateNeighboringHeadwaysLeft() throws GTUException, ParameterException, NetworkException
GTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptionvoid updateNeighboringHeadwaysRight() throws GTUException, ParameterException, NetworkException
GTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptionvoid updateNeighboringHeadways(LateralDirectionality lateralDirection) throws GTUException, ParameterException, NetworkException
lateralDirection
- LateralDirectionality; the direction to update the parallel headway collection forGTUException
- when the GTU was not yet initializedParameterException
- if parameter is not defined or out of boundsNetworkException
- in case of network exceptionvoid updateParallelHeadwaysLeft() throws GTUException
GTUException
- when the GTU was not yet initializedvoid updateParallelHeadwaysRight() throws GTUException
GTUException
- when the GTU was not yet initializedvoid updateParallelHeadways(LateralDirectionality lateralDirection) throws GTUException
lateralDirection
- LateralDirectionality; the direction to return the neighboring headway collection forGTUException
- when the GTU was not yet initializedvoid updateSpeedLimit() throws GTUException, NetworkException
GTUException
- when the GTU was not yet initializedNetworkException
- in case of network exceptionLanePathInfo getLanePathInfo()
Headway getForwardHeadwayGTU()
Headway getForwardHeadwayObject()
Headway getBackwardHeadway()
Map<Lane,Set<Lane>> getAccessibleAdjacentLanesLeft()
Map<Lane,Set<Lane>> getAccessibleAdjacentLanesRight()
Map<Lane,Set<Lane>> getAccessibleAdjacentLanes(LateralDirectionality lateralDirection)
lateralDirection
- LateralDirectionality; the direction to return the accessible adjacent lane map forCollection<Headway> getNeighboringHeadwaysLeft()
Collection<Headway> getNeighboringHeadwaysRight()
Collection<Headway> getNeighboringHeadways(LateralDirectionality lateralDirection)
lateralDirection
- LateralDirectionality; the direction to return the parallel headway collection forCollection<Headway> getParallelHeadwaysLeft()
Collection<Headway> getParallelHeadwaysRight()
Collection<Headway> getParallelHeadways(LateralDirectionality lateralDirection)
lateralDirection
- LateralDirectionality; the direction to return the neighboring headway collection forSpeed getSpeedLimit()
default void updateAll() throws GTUException, ParameterException, NetworkException
updateAll
in interface PerceptionCategory<LaneBasedGTU,LanePerception>
GTUException
ParameterException
NetworkException
Lane bestAccessibleAdjacentLane(Lane currentLane, LateralDirectionality lateralDirection, Length longitudinalPosition)
currentLane
- Lane; the lane to look for the best accessible adjacent lanelateralDirection
- LateralDirectionality; the direction (LEFT, RIGHT) to look atlongitudinalPosition
- Length; the position of the GTU along currentLaneCopyright © 2014–2019 Delft University of Technology. All rights reserved.