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.Rel 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() |
HeadwayGTU |
getBackwardHeadwayGTU() |
HeadwayGTU |
getForwardHeadwayGTU() |
LaneBasedGTU |
getGTU() |
LanePathInfo |
getLanePathInfo()
Retrieve the last perceived lane path info.
|
Collection<HeadwayGTU> |
getNeighboringGTUsLeft() |
Collection<HeadwayGTU> |
getNeighboringGTUsRight() |
Set<LaneBasedGTU> |
getParallelGTUsLeft() |
Set<LaneBasedGTU> |
getParallelGTUsRight() |
Set<org.opentrafficsim.core.perception.PerceivedObject> |
getPerceivedObjects() |
org.djunits.value.vdouble.scalar.Speed |
getSpeedLimit() |
TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesLeft() |
TimeStampedObject<Map<Lane,Set<Lane>>> |
getTimeStampedAccessibleAdjacentLanesRight() |
TimeStampedObject<HeadwayGTU> |
getTimeStampedBackwardHeadwayGTU() |
TimeStampedObject<HeadwayGTU> |
getTimeStampedForwardHeadwayGTU() |
TimeStampedObject<Collection<HeadwayGTU>> |
getTimeStampedNeighboringGTUsLeft() |
TimeStampedObject<Collection<HeadwayGTU>> |
getTimeStampedNeighboringGTUsRight() |
TimeStampedObject<Set<LaneBasedGTU>> |
getTimeStampedParallelGTUsLeft() |
TimeStampedObject<Set<LaneBasedGTU>> |
getTimeStampedParallelGTUsRight() |
TimeStampedObject<Set<org.opentrafficsim.core.perception.PerceivedObject>> |
getTimeStampedPerceivedObjects() |
TimeStampedObject<org.djunits.value.vdouble.scalar.Speed> |
getTimeStampedSpeedLimit() |
Collection<HeadwayGTU> |
neighboringGTUCollection(org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
Set<LaneBasedGTU> |
parallelGTUs(org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
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 |
updateBackwardHeadwayGTU()
Update who's behind us and how far away the nearest GTU is.
|
void |
updateForwardHeadwayGTU()
Update who's in front of us and how far away the nearest GTU is.
|
void |
updateLanePathInfo() |
void |
updateLaneTrafficLeft()
Update the information about the GTUs left of our GTU, and behind us or ahead on the left hand side.
|
void |
updateLaneTrafficRight()
Update the information about the GTUs right of our GTU, and behind us or ahead on the left hand side.
|
void |
updateParallelGTUsLeft()
Update the information about the GTUs parallel to our GTU on the left side.
|
void |
updateParallelGTUsRight()
Update the information about the 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.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.public 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 updateForwardHeadwayGTU()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException
updateForwardHeadwayGTU 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.public final void updateBackwardHeadwayGTU()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException
updateBackwardHeadwayGTU 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.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 updateParallelGTUsLeft()
throws org.opentrafficsim.core.gtu.GTUException
updateParallelGTUsLeft in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when the GTU was not initialized yet.public final void updateParallelGTUsRight()
throws org.opentrafficsim.core.gtu.GTUException
updateParallelGTUsRight 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
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 networkpublic final void updateLaneTrafficRight()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException
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 networkpublic 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 Set<LaneBasedGTU> parallelGTUs(org.opentrafficsim.core.network.LateralDirectionality lateralDirection)
parallelGTUs in interface LanePerceptionlateralDirection - the direction to return the parallel GTU map forpublic final Collection<HeadwayGTU> neighboringGTUCollection(org.opentrafficsim.core.network.LateralDirectionality lateralDirection)
neighboringGTUCollection in interface LanePerceptionlateralDirection - the direction to return the neighboring GTU collection forpublic final Lane bestAccessibleAdjacentLane(Lane currentLane, org.opentrafficsim.core.network.LateralDirectionality lateralDirection, org.djunits.value.vdouble.scalar.Length.Rel longitudinalPosition)
currentLane - the lane to look for the best accessible adjacent lanelateralDirection - the direction (LEFT, RIGHT) to look atlongitudinalPosition - Length.Rel; the position of the GTU along currentLanepublic final LaneBasedGTU getGTU()
getGTU in interface LanePerceptionpublic final LanePathInfo getLanePathInfo()
public final HeadwayGTU getForwardHeadwayGTU()
getForwardHeadwayGTU in interface LanePerceptionpublic final HeadwayGTU getBackwardHeadwayGTU()
getBackwardHeadwayGTU 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<HeadwayGTU> getNeighboringGTUsLeft()
getNeighboringGTUsLeft in interface LanePerceptionpublic final Collection<HeadwayGTU> getNeighboringGTUsRight()
getNeighboringGTUsRight in interface LanePerceptionpublic final Set<LaneBasedGTU> getParallelGTUsLeft()
getParallelGTUsLeft in interface LanePerceptionpublic final Set<LaneBasedGTU> getParallelGTUsRight()
getParallelGTUsRight 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 TimeStampedObject<HeadwayGTU> getTimeStampedForwardHeadwayGTU()
getTimeStampedForwardHeadwayGTU in interface LanePerceptionpublic final TimeStampedObject<HeadwayGTU> getTimeStampedBackwardHeadwayGTU()
getTimeStampedBackwardHeadwayGTU in interface LanePerceptionpublic final TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesLeft()
getTimeStampedAccessibleAdjacentLanesLeft in interface LanePerceptionpublic final TimeStampedObject<Map<Lane,Set<Lane>>> getTimeStampedAccessibleAdjacentLanesRight()
getTimeStampedAccessibleAdjacentLanesRight in interface LanePerceptionpublic final TimeStampedObject<Collection<HeadwayGTU>> getTimeStampedNeighboringGTUsLeft()
getTimeStampedNeighboringGTUsLeft in interface LanePerceptionpublic final TimeStampedObject<Collection<HeadwayGTU>> getTimeStampedNeighboringGTUsRight()
getTimeStampedNeighboringGTUsRight in interface LanePerceptionpublic final TimeStampedObject<Set<LaneBasedGTU>> getTimeStampedParallelGTUsLeft()
getTimeStampedParallelGTUsLeft in interface LanePerceptionpublic final TimeStampedObject<Set<LaneBasedGTU>> getTimeStampedParallelGTUsRight()
getTimeStampedParallelGTUsRight in interface LanePerceptionpublic final TimeStampedObject<org.djunits.value.vdouble.scalar.Speed> getTimeStampedSpeedLimit()
getTimeStampedSpeedLimit in interface LanePerceptionpublic TimeStampedObject<Set<org.opentrafficsim.core.perception.PerceivedObject>> getTimeStampedPerceivedObjects() throws org.opentrafficsim.core.gtu.GTUException
getTimeStampedPerceivedObjects in interface LanePerceptionorg.opentrafficsim.core.gtu.GTUException - when GTU was not initializedCopyright © 2014–2016 Delft University of Technology. All rights reserved.