public class HeadwayConflict extends AbstractHeadwayCopy
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 | Class and Description |
---|---|
static class |
HeadwayConflict.Width
Width progression of conflict.
|
Headway.ObjectType
Constructor and Description |
---|
HeadwayConflict(ConflictType conflictType,
ConflictPriority conflictPriority,
Class<? extends ConflictRule> conflictRuleType,
String id,
Length distance,
Length length,
Length conflictingLength,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> upstreamConflictingGTUs,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> downstreamConflictingGTUs,
Length conflictingVisibility,
Speed conflictingSpeedLimit,
CrossSectionLink conflictingLink,
HeadwayConflict.Width width)
Constructor without stop lines.
|
HeadwayConflict(ConflictType conflictType,
ConflictPriority conflictPriority,
Class<? extends ConflictRule> conflictRuleType,
String id,
Length distance,
Length length,
Length conflictingLength,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> upstreamConflictingGTUs,
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> downstreamConflictingGTUs,
Length conflictingVisibility,
Speed conflictingSpeedLimit,
CrossSectionLink conflictingLink,
HeadwayConflict.Width width,
HeadwayStopLine stopLine,
HeadwayStopLine conflictingStopLine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Length |
getConflictingLength()
Returns the length of the conflict on the conflicting lane.
|
CrossSectionLink |
getConflictingLink()
Returns the conflicting link.
|
Speed |
getConflictingSpeedLimit()
Returns the speed limit on the conflicting lane.
|
HeadwayStopLine |
getConflictingStopLine()
Returns the stop line on the conflicting lane.
|
Length |
getConflictingTrafficLightDistance()
Returns the distance of a traffic light upstream on the conflicting lane.
|
Length |
getConflictingVisibility()
Returns the visibility on the conflicting lane within which conflicting vehicles are visible.
|
ConflictPriority |
getConflictPriority()
Returns the conflict priority.
|
Class<? extends ConflictRule> |
getConflictRuleType()
Returns the conflict rule type.
|
ConflictType |
getConflictType()
Returns the conflict type.
|
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> |
getDownstreamConflictingGTUs()
Returns a set of conflicting GTU's downstream of the start of the conflict ordered close to far from the conflict.
|
HeadwayStopLine |
getStopLine()
Returns the stop line.
|
PerceptionCollectable<HeadwayGTU,LaneBasedGTU> |
getUpstreamConflictingGTUs()
Returns a set of conflicting GTU's upstream of the start of the conflict ordered close to far from the conflict.
|
Length |
getWidthAtFraction(double fraction)
Returns the width at the given fraction.
|
boolean |
isCrossing()
Returns whether this is a crossing conflict.
|
boolean |
isMerge()
Returns whether this is a merge conflict.
|
boolean |
isPermitted()
Whether the conflict is permitted by the traffic light.
|
boolean |
isSplit()
Returns whether this is a split conflict.
|
void |
setConflictingTrafficLight(Length trafficLightDistance,
boolean permittedConflict)
Set the distance of a traffic light upstream on the conflicting lane.
|
String |
toString() |
equals, getAcceleration, getId, getLength, getObjectType, getSpeed, hashCode
getDistance, getOverlap, getOverlapFront, getOverlapRear, isAhead, isBehind, isParallel
public HeadwayConflict(ConflictType conflictType, ConflictPriority conflictPriority, Class<? extends ConflictRule> conflictRuleType, String id, Length distance, Length length, Length conflictingLength, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> upstreamConflictingGTUs, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> downstreamConflictingGTUs, Length conflictingVisibility, Speed conflictingSpeedLimit, CrossSectionLink conflictingLink, HeadwayConflict.Width width, HeadwayStopLine stopLine, HeadwayStopLine conflictingStopLine) throws GTUException
conflictType
- ConflictType; conflict typeconflictPriority
- ConflictPriority; conflict priorityconflictRuleType
- Class<? extends ConflictRule>; conflict rule typeid
- String; iddistance
- Length; distancelength
- Length; length of the conflictconflictingLength
- Length; length of the conflict on the conflicting laneupstreamConflictingGTUs
- PerceptionCollectable<HeadwayGTU,LaneBasedGTU>; conflicting GTU's upstream of the
<i>start</i> of the conflictdownstreamConflictingGTUs
- PerceptionCollectable<HeadwayGTU,LaneBasedGTU>; conflicting GTU's downstream of
the <i>start</i> of the conflictconflictingVisibility
- Length; visibility on the conflicting lane within which conflicting vehicles are visibleconflictingSpeedLimit
- Speed; speed limit on the conflicting laneconflictingLink
- CrossSectionLink; conflicting linkwidth
- Width; width progression of conflictstopLine
- HeadwayStopLine; stop line on the own laneconflictingStopLine
- HeadwayStopLine; stop line on the conflicting laneGTUException
- when id is null, or parameters are inconsistentpublic HeadwayConflict(ConflictType conflictType, ConflictPriority conflictPriority, Class<? extends ConflictRule> conflictRuleType, String id, Length distance, Length length, Length conflictingLength, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> upstreamConflictingGTUs, PerceptionCollectable<HeadwayGTU,LaneBasedGTU> downstreamConflictingGTUs, Length conflictingVisibility, Speed conflictingSpeedLimit, CrossSectionLink conflictingLink, HeadwayConflict.Width width) throws GTUException
conflictType
- ConflictType; conflict typeconflictPriority
- ConflictPriority; conflict priorityconflictRuleType
- Class<? extends ConflictRule>; conflict rule typeid
- String; iddistance
- Length; distancelength
- Length; length of the conflictconflictingLength
- Length; length of the conflict on the conflicting laneupstreamConflictingGTUs
- PerceptionCollectable<HeadwayGTU,LaneBasedGTU>; conflicting GTU's upstream of the
<i>start</i> of the conflictdownstreamConflictingGTUs
- PerceptionCollectable<HeadwayGTU,LaneBasedGTU>; conflicting GTU's downstream of
the <i>start</i> of the conflictconflictingVisibility
- Length; visibility on the conflicting lane within which conflicting vehicles are visibleconflictingSpeedLimit
- Speed; speed limit on the conflicting laneconflictingLink
- CrossSectionLink; conflicting linkwidth
- Width; width progression of conflictGTUException
- when id is null, or parameters are inconsistentpublic final ConflictType getConflictType()
public final boolean isCrossing()
public final boolean isMerge()
public final boolean isSplit()
public final ConflictPriority getConflictPriority()
public final Length getConflictingLength()
public final PerceptionCollectable<HeadwayGTU,LaneBasedGTU> getUpstreamConflictingGTUs()
public final PerceptionCollectable<HeadwayGTU,LaneBasedGTU> getDownstreamConflictingGTUs()
public final Length getConflictingVisibility()
public final Speed getConflictingSpeedLimit()
public final CrossSectionLink getConflictingLink()
public final HeadwayStopLine getStopLine()
public final HeadwayStopLine getConflictingStopLine()
public final Class<? extends ConflictRule> getConflictRuleType()
public final Length getConflictingTrafficLightDistance()
public final boolean isPermitted()
public final void setConflictingTrafficLight(Length trafficLightDistance, boolean permittedConflict)
trafficLightDistance
- Length; distance of a traffic light upstream on the conflicting lane.permittedConflict
- boolean; whether the conflict is permitted by the traffic lightpublic final Length getWidthAtFraction(double fraction)
fraction
- double; fraction from 0 to 1public final String toString()
toString
in class AbstractHeadway
Copyright © 2014–2019 Delft University of Technology. All rights reserved.