public class AnticipationSpeed extends Object implements PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGTU,AnticipationSpeed.SpeedSet>
Copyright (c) 2013-2018 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 |
AnticipationSpeed.SpeedSet
Class to contain info from 1 lane, regarding 3 lanes.
|
| Constructor and Description |
|---|
AnticipationSpeed(org.djunits.value.vdouble.scalar.Speed desiredSpeed,
org.djunits.value.vdouble.scalar.Length lookAhead,
RelativeLane lane)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) double |
anticipateSingle(org.opentrafficsim.core.gtu.GTU gtu,
org.djunits.value.vdouble.scalar.Length distance)
Anticipate a single leader by possibly lowering the anticipation speed.
|
PerceptionCollectable.PerceptionAccumulator<LaneBasedGTU,AnticipationSpeed.SpeedSet> |
getAccumulator()
Returns the accumulator.
|
PerceptionCollectable.PerceptionFinalizer<AnticipationSpeed.SpeedSet,AnticipationSpeed.SpeedSet> |
getFinalizer()
Returns the finalizer.
|
Supplier<AnticipationSpeed.SpeedSet> |
getIdentity()
Returns the identity value, the initial intermediate value.
|
public AnticipationSpeed(org.djunits.value.vdouble.scalar.Speed desiredSpeed,
org.djunits.value.vdouble.scalar.Length lookAhead,
RelativeLane lane)
desiredSpeed - Speed; desired speedlookAhead - Length; look-ahead distancelane - RelativeLane; lanepublic Supplier<AnticipationSpeed.SpeedSet> getIdentity()
getIdentity in interface PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGTU,AnticipationSpeed.SpeedSet>public PerceptionCollectable.PerceptionAccumulator<LaneBasedGTU,AnticipationSpeed.SpeedSet> getAccumulator()
getAccumulator in interface PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGTU,AnticipationSpeed.SpeedSet>final double anticipateSingle(org.opentrafficsim.core.gtu.GTU gtu,
org.djunits.value.vdouble.scalar.Length distance)
gtu - GTU; GTUdistance - Length; distance to GTUpublic PerceptionCollectable.PerceptionFinalizer<AnticipationSpeed.SpeedSet,AnticipationSpeed.SpeedSet> getFinalizer()
getFinalizer in interface PerceptionCollectable.PerceptionCollector<AnticipationSpeed.SpeedSet,LaneBasedGTU,AnticipationSpeed.SpeedSet>Copyright © 2014–2018 Delft University of Technology. All rights reserved.