public class DirectIntersectionPerception extends LaneBasedAbstractPerceptionCategory implements IntersectionPerception
Copyright (c) 2013-2017 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 org.opentrafficsim.base.parameters.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.
|
org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayConflict,Conflict>> |
getTimeStampedConflicts(RelativeLane lane)
Returns a time stamped set of traffic lights along the route.
|
org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayTrafficLight,TrafficLight>> |
getTimeStampedTrafficLights(RelativeLane lane)
Returns a time stamped set of traffic lights along the route.
|
Iterable<HeadwayTrafficLight> |
getTrafficLights(RelativeLane lane)
Returns a set of traffic lights along the route.
|
boolean |
isAlongsideConflictLeft()
Returns whether there is a conflict alongside to the left.
|
org.opentrafficsim.base.TimeStampedObject<Boolean> |
isAlongsideConflictLeftTimeStamped()
Returns whether there is a conflict alongside to the left, time stamped.
|
boolean |
isAlongsideConflictRight()
Returns whether there is a conflict alongside to the right.
|
org.opentrafficsim.base.TimeStampedObject<Boolean> |
isAlongsideConflictRightTimeStamped()
Returns whether there is a conflict alongside to the right, time stamped.
|
String |
toString() |
void |
updateConflicts()
Updates set of conflicts along the route.
|
void |
updateTrafficLights()
Updates set of traffic lights along the route.
|
getGtu, getObjectOrNull, getPerception, getTimestampclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitupdateAll, updateAlongsideConflictLeft, updateAlongsideConflictRightprotected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKAHEAD
public DirectIntersectionPerception(LanePerception perception, HeadwayGtuType headwayGtuType)
perception - perceptionheadwayGtuType - type of headway gtu to generatepublic final void updateTrafficLights()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.base.parameters.ParameterException
updateTrafficLights in interface IntersectionPerceptionorg.opentrafficsim.core.gtu.GTUException - if the GTU has not been initializedorg.opentrafficsim.base.parameters.ParameterException - if lane structure cannot be made due to missing parameterpublic final void updateConflicts()
throws org.opentrafficsim.core.gtu.GTUException,
org.opentrafficsim.base.parameters.ParameterException
updateConflicts in interface IntersectionPerceptionorg.opentrafficsim.core.gtu.GTUException - if the GTU has not been initializedorg.opentrafficsim.base.parameters.ParameterException - if lane structure cannot be made due to missing parameterpublic final Iterable<HeadwayTrafficLight> getTrafficLights(RelativeLane lane)
getTrafficLights in interface IntersectionPerceptionlane - lanepublic final PerceptionCollectable<HeadwayConflict,Conflict> getConflicts(RelativeLane lane)
getConflicts in interface IntersectionPerceptionlane - lanepublic final boolean isAlongsideConflictLeft()
isAlongsideConflictLeft in interface IntersectionPerceptionpublic final boolean isAlongsideConflictRight()
isAlongsideConflictRight in interface IntersectionPerceptionpublic final org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayTrafficLight,TrafficLight>> getTimeStampedTrafficLights(RelativeLane lane)
lane - lanepublic final org.opentrafficsim.base.TimeStampedObject<PerceptionCollectable<HeadwayConflict,Conflict>> getTimeStampedConflicts(RelativeLane lane)
lane - lanepublic final org.opentrafficsim.base.TimeStampedObject<Boolean> isAlongsideConflictLeftTimeStamped()
public final org.opentrafficsim.base.TimeStampedObject<Boolean> isAlongsideConflictRightTimeStamped()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.