Class PerceivedGtuType.AnticipationPerceivedGtuType
java.lang.Object
org.opentrafficsim.road.gtu.perception.categories.neighbors.PerceivedGtuType.AnticipationPerceivedGtuType
- All Implemented Interfaces:
PerceivedGtuType
- Enclosing interface:
- PerceivedGtuType
public static class PerceivedGtuType.AnticipationPerceivedGtuType
extends Object
implements PerceivedGtuType
Class for neighbors perceived with estimation and anticipation. Adjacent neighbors are perceived exactly.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.perception.categories.neighbors.PerceivedGtuType
PerceivedGtuType.AnticipationPerceivedGtuType -
Field Summary
Fields inherited from interface org.opentrafficsim.road.gtu.perception.categories.neighbors.PerceivedGtuType
WRAP -
Constructor Summary
ConstructorsConstructorDescriptionAnticipationPerceivedGtuType(Estimation estimation, Anticipation anticipation, Supplier<org.djunits.value.vdouble.scalar.Duration> perceptionDelay) Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncreatePerceivedGtu(LaneBasedGtu perceivingGtu, LaneBasedObject reference, LaneBasedGtu perceivedGtu, org.djunits.value.vdouble.scalar.Length distance, boolean downstream) Creates a perceived object from a GTU, downstream or upstream.
-
Constructor Details
-
AnticipationPerceivedGtuType
public AnticipationPerceivedGtuType(Estimation estimation, Anticipation anticipation, Supplier<org.djunits.value.vdouble.scalar.Duration> perceptionDelay) Constructor.- Parameters:
estimation- estimationanticipation- anticipationperceptionDelay- perception delay provider
-
-
Method Details
-
createPerceivedGtu
public PerceivedGtu createPerceivedGtu(LaneBasedGtu perceivingGtu, LaneBasedObject reference, LaneBasedGtu perceivedGtu, org.djunits.value.vdouble.scalar.Length distance, boolean downstream) throws ParameterException Description copied from interface:PerceivedGtuTypeCreates a perceived object from a GTU, downstream or upstream. The default implementation figures out from distance whether a parallel GTU should be created.- Specified by:
createPerceivedGtuin interfacePerceivedGtuType- Parameters:
perceivingGtu- perceiving GTUreference- reference object to which distance is given (and to which perception errors should apply, e.g. Conflict)perceivedGtu- perceived GTUdistance- distancedownstream- downstream (or upstream) neighbor- Returns:
- perception object from a gtu
- Throws:
ParameterException- on invalid parameter value or missing parameter
-