public static final class ConflictUtil.ConflictPlans extends Object implements Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
ConflictPlans() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
cleanYieldPlans()
Clears any yield plan that was no longer kept active in the last evaluation of conflicts.
|
(package private) org.djunits.value.vdouble.scalar.Time |
getArrivalTime(AbstractHeadwayGTU gtu)
Returns the estimated arrival time of given GTU.
|
(package private) boolean |
isStopPhaseApproach(HeadwayStopLine stopLine) |
(package private) boolean |
isStopPhaseRun(HeadwayStopLine stopLine) |
(package private) boolean |
isStopPhaseYield(HeadwayStopLine stopLine) |
(package private) boolean |
isYieldPlan(HeadwayConflict conflict,
AbstractHeadwayGTU gtu)
Returns whether a plan exists for yielding at the conflict for the given conflict GTU.
|
(package private) void |
setArrivalTime(AbstractHeadwayGTU gtu,
org.djunits.value.vdouble.scalar.Time time)
Sets the estimated arrival time of a GTU.
|
(package private) void |
setStopPhaseApproach(HeadwayStopLine stopLine)
Sets the current phase to 'approach' for the given stop line.
|
(package private) void |
setStopPhaseRun(HeadwayStopLine stopLine)
Sets the current phase to 'run' for the given stop line.
|
(package private) void |
setStopPhaseYield(HeadwayStopLine stopLine)
Sets the current phase to 'yield' for the given stop line.
|
(package private) void |
setYieldPlan(HeadwayConflict conflict,
AbstractHeadwayGTU gtu)
Sets or maintains the plan to yield at the conflict for the given conflict RSU.
|
String |
toString() |
boolean isYieldPlan(HeadwayConflict conflict, AbstractHeadwayGTU gtu)
conflict
- conflictgtu
- conflicting GTUvoid setYieldPlan(HeadwayConflict conflict, AbstractHeadwayGTU gtu)
conflict
- conflict to yield atgtu
- conflicting GTUvoid cleanYieldPlans()
void setArrivalTime(AbstractHeadwayGTU gtu, org.djunits.value.vdouble.scalar.Time time)
gtu
- GTUtime
- estimated arrival timeorg.djunits.value.vdouble.scalar.Time getArrivalTime(AbstractHeadwayGTU gtu)
gtu
- GTUvoid setStopPhaseApproach(HeadwayStopLine stopLine)
stopLine
- stop linevoid setStopPhaseYield(HeadwayStopLine stopLine)
stopLine
- stop lineRuntimeException
- if the phase was not set to approach beforevoid setStopPhaseRun(HeadwayStopLine stopLine)
stopLine
- stop lineRuntimeException
- if the phase was not set to approach beforeboolean isStopPhaseApproach(HeadwayStopLine stopLine)
stopLine
- stop lineboolean isStopPhaseYield(HeadwayStopLine stopLine)
stopLine
- stop lineboolean isStopPhaseRun(HeadwayStopLine stopLine)
stopLine
- stop lineCopyright © 2014–2016 Delft University of Technology. All rights reserved.