public class DirectIntersectionPerception extends LaneBasedAbstractPerceptionCategory implements IntersectionPerception
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 |
|---|
DirectIntersectionPerception(LanePerception perception,
HeadwayGtuType headwayGtuType) |
| Modifier and Type | Method and Description |
|---|---|
PerceptionCollectable<HeadwayConflict,Conflict> |
getConflicts(RelativeLane lane)
Returns a set of conflicts along the route.
|
PerceptionCollectable<HeadwayTrafficLight,TrafficLight> |
getTrafficLights(RelativeLane lane)
Returns a set of traffic lights along the route.
|
boolean |
isAlongsideConflictLeft()
Returns whether there is a conflict alongside to the left.
|
boolean |
isAlongsideConflictRight()
Returns whether there is a conflict alongside to the right.
|
String |
toString() |
void |
updateAll() |
computeIfAbsent, computeIfAbsent, computeIfAbsentgetGtu, getObjectOrNull, getPerception, getTimestampprotected static final ParameterTypeLength LOOKAHEAD
public DirectIntersectionPerception(LanePerception perception, HeadwayGtuType headwayGtuType)
perception - LanePerception; perceptionheadwayGtuType - HeadwayGtuType; type of headway gtu to generatepublic final PerceptionCollectable<HeadwayTrafficLight,TrafficLight> getTrafficLights(RelativeLane lane)
getTrafficLights in interface IntersectionPerceptionlane - RelativeLane; lanepublic final PerceptionCollectable<HeadwayConflict,Conflict> getConflicts(RelativeLane lane)
getConflicts in interface IntersectionPerceptionlane - RelativeLane; lanepublic final boolean isAlongsideConflictLeft()
isAlongsideConflictLeft in interface IntersectionPerceptionpublic final boolean isAlongsideConflictRight()
isAlongsideConflictRight in interface IntersectionPerceptionpublic void updateAll()
throws GTUException,
NetworkException,
ParameterException
updateAll in interface PerceptionCategory<LaneBasedGTU,LanePerception>GTUExceptionNetworkExceptionParameterExceptionCopyright © 2014–2019 Delft University of Technology. All rights reserved.