public abstract class AbstractLanePerception extends Object implements LanePerception
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
AbstractLanePerception()
Create a new LanePerception module.
|
| Modifier and Type | Method and Description |
|---|---|
Map<Lane,Set<Lane>> |
accessibleAdjacentLaneMap(org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
Lane |
bestAccessibleAdjacentLane(Lane currentLane,
org.opentrafficsim.core.network.LateralDirectionality lateralDirection,
org.djunits.value.vdouble.scalar.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>> |
getAccessibleAdjacentLanesLeft() |
Map<Lane,Set<Lane>> |
getAccessibleAdjacentLanesRight() |
Headway |
getBackwardHeadway() |
Headway |
getForwardHeadway() |
LaneBasedGTU |
getGTU() |
LanePathInfo |
getLanePathInfo()
Retrieve the last perceived lane path info.
|
Collection<Headway> |
getNeighboringHeadways(org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
Collection<Headway> |
getNeighboringHeadwaysLeft() |
Collection<Headway> |
getNeighboringHeadwaysRight() |
Collection<Headway> |
getParallelHeadways(org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
Collection<Headway> |
getParallelHeadwaysLeft() |
Collection<Headway> |
getParallelHeadwaysRight() |
Set<org.opentrafficsim.core.perception.PerceivedObject> |
getPerceivedObjects() |
org.djunits.value.vdouble.scalar.Speed |
getSpeedLimit() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesLeft() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesRight() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Headway> |
getTimeStampedBackwardHeadway() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Headway> |
getTimeStampedForwardHeadway() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> |
getTimeStampedNeighboringHeadwaysLeft() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> |
getTimeStampedNeighboringHeadwaysRight() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> |
getTimeStampedParallelHeadwaysLeft() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> |
getTimeStampedParallelHeadwaysRight() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<org.opentrafficsim.core.perception.PerceivedObject>> |
getTimeStampedPerceivedObjects() |
org.opentrafficsim.core.gtu.perception.TimeStampedObject<org.djunits.value.vdouble.scalar.Speed> |
getTimeStampedSpeedLimit() |
void |
setGTU(LaneBasedGTU laneBasedGtu)
Sets the GTU -- call this method before any call to the perceive() method!
|
void |
updateAccessibleAdjacentLanesLeft()
Build a set of Lanes that is adjacent to the given lane that this GTU can enter, for the left lateral direction.
|
void |
updateAccessibleAdjacentLanesRight()
Build a set of Lanes that is adjacent to the given lane that this GTU can enter, for the left lateral direction.
|
void |
updateBackwardHeadway()
Update who's behind us and how far away the nearest object (e.g., a GTU) is.
|
void |
updateForwardHeadway()
Update who's in front of us and how far away the nearest object (e.g., a GTU) is.
|
void |
updateLanePathInfo() |
void |
updateLaneTrafficLeft()
Update the information about the objects (e.g., GTUs) left of our GTU, and behind us or ahead on the left hand side.
|
void |
updateLaneTrafficRight()
Update the information about the objects (e.g., GTUs) right of our GTU, and behind us or ahead on the left hand side.
|
void |
updateParallelHeadwaysLeft()
Update the information about the objects (e.g., GTUs) parallel to our GTU on the left side.
|
void |
updateParallelHeadwaysRight()
Update the information about the objects (e.g., GTUs) parallel to our GTU on the right side.
|
void |
updateSpeedLimit()
Update the perceived speed limit.
|
public AbstractLanePerception()
public final void setGTU(LaneBasedGTU laneBasedGtu)
setGTU in interface LanePerceptionlaneBasedGtu - the GTU for which this is the perception modulepublic final void updateLanePathInfo()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
org.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when the speed limit for a GTU type cannot be retrieved from the network.org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException - in case of not being able to retrieve parameter ParameterTypes.LOOKAHEADpublic final void updateSpeedLimit()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException
updateSpeedLimit in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when the speed limit for a GTU type cannot be retreived from the network.public final void updateForwardHeadway()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
updateForwardHeadway in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when the headway cannot be determined for this GTU, usually due to routing problems.org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException - when there is a parameter problem, e.g., retrieving the forwardHeadwayDistance.public final void updateBackwardHeadway()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
updateBackwardHeadway in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when the headway cannot be determined for this GTU, usually due to routing problems.org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException - when there is a parameter problem, e.g., retrieving the backwardHeadwayDistance.public final void updateAccessibleAdjacentLanesLeft()
throws org.opentrafficsim.core.gtu.GTUException
updateAccessibleAdjacentLanesLeft in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.public final void updateAccessibleAdjacentLanesRight()
throws org.opentrafficsim.core.gtu.GTUException
updateAccessibleAdjacentLanesRight in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.public final void updateParallelHeadwaysLeft()
throws org.opentrafficsim.core.gtu.GTUException
updateParallelHeadwaysLeft in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.public final void updateParallelHeadwaysRight()
throws org.opentrafficsim.core.gtu.GTUException
updateParallelHeadwaysRight in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.public final void updateLaneTrafficLeft()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
updateLaneTrafficLeft in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when there is an inconsistency in the lanes on this networkorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException - when there is a parameter problem.public final void updateLaneTrafficRight()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
updateLaneTrafficRight in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.org.opentrafficsim.core.network.NetworkException - when there is an inconsistency in the lanes on this networkorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException - when there is a parameter problem.public final Map<Lane,Set<Lane>> accessibleAdjacentLaneMap(org.opentrafficsim.core.network.LateralDirectionality lateralDirection)
accessibleAdjacentLaneMap in interface LanePerceptionlateralDirection - the direction to return the accessible adjacent lane map forpublic final Collection<Headway> getNeighboringHeadways(org.opentrafficsim.core.network.LateralDirectionality lateralDirection)
getNeighboringHeadways in interface LanePerceptionlateralDirection - the direction to return the parallel headway collection forpublic final Collection<Headway> getParallelHeadways(org.opentrafficsim.core.network.LateralDirectionality lateralDirection)
getParallelHeadways in interface LanePerceptionlateralDirection - the direction to return the neighboring headway collection forpublic final Lane bestAccessibleAdjacentLane(Lane currentLane, org.opentrafficsim.core.network.LateralDirectionality lateralDirection, org.djunits.value.vdouble.scalar.Length longitudinalPosition)
currentLane - the lane to look for the best accessible adjacent lanelateralDirection - the direction (LEFT, RIGHT) to look atlongitudinalPosition - Length; the position of the GTU along currentLanepublic final LaneBasedGTU getGTU()
getGTU in interface LanePerceptionpublic final LanePathInfo getLanePathInfo()
public final Headway getForwardHeadway()
getForwardHeadway in interface LanePerceptionpublic final Headway getBackwardHeadway()
getBackwardHeadway in interface LanePerceptionpublic final Map<Lane,Set<Lane>> getAccessibleAdjacentLanesLeft()
getAccessibleAdjacentLanesLeft in interface LanePerceptionpublic final Map<Lane,Set<Lane>> getAccessibleAdjacentLanesRight()
getAccessibleAdjacentLanesRight in interface LanePerceptionpublic final Collection<Headway> getNeighboringHeadwaysLeft()
getNeighboringHeadwaysLeft in interface LanePerceptionpublic final Collection<Headway> getNeighboringHeadwaysRight()
getNeighboringHeadwaysRight in interface LanePerceptionpublic final Collection<Headway> getParallelHeadwaysLeft()
getParallelHeadwaysLeft in interface LanePerceptionpublic final Collection<Headway> getParallelHeadwaysRight()
getParallelHeadwaysRight in interface LanePerceptionpublic final org.djunits.value.vdouble.scalar.Speed getSpeedLimit()
getSpeedLimit in interface LanePerceptionpublic final Set<org.opentrafficsim.core.perception.PerceivedObject> getPerceivedObjects()
getPerceivedObjects in interface org.opentrafficsim.core.gtu.perception.Perceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Headway> getTimeStampedForwardHeadway()
getTimeStampedForwardHeadway in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Headway> getTimeStampedBackwardHeadway()
getTimeStampedBackwardHeadway in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesLeft()
getTimeStampedAccessibleAdjacentLanesLeft in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesRight()
getTimeStampedAccessibleAdjacentLanesRight in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> getTimeStampedNeighboringHeadwaysLeft()
getTimeStampedNeighboringHeadwaysLeft in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> getTimeStampedNeighboringHeadwaysRight()
getTimeStampedNeighboringHeadwaysRight in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> getTimeStampedParallelHeadwaysLeft()
getTimeStampedParallelHeadwaysLeft in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<Headway>> getTimeStampedParallelHeadwaysRight()
getTimeStampedParallelHeadwaysRight in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<org.djunits.value.vdouble.scalar.Speed> getTimeStampedSpeedLimit()
getTimeStampedSpeedLimit in interface LanePerceptionpublic final org.opentrafficsim.core.gtu.perception.TimeStampedObject<Collection<org.opentrafficsim.core.perception.PerceivedObject>> getTimeStampedPerceivedObjects() throws org.opentrafficsim.core.gtu.GTUException
getTimeStampedPerceivedObjects in interface org.opentrafficsim.core.gtu.perception.Perceptionorg.opentrafficsim.core.gtu.GTUExceptionCopyright © 2014–2016 Delft University of Technology. All rights reserved.