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.
  • Constructor Details

    • AnticipationPerceivedGtuType

      public AnticipationPerceivedGtuType(Estimation estimation, Anticipation anticipation, Supplier<org.djunits.value.vdouble.scalar.Duration> perceptionDelay)
      Constructor.
      Parameters:
      estimation - estimation
      anticipation - anticipation
      perceptionDelay - 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: PerceivedGtuType
      Creates 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:
      createPerceivedGtu in interface PerceivedGtuType
      Parameters:
      perceivingGtu - perceiving GTU
      reference - reference object to which distance is given (and to which perception errors should apply, e.g. Conflict)
      perceivedGtu - perceived GTU
      distance - distance
      downstream - downstream (or upstream) neighbor
      Returns:
      perception object from a gtu
      Throws:
      ParameterException - on invalid parameter value or missing parameter