public class DirectDefaultSimplePerception extends LaneBasedAbstractPerceptionCategory implements DefaultSimplePerception
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 | Field and Description |
|---|---|
protected static ParameterTypeLength |
LOOKAHEAD
Look ahead parameter type.
|
protected static ParameterTypeLength |
LOOKBACKOLD
Look back parameter type.
|
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION| Constructor and Description |
|---|
DirectDefaultSimplePerception(LanePerception perception) |
| 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() |
TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanes(LateralDirectionality lateralDirection) |
TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesLeft() |
TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesRight() |
TimeStampedObject<Headway> |
getTimeStampedBackwardHeadway() |
TimeStampedObject<Headway> |
getTimeStampedForwardHeadwayGTU() |
TimeStampedObject<Headway> |
getTimeStampedForwardHeadwayObject() |
TimeStampedObject<LanePathInfo> |
getTimeStampedLanePathInfo()
Retrieve the time stamped last perceived lane path info.
|
TimeStampedObject<Collection<Headway>> |
getTimeStampedNeighboringHeadways(LateralDirectionality lateralDirection) |
TimeStampedObject<Collection<Headway>> |
getTimeStampedNeighboringHeadwaysLeft() |
TimeStampedObject<Collection<Headway>> |
getTimeStampedNeighboringHeadwaysRight() |
TimeStampedObject<Collection<Headway>> |
getTimeStampedParallelHeadways(LateralDirectionality lateralDirection) |
TimeStampedObject<Collection<Headway>> |
getTimeStampedParallelHeadwaysLeft() |
TimeStampedObject<Collection<Headway>> |
getTimeStampedParallelHeadwaysRight() |
TimeStampedObject<Speed> |
getTimeStampedSpeedLimit() |
String |
toString() |
void |
updateAccessibleAdjacentLanesLeft()
Update the accessible adjacent lanes on the left.
|
void |
updateAccessibleAdjacentLanesRight()
Update the accessible adjacent lanes on the right.
|
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.
|
getGtu, getObjectOrNull, getPerception, getTimestampclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitupdateAccessibleAdjacentLanes, updateAllprotected static final ParameterTypeLength LOOKAHEAD
protected static final ParameterTypeLength LOOKBACKOLD
public DirectDefaultSimplePerception(LanePerception perception)
perception - LanePerception; perceptionpublic final void updateLanePathInfo()
throws GTUException,
NetworkException,
ParameterException
updateLanePathInfo in interface DefaultSimplePerceptionGTUException - 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.LOOKAHEADpublic final void updateForwardHeadwayGTU()
throws GTUException,
NetworkException,
ParameterException
updateForwardHeadwayGTU in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedNetworkException - in case of network exceptionParameterException - if parameter is not defined or out of boundspublic final void updateForwardHeadwayObject()
throws GTUException,
NetworkException,
ParameterException
updateForwardHeadwayObject in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedNetworkException - in case of network exceptionParameterException - if parameter is not defined or out of boundspublic final void updateBackwardHeadway()
throws GTUException,
ParameterException,
NetworkException
updateBackwardHeadway in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedParameterException - if parameter is not defined or out of boundsNetworkException - in case of network exceptionpublic final void updateAccessibleAdjacentLanesLeft()
throws GTUException
updateAccessibleAdjacentLanesLeft in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedpublic final void updateAccessibleAdjacentLanesRight()
throws GTUException
updateAccessibleAdjacentLanesRight in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedpublic final void updateNeighboringHeadwaysLeft()
throws GTUException,
ParameterException,
NetworkException
updateNeighboringHeadwaysLeft in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedParameterException - if parameter is not defined or out of boundsNetworkException - in case of network exceptionpublic final void updateNeighboringHeadwaysRight()
throws GTUException,
ParameterException,
NetworkException
updateNeighboringHeadwaysRight in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedParameterException - if parameter is not defined or out of boundsNetworkException - in case of network exceptionpublic final void updateNeighboringHeadways(LateralDirectionality lateralDirection) throws GTUException, ParameterException, NetworkException
updateNeighboringHeadways in interface DefaultSimplePerceptionlateralDirection - 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 exceptionpublic final void updateParallelHeadwaysLeft()
throws GTUException
updateParallelHeadwaysLeft in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedpublic final void updateParallelHeadwaysRight()
throws GTUException
updateParallelHeadwaysRight in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedpublic final void updateParallelHeadways(LateralDirectionality lateralDirection) throws GTUException
updateParallelHeadways in interface DefaultSimplePerceptionlateralDirection - LateralDirectionality; the direction to return the neighboring headway collection forGTUException - when the GTU was not yet initializedpublic final void updateSpeedLimit()
throws GTUException,
NetworkException
updateSpeedLimit in interface DefaultSimplePerceptionGTUException - when the GTU was not yet initializedNetworkException - in case of network exceptionpublic final LanePathInfo getLanePathInfo()
getLanePathInfo in interface DefaultSimplePerceptionpublic final Headway getForwardHeadwayGTU()
getForwardHeadwayGTU in interface DefaultSimplePerceptionpublic final Headway getForwardHeadwayObject()
getForwardHeadwayObject in interface DefaultSimplePerceptionpublic final Headway getBackwardHeadway()
getBackwardHeadway in interface DefaultSimplePerceptionpublic final Map<Lane,Set<Lane>> getAccessibleAdjacentLanesLeft()
getAccessibleAdjacentLanesLeft in interface DefaultSimplePerceptionpublic final Map<Lane,Set<Lane>> getAccessibleAdjacentLanesRight()
getAccessibleAdjacentLanesRight in interface DefaultSimplePerceptionpublic final Map<Lane,Set<Lane>> getAccessibleAdjacentLanes(LateralDirectionality lateralDirection)
getAccessibleAdjacentLanes in interface DefaultSimplePerceptionlateralDirection - LateralDirectionality; the direction to return the accessible adjacent lane map forpublic final Collection<Headway> getNeighboringHeadwaysLeft()
getNeighboringHeadwaysLeft in interface DefaultSimplePerceptionpublic final Collection<Headway> getNeighboringHeadwaysRight()
getNeighboringHeadwaysRight in interface DefaultSimplePerceptionpublic final Collection<Headway> getNeighboringHeadways(LateralDirectionality lateralDirection)
getNeighboringHeadways in interface DefaultSimplePerceptionlateralDirection - LateralDirectionality; the direction to return the parallel headway collection forpublic final Collection<Headway> getParallelHeadwaysLeft()
getParallelHeadwaysLeft in interface DefaultSimplePerceptionpublic final Collection<Headway> getParallelHeadwaysRight()
getParallelHeadwaysRight in interface DefaultSimplePerceptionpublic final Collection<Headway> getParallelHeadways(LateralDirectionality lateralDirection)
getParallelHeadways in interface DefaultSimplePerceptionlateralDirection - LateralDirectionality; the direction to return the neighboring headway collection forpublic final Speed getSpeedLimit()
getSpeedLimit in interface DefaultSimplePerceptionpublic final TimeStampedObject<Headway> getTimeStampedForwardHeadwayGTU()
public final TimeStampedObject<Headway> getTimeStampedForwardHeadwayObject()
public final TimeStampedObject<Headway> getTimeStampedBackwardHeadway()
public final TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesLeft()
public final TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesRight()
public final TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanes(LateralDirectionality lateralDirection)
lateralDirection - LateralDirectionality; the direction to return the accessible adjacent lanes forpublic final TimeStampedObject<Collection<Headway>> getTimeStampedNeighboringHeadwaysLeft()
public final TimeStampedObject<Collection<Headway>> getTimeStampedNeighboringHeadwaysRight()
public final TimeStampedObject<Collection<Headway>> getTimeStampedNeighboringHeadways(LateralDirectionality lateralDirection)
lateralDirection - LateralDirectionality; the direction to return the neighboring headways forpublic final TimeStampedObject<Collection<Headway>> getTimeStampedParallelHeadwaysLeft()
public final TimeStampedObject<Collection<Headway>> getTimeStampedParallelHeadwaysRight()
public final TimeStampedObject<Collection<Headway>> getTimeStampedParallelHeadways(LateralDirectionality lateralDirection)
lateralDirection - LateralDirectionality; the direction to return the parallel headways forpublic final TimeStampedObject<Speed> getTimeStampedSpeedLimit()
public final TimeStampedObject<LanePathInfo> getTimeStampedLanePathInfo()
public final Lane bestAccessibleAdjacentLane(Lane currentLane, LateralDirectionality lateralDirection, Length longitudinalPosition)
bestAccessibleAdjacentLane in interface DefaultSimplePerceptioncurrentLane - 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.