Interface Anticipation
-
public interface AnticipationForm of anticipation.Copyright (c) 2013-2022 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
All Methods Instance Methods Abstract Methods 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 Detail
-
NONE
static final Anticipation NONE
Assume no anticipation.
-
CONSTANT_SPEED
static final Anticipation CONSTANT_SPEED
Assume constant speed.
-
CONSTANT_ACCELERATION
static final Anticipation CONSTANT_ACCELERATION
Assume constant acceleration.
-
-
Method Detail
-
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
Length egoAnticipation(Speed speed, Acceleration acceleration, Duration duration)
Anticipate own movement.- Parameters:
speed- Speed; current speedacceleration- Acceleration; current accelerationduration- Duration; anticipation time- Returns:
- anticipated distance traveled
-
-