public class AnticipationTrafficPerception extends LaneBasedAbstractPerceptionCategory implements TrafficPerception
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Field and Description |
---|---|
protected static ParameterTypeLength |
LOOKAHEAD
Look ahead parameter type.
|
MAX_RED_DECELERATION, MAX_YELLOW_DECELERATION
Constructor and Description |
---|
AnticipationTrafficPerception(LanePerception perception)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
LinearDensity |
getDensity(RelativeLane lane)
Returns the perceived density on the given lane.
|
Speed |
getSpeed(RelativeLane lane)
Returns the perceived speed on the given lane.
|
String |
toString() |
void |
updateAll() |
computeIfAbsent, computeIfAbsent, computeIfAbsent
getGtu, getObjectOrNull, getPerception, getTimestamp
protected static final ParameterTypeLength LOOKAHEAD
public AnticipationTrafficPerception(LanePerception perception)
perception
- LanePerception; perceptionpublic Speed getSpeed(RelativeLane lane) throws ParameterException
getSpeed
in interface TrafficPerception
lane
- RelativeLane; laneParameterException
- on parameter exceptionpublic LinearDensity getDensity(RelativeLane lane)
getDensity
in interface TrafficPerception
lane
- RelativeLane; lanepublic void updateAll() throws GTUException, NetworkException, ParameterException
updateAll
in interface PerceptionCategory<LaneBasedGTU,LanePerception>
GTUException
NetworkException
ParameterException
Copyright © 2014–2019 Delft University of Technology. All rights reserved.