Class AnticipationSpeed
java.lang.Object
org.opentrafficsim.road.gtu.perception.categories.AnticipationSpeed
- All Implemented Interfaces:
PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGtu, AnticipationSpeed.SpeedSet>
public class AnticipationSpeed
extends Object
implements PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGtu,AnticipationSpeed.SpeedSet>
Collector of leaders which derives a set of anticipation speeds from a lane. This includes all GTUs on the lane (current),
all GTUs indicating left (left) and all GTUs indicating right (right).
Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to contain info from 1 lane, regarding 3 lanes. -
Constructor Summary
ConstructorsConstructorDescriptionAnticipationSpeed(org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.djunits.value.vdouble.scalar.Length lookAhead, RelativeLane lane) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the accumulator.Returns the finalizer.Returns the identity value, the initial intermediate value.
-
Constructor Details
-
AnticipationSpeed
public AnticipationSpeed(org.djunits.value.vdouble.scalar.Speed desiredSpeed, org.djunits.value.vdouble.scalar.Length lookAhead, RelativeLane lane) Constructor.- Parameters:
desiredSpeed- desired speedlookAhead- look-ahead distancelane- lane
-
-
Method Details
-
getIdentity
Description copied from interface:PerceptionCollectable.PerceptionCollectorReturns the identity value, the initial intermediate value.- Specified by:
getIdentityin interfacePerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGtu, AnticipationSpeed.SpeedSet> - Returns:
- identity value, the initial intermediate value
-
getAccumulator
public PerceptionCollectable.PerceptionAccumulator<LaneBasedGtu,AnticipationSpeed.SpeedSet> getAccumulator()Description copied from interface:PerceptionCollectable.PerceptionCollectorReturns the accumulator.- Specified by:
getAccumulatorin interfacePerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGtu, AnticipationSpeed.SpeedSet> - Returns:
- accumulator
-
getFinalizer
Description copied from interface:PerceptionCollectable.PerceptionCollectorReturns the finalizer.- Specified by:
getFinalizerin interfacePerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGtu, AnticipationSpeed.SpeedSet> - Returns:
- finalizer
-