Package org.opentrafficsim.ahfe
Class AbstractDelayedPerceptionCategory
java.lang.Object
org.opentrafficsim.base.Type<AbstractPerceptionCategory<G,P>>
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory<LaneBasedGTU,LanePerception>
org.opentrafficsim.road.gtu.lane.perception.categories.LaneBasedAbstractPerceptionCategory
org.opentrafficsim.ahfe.AbstractDelayedPerceptionCategory
- All Implemented Interfaces:
java.io.Serializable,PerceptionCategory<LaneBasedGTU,LanePerception>,LaneBasedPerceptionCategory
- Direct Known Subclasses:
AbstractDelayedNeighborsPerception
@Deprecated public abstract class AbstractDelayedPerceptionCategory extends LaneBasedAbstractPerceptionCategory implements LaneBasedPerceptionCategory
Deprecated.
Utility superclass for perception categories with single delayed snapshots.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 14 feb. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractDelayedPerceptionCategory.DelayedInfoType<T>Deprecated.Superclass for delayed info. -
Field Summary
Fields inherited from class org.opentrafficsim.road.gtu.lane.perception.categories.LaneBasedAbstractPerceptionCategory
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION -
Constructor Summary
Constructors Constructor Description AbstractDelayedPerceptionCategory(LanePerception perception)Deprecated. -
Method Summary
Modifier and Type Method Description voidchangeLane(LateralDirectionality dir)Deprecated.Move data coupled to a lane to another lane to account for a lane change.<T> TimeStampedObject<T>getInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType)Deprecated.Returns the most recent info of the given type, that is older than the delay.<T> TimeStampedObject<T>getInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, RelativeLane lane)Deprecated.Returns the most recent info of the given type, that is older than the delay.<T> voidsetInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, TimeStampedObject<T> info)Deprecated.Set info of given delayed info type, not pertaining to any lane.<T> voidsetInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, RelativeLane lane, TimeStampedObject<T> info)Deprecated.Set info of given delayed info type, pertaining to a lane.Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.categories.LaneBasedAbstractPerceptionCategory
computeIfAbsent, computeIfAbsent, computeIfAbsentMethods inherited from class org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory
getGtu, getObjectOrNull, getPerception, getTimestampMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opentrafficsim.core.gtu.perception.PerceptionCategory
updateAll
-
Constructor Details
-
AbstractDelayedPerceptionCategory
Deprecated.- Parameters:
perception- LanePerception; perception
-
-
Method Details
-
setInfo
public final <T> void setInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, TimeStampedObject<T> info)Deprecated.Set info of given delayed info type, not pertaining to any lane.- Type Parameters:
T- data type of delayed info- Parameters:
delayedInfoType- DelayedInfoType<T>; info typeinfo- TimeStampedObject<T>; info
-
setInfo
public final <T> void setInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, RelativeLane lane, TimeStampedObject<T> info)Deprecated.Set info of given delayed info type, pertaining to a lane.- Type Parameters:
T- data type of delayed info- Parameters:
delayedInfoType- DelayedInfoType<T>; info typelane- RelativeLane; lane, may benullinfo- TimeStampedObject<T>; info
-
getInfo
public final <T> TimeStampedObject<T> getInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType) throws PerceptionExceptionDeprecated.Returns the most recent info of the given type, that is older than the delay. If all data is more recent than the delay, the oldest data is returned. If no data is present, an exception is thrown.- Type Parameters:
T- data type of the info type- Parameters:
delayedInfoType- DelayedInfoType<T>; info type- Returns:
- info of the given type
- Throws:
PerceptionException- if info was not perceived
-
getInfo
public final <T> TimeStampedObject<T> getInfo(AbstractDelayedPerceptionCategory.DelayedInfoType<T> delayedInfoType, RelativeLane lane) throws PerceptionExceptionDeprecated.Returns the most recent info of the given type, that is older than the delay. If all data is more recent than the delay, the oldest data is returned. If no data is present, an exception is thrown.- Type Parameters:
T- data type of the info type- Parameters:
delayedInfoType- DelayedInfoType<T>; info typelane- RelativeLane; lane the data pertains to, may benull- Returns:
- info of the given type
- Throws:
PerceptionException- if info was not perceived
-
changeLane
Deprecated.Move data coupled to a lane to another lane to account for a lane change. The tactical planner needs to call this exactly when it flips logic concerning the origin and target lane.- Parameters:
dir- LateralDirectionality; direction of lane change
-