Class IntersectionPerceptionChannel
java.lang.Object
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory<LaneBasedGtu,LanePerception>
org.opentrafficsim.road.gtu.lane.perception.mental.channel.IntersectionPerceptionChannel
- All Implemented Interfaces:
Type<AbstractPerceptionCategory<LaneBasedGtu,,LanePerception>> PerceptionCategory<LaneBasedGtu,,LanePerception> IntersectionPerception,LaneBasedPerceptionCategory
public class IntersectionPerceptionChannel
extends AbstractPerceptionCategory<LaneBasedGtu,LanePerception>
implements IntersectionPerception
This class is highly similar to
DirectIntersectionPerception but takes perception delay for conflicting GTUs and
traffic light colors from perception channels.
Copyright (c) 2024-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final ParameterTypeLengthLook ahead parameter type. -
Constructor Summary
ConstructorsConstructorDescriptionIntersectionPerceptionChannel(LanePerception perception, Estimation estimation, Anticipation anticipation) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetConflicts(RelativeLane lane) Returns a set of conflicts along the route.getTrafficLights(RelativeLane lane) Returns a set of traffic lights along the route.final booleanReturns whether there is a conflict alongside to the left.final booleanReturns whether there is a conflict alongside to the right.final StringtoString()Methods inherited from class org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory
cacheAsString, computeIfAbsent, computeIfAbsent, computeIfAbsent, getGtu, getPerception, getTimestamp
-
Field Details
-
LOOKAHEAD
Look ahead parameter type.
-
-
Constructor Details
-
IntersectionPerceptionChannel
public IntersectionPerceptionChannel(LanePerception perception, Estimation estimation, Anticipation anticipation) Constructor.- Parameters:
perception- perception.estimation- estimation.anticipation- anticipation.
-
-
Method Details
-
getTrafficLights
public final PerceptionCollectable<PerceivedTrafficLight,TrafficLight> getTrafficLights(RelativeLane lane) Description copied from interface:IntersectionPerceptionReturns a set of traffic lights along the route. Traffic lights are sorted by headway value.- Specified by:
getTrafficLightsin interfaceIntersectionPerception- Parameters:
lane- lane- Returns:
- set of traffic lights along the route
-
getConflicts
Description copied from interface:IntersectionPerceptionReturns a set of conflicts along the route. Conflicts are sorted by headway value.- Specified by:
getConflictsin interfaceIntersectionPerception- Parameters:
lane- lane- Returns:
- set of conflicts along the route
-
isAlongsideConflictLeft
public final boolean isAlongsideConflictLeft()Description copied from interface:IntersectionPerceptionReturns whether there is a conflict alongside to the left.- Specified by:
isAlongsideConflictLeftin interfaceIntersectionPerception- Returns:
- whether there is a conflict alongside to the left
-
isAlongsideConflictRight
public final boolean isAlongsideConflictRight()Description copied from interface:IntersectionPerceptionReturns whether there is a conflict alongside to the right.- Specified by:
isAlongsideConflictRightin interfaceIntersectionPerception- Returns:
- whether there is a conflict alongside to the right
-
toString
-