public abstract class AbstractDelayedNeighborsPerception extends AbstractDelayedPerceptionCategory implements NeighborsPerception
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 | Class and Description |
|---|---|
static class |
AbstractDelayedNeighborsPerception.NeighborsInfoType<T>
Delayed information about the type of the neighbors.
|
AbstractDelayedPerceptionCategory.DelayedInfoType<T>| Modifier and Type | Field and Description |
|---|---|
static AbstractDelayedNeighborsPerception.NeighborsInfoType<SortedSet<RelativeLane>> |
CROSSSECTION
Info type id for cross-section.
|
protected static ParameterTypeDuration |
DT
Time step parameter type.
|
static String |
FIRSTFOLLOWERS
Info type id base for first followers.
|
static String |
FIRSTLEADERS
Info type id base for first leaders.
|
static String |
FOLLOWERS
Info type id base for followers.
|
static String |
GTUALONGSIDE
Info type id base for gtu alongside.
|
static String |
LEADERS
Info type id base for leaders.
|
static AbstractDelayedNeighborsPerception.NeighborsInfoType<Length> |
ODOMETER
Id for odometer info type.
|
protected static ParameterTypeDuration |
TR
Reaction time parameter type.
|
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION| Constructor and Description |
|---|
AbstractDelayedNeighborsPerception(LanePerception perception)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SortedSet<RelativeLane> |
getDelayedCrossSection()
Returns the cross-section on which the most recent observed neighbors were determined.
|
boolean |
isGtuAlongsideOverride(LateralDirectionality lat)
Returns whether to override the gtu alongside boolean as true.
|
void |
updateAll() |
protected void |
updateAllDelayed()
Performs actual update.
|
void |
updateFirstFollowers(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(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(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.
|
changeLane, getInfo, getInfo, setInfo, setInfogetGtu, getObjectOrNull, getPerception, getTimestampclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFirstFollowers, getFirstLeaders, getFollowers, getLeaders, isGtuAlongsideprotected static final ParameterTypeDuration TR
protected static final ParameterTypeDuration DT
public static final String FIRSTLEADERS
public static final String FIRSTFOLLOWERS
public static final String GTUALONGSIDE
public static final String LEADERS
public static final String FOLLOWERS
public static final AbstractDelayedNeighborsPerception.NeighborsInfoType<SortedSet<RelativeLane>> CROSSSECTION
public static final AbstractDelayedNeighborsPerception.NeighborsInfoType<Length> ODOMETER
public AbstractDelayedNeighborsPerception(LanePerception perception)
perception - LanePerception; perceptionpublic final void updateAll()
throws GTUException,
NetworkException,
ParameterException
updateAll in interface PerceptionCategory<LaneBasedGTU,LanePerception>GTUExceptionNetworkExceptionParameterExceptionpublic final boolean isGtuAlongsideOverride(LateralDirectionality lat)
lat - LateralDirectionality; lateral directionprotected void updateAllDelayed()
throws GTUException,
NetworkException,
ParameterException
ParameterException - if parameter is not present or is given a wrong valueNetworkException - on error in the networkGTUException - if not initializedpublic final void updateFirstLeaders(LateralDirectionality lat) throws ParameterException, GTUException, NetworkException
updateFirstLeaders in interface NeighborsPerceptionlat - LateralDirectionality; LEFT or RIGHTParameterException - if a parameter was not present or out of boundsGTUException - if the GTU was not initializedNetworkException - in case of a network exceptionpublic final void updateFirstFollowers(LateralDirectionality lat) throws GTUException, ParameterException, NetworkException
updateFirstFollowers in interface NeighborsPerceptionlat - LateralDirectionality; LEFT or RIGHTGTUException - if the GTU was not initializedParameterException - if a parameter was not present or out of boundsNetworkException - in case of a network exceptionpublic final void updateGtuAlongside(LateralDirectionality lat) throws GTUException, ParameterException
updateGtuAlongside in interface NeighborsPerceptionlat - LateralDirectionality; LEFT or RIGHTGTUException - if the GTU was not initializedParameterException - if parameter is not definedpublic final void updateLeaders(RelativeLane lane) throws ParameterException, GTUException, NetworkException
updateLeaders in interface NeighborsPerceptionlane - RelativeLane; relative lateral laneParameterException - if a parameter was not present or out of boundsGTUException - if the GRU was not initializedNetworkException - in case of a network exceptionpublic final void updateFollowers(RelativeLane lane) throws GTUException, NetworkException, ParameterException
updateFollowers in interface NeighborsPerceptionlane - RelativeLane; relative lateral laneGTUException - if the GRU was not initializedNetworkException - in case of a network exceptionParameterException - if a parameter was not present or out of boundspublic final SortedSet<RelativeLane> getDelayedCrossSection()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.