Interface Anticipation
public interface Anticipation
Form of anticipation.
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 24 feb. 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Field Summary
Fields Modifier and Type Field Description static AnticipationCONSTANT_ACCELERATIONAssume constant acceleration.static AnticipationCONSTANT_SPEEDAssume constant speed.static AnticipationNONEAssume no anticipation. -
Method Summary
Modifier and Type Method Description NeighborTripletanticipate(NeighborTriplet neighborTriplet, Duration duration, Length traveledDistance, boolean downstream)Anticipate movement.LengthegoAnticipation(Speed speed, Acceleration acceleration, Duration duration)Anticipate own movement.
-
Field Details
-
NONE
Assume no anticipation. -
CONSTANT_SPEED
Assume constant speed. -
CONSTANT_ACCELERATION
Assume constant acceleration.
-
-
Method Details
-
anticipate
NeighborTriplet anticipate(NeighborTriplet neighborTriplet, Duration duration, Length traveledDistance, boolean downstream)Anticipate movement.- Parameters:
neighborTriplet- NeighborTriplet; headway, speed and accelerationduration- Duration; durationtraveledDistance- Length; distance the subject vehicle traveled during the anticipation timedownstream- boolean; whether the perceived GTU is downstream- Returns:
- anticipated info
-
egoAnticipation
Anticipate own movement.- Parameters:
speed- Speed; current speedacceleration- Acceleration; current accelerationduration- Duration; anticipation time- Returns:
- anticipated distance traveled
-