public class DirectNeighborsPerception extends LaneBasedAbstractPerceptionCategory implements NeighborsPerception
Copyright (c) 2013-2018 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 org.opentrafficsim.base.parameters.ParameterTypeLength |
LOOKAHEAD
Look ahead parameter type.
|
protected static org.opentrafficsim.base.parameters.ParameterTypeLength |
LOOKBACK
Look back parameter type.
|
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION| Constructor and Description |
|---|
DirectNeighborsPerception(LanePerception perception,
HeadwayGtuType headwayGtuType) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<HeadwayGTU> |
getFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat)
Set of followers on a lane, which is usually 0 or 1, but possibly more in case of an upstream merge with no intermediate
GTU.
|
SortedSet<HeadwayGTU> |
getFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat)
Set of leaders on a lane, which is usually 0 or 1, but possibly more in case of a downstream split with no intermediate
GTU.
|
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> |
getFollowers(RelativeLane lane)
Set of followers on a lane, including adjacent GTU's who's FRONT is back of the own vehicle FRONT.
|
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> |
getLeaders(RelativeLane lane)
Set of leaders on a lane, including adjacent GTU's who's FRONT is ahead of the own vehicle FRONT.
|
org.opentrafficsim.base.TimeStampedObject<SortedSet<HeadwayGTU>> |
getTimeStampedFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat)
Set of followers on a lane, which is usually 0 or 1, but possibly more in case of an upstream merge with no intermediate
GTU.
|
org.opentrafficsim.base.TimeStampedObject<SortedSet<HeadwayGTU>> |
getTimeStampedFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat)
Set of leaders on a lane, which is usually 0 or 1, but possibly more in case of a downstream split with no intermediate
GTU.
|
org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayGTU,LaneBasedGTU>> |
getTimeStampedFollowers(RelativeLane lane)
Set of followers on a lane, including adjacent GTU's who's REAR is back of the own vehicle REAR.
|
org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayGTU,LaneBasedGTU>> |
getTimeStampedLeaders(RelativeLane lane)
Set of leaders on a lane, including adjacent GTU's who's FRONT is ahead of the own vehicle FRONT.
|
boolean |
isGtuAlongside(org.opentrafficsim.core.network.LateralDirectionality lat)
Whether there is a GTU alongside, i.e.
|
org.opentrafficsim.base.TimeStampedObject<Boolean> |
isGtuAlongsideTimeStamped(org.opentrafficsim.core.network.LateralDirectionality lat)
Whether there is a GTU alongside, i.e.
|
String |
toString() |
void |
updateAll() |
void |
updateFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat)
Update set of followers on a lane, which is usually 0 or 1, but possibly more in case of an upstream merge with no
intermediate GTU.
|
void |
updateFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat)
Update set of leaders on a lane, which is usually 0 or 1, but possibly more in case of a downstream split with no
intermediate GTU.
|
void |
updateFollowers(RelativeLane lane)
Update set of followers on a lane, including adjacent GTU's who's FRONT is back of the own vehicle FRONT.
|
void |
updateGtuAlongside(org.opentrafficsim.core.network.LateralDirectionality lat)
Update whether there is a GTU alongside, i.e.
|
void |
updateLeaders(RelativeLane lane)
Update set of leaders on a lane, including adjacent GTU's who's FRONT is ahead of the own vehicle FRONT.
|
protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKAHEAD
protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKBACK
public DirectNeighborsPerception(LanePerception perception, HeadwayGtuType headwayGtuType)
perception - perceptionheadwayGtuType - type of headway gtu to generatepublic final void updateAll()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException,
org.opentrafficsim.base.parameters.ParameterException
updateAll in interface org.opentrafficsim.core.gtu.perception.PerceptionCategory<LaneBasedGTU,LanePerception>org.opentrafficsim.core.gtu.GTUExceptionorg.opentrafficsim.core.network.NetworkExceptionorg.opentrafficsim.base.parameters.ParameterExceptionpublic final void updateFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat)
throws org.opentrafficsim.base.parameters.ParameterException,
org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.core.network.NetworkException
updateFirstLeaders in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if a parameter was not present or out of boundsorg.opentrafficsim.core.gtu.GTUException - if the GTU was not initializedorg.opentrafficsim.core.network.NetworkException - in case of a network exceptionpublic final void updateFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat)
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.base.parameters.ParameterException,
org.opentrafficsim.core.network.NetworkException
updateFirstFollowers in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.core.gtu.GTUException - if the GTU was not initializedorg.opentrafficsim.base.parameters.ParameterException - if a parameter was not present or out of boundsorg.opentrafficsim.core.network.NetworkException - in case of a network exceptionpublic final void updateGtuAlongside(org.opentrafficsim.core.network.LateralDirectionality lat)
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.base.parameters.ParameterException
updateGtuAlongside in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.core.gtu.GTUException - if the GTU was not initializedorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedpublic final void updateLeaders(RelativeLane lane) throws org.opentrafficsim.base.parameters.ParameterException, org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException
updateLeaders in interface NeighborsPerceptionlane - relative lateral laneorg.opentrafficsim.base.parameters.ParameterException - if a parameter was not present or out of boundsorg.opentrafficsim.core.gtu.GTUException - if the GRU was not initializedorg.opentrafficsim.core.network.NetworkException - in case of a network exceptionpublic final void updateFollowers(RelativeLane lane) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.base.parameters.ParameterException
updateFollowers in interface NeighborsPerceptionlane - relative lateral laneorg.opentrafficsim.core.gtu.GTUException - if the GRU was not initializedorg.opentrafficsim.core.network.NetworkException - in case of a network exceptionorg.opentrafficsim.base.parameters.ParameterException - if a parameter was not present or out of boundspublic final SortedSet<HeadwayGTU> getFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, NullPointerException, IllegalArgumentException
| |
_________/B/_____
_ _?_ _ _~_ _C_ _
_ _A_ _ _ _ _ _ _
_________________
Only vehicles who's rear is beyond the own front are considered, no alongside vehicles.getFirstLeaders in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final SortedSet<HeadwayGTU> getFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, NullPointerException, IllegalArgumentException
| |
|C|
________\ \______
_ _B_|_ _ _ _ _?_
_ _ _|_ _ _ _ _A_
_____|___________
Only vehicles who's front is before the own rear are considered, no alongside vehicles.getFirstFollowers in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final boolean isGtuAlongside(org.opentrafficsim.core.network.LateralDirectionality lat)
throws org.opentrafficsim.base.parameters.ParameterException,
NullPointerException,
IllegalArgumentException
isGtuAlongside in interface NeighborsPerceptionlat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final PerceptionCollectable<HeadwayGTU,LaneBasedGTU> getLeaders(RelativeLane lane)
getLeaders in interface NeighborsPerceptionlane - relative lateral lanepublic final PerceptionCollectable<HeadwayGTU,LaneBasedGTU> getFollowers(RelativeLane lane)
getFollowers in interface NeighborsPerceptionlane - relative lateral lanepublic final org.opentrafficsim.base.TimeStampedObject<SortedSet<HeadwayGTU>> getTimeStampedFirstLeaders(org.opentrafficsim.core.network.LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, NullPointerException, IllegalArgumentException
| |
_________/B/_____
_ _?_ _ _~_ _C_ _
_ _A_ _ _ _ _ _ _
_________________
lat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final org.opentrafficsim.base.TimeStampedObject<SortedSet<HeadwayGTU>> getTimeStampedFirstFollowers(org.opentrafficsim.core.network.LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, NullPointerException, IllegalArgumentException
| |
|C|
________\ \______
_ _B_|_ _ _ _ _?_
_ _ _|_ _ _ _ _A_
_____|___________
lat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final org.opentrafficsim.base.TimeStampedObject<Boolean> isGtuAlongsideTimeStamped(org.opentrafficsim.core.network.LateralDirectionality lat) throws org.opentrafficsim.base.parameters.ParameterException, NullPointerException, IllegalArgumentException
lat - LEFT or RIGHTorg.opentrafficsim.base.parameters.ParameterException - if parameter is not definedNullPointerException - if lat is nullIllegalArgumentException - if lat is NONEpublic final org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayGTU,LaneBasedGTU>> getTimeStampedLeaders(RelativeLane lane)
lane - relative lateral lanepublic final org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayGTU,LaneBasedGTU>> getTimeStampedFollowers(RelativeLane lane)
lane - relative lateral laneCopyright © 2014–2018 Delft University of Technology. All rights reserved.