public class HeadwayConflict extends AbstractHeadwayCopy
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.
Headway.ObjectType
Constructor and Description |
---|
HeadwayConflict(ConflictType conflictType,
ConflictPriority conflictPriority,
Class<? extends ConflictRule> conflictRuleType,
String id,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Length conflictingLength,
SortedSet<HeadwayGTU> upstreamConflictingGTUs,
SortedSet<HeadwayGTU> downstreamConflictingGTUs,
org.djunits.value.vdouble.scalar.Length conflictingVisibility,
org.djunits.value.vdouble.scalar.Speed conflictingSpeedLimit,
CrossSectionLink conflictingLink)
Constructor without stop lines.
|
HeadwayConflict(ConflictType conflictType,
ConflictPriority conflictPriority,
Class<? extends ConflictRule> conflictRuleType,
String id,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Length conflictingLength,
SortedSet<HeadwayGTU> upstreamConflictingGTUs,
SortedSet<HeadwayGTU> downstreamConflictingGTUs,
org.djunits.value.vdouble.scalar.Length conflictingVisibility,
org.djunits.value.vdouble.scalar.Speed conflictingSpeedLimit,
CrossSectionLink conflictingLink,
HeadwayStopLine stopLine,
HeadwayStopLine conflictingStopLine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.djunits.value.vdouble.scalar.Length |
getConflictingLength()
Returns the length of the conflict on the conflicting lane.
|
CrossSectionLink |
getConflictingLink()
Returns the conflicting link.
|
org.djunits.value.vdouble.scalar.Speed |
getConflictingSpeedLimit()
Returns the speed limit on the conflicting lane.
|
HeadwayStopLine |
getConflictingStopLine()
Returns the stop line on the conflicting lane.
|
org.djunits.value.vdouble.scalar.Length |
getConflictingTrafficLightDistance()
Returns the distance of a traffic light upstream on the conflicting lane.
|
org.djunits.value.vdouble.scalar.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.
|
SortedSet<HeadwayGTU> |
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.
|
SortedSet<HeadwayGTU> |
getUpstreamConflictingGTUs()
Returns a set of conflicting GTU's upstream of the start of the conflict ordered close to far from the conflict.
|
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(org.djunits.value.vdouble.scalar.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, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length conflictingLength, SortedSet<HeadwayGTU> upstreamConflictingGTUs, SortedSet<HeadwayGTU> downstreamConflictingGTUs, org.djunits.value.vdouble.scalar.Length conflictingVisibility, org.djunits.value.vdouble.scalar.Speed conflictingSpeedLimit, CrossSectionLink conflictingLink, HeadwayStopLine stopLine, HeadwayStopLine conflictingStopLine) throws org.opentrafficsim.core.gtu.GTUException
conflictType
- conflict typeconflictPriority
- conflict priorityconflictRuleType
- conflict rule typeid
- iddistance
- distancelength
- length of the conflictconflictingLength
- length of the conflict on the conflicting laneupstreamConflictingGTUs
- conflicting GTU's upstream of the start of the conflictdownstreamConflictingGTUs
- conflicting GTU's downstream of the start of the conflictconflictingVisibility
- visibility on the conflicting lane within which conflicting vehicles are visibleconflictingSpeedLimit
- speed limit on the conflicting laneconflictingLink
- conflicting linkstopLine
- stop line on the own laneconflictingStopLine
- stop line on the conflicting laneorg.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic HeadwayConflict(ConflictType conflictType, ConflictPriority conflictPriority, Class<? extends ConflictRule> conflictRuleType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length conflictingLength, SortedSet<HeadwayGTU> upstreamConflictingGTUs, SortedSet<HeadwayGTU> downstreamConflictingGTUs, org.djunits.value.vdouble.scalar.Length conflictingVisibility, org.djunits.value.vdouble.scalar.Speed conflictingSpeedLimit, CrossSectionLink conflictingLink) throws org.opentrafficsim.core.gtu.GTUException
conflictType
- conflict typeconflictPriority
- conflict priorityconflictRuleType
- conflict rule typeid
- iddistance
- distancelength
- length of the conflictconflictingLength
- length of the conflict on the conflicting laneupstreamConflictingGTUs
- conflicting GTU's upstream of the start of the conflictdownstreamConflictingGTUs
- conflicting GTU's downstream of the start of the conflictconflictingVisibility
- visibility on the conflicting lane within which conflicting vehicles are visibleconflictingSpeedLimit
- speed limit on the conflicting laneconflictingLink
- conflicting linkorg.opentrafficsim.core.gtu.GTUException
- 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 org.djunits.value.vdouble.scalar.Length getConflictingLength()
public final SortedSet<HeadwayGTU> getUpstreamConflictingGTUs()
public final SortedSet<HeadwayGTU> getDownstreamConflictingGTUs()
public final org.djunits.value.vdouble.scalar.Length getConflictingVisibility()
public final org.djunits.value.vdouble.scalar.Speed getConflictingSpeedLimit()
public final CrossSectionLink getConflictingLink()
public final HeadwayStopLine getStopLine()
public final HeadwayStopLine getConflictingStopLine()
public Class<? extends ConflictRule> getConflictRuleType()
public org.djunits.value.vdouble.scalar.Length getConflictingTrafficLightDistance()
public boolean isPermitted()
public void setConflictingTrafficLight(org.djunits.value.vdouble.scalar.Length trafficLightDistance, boolean permittedConflict)
trafficLightDistance
- distance of a traffic light upstream on the conflicting lane.permittedConflict
- whether the conflict is permitted by the traffic lightpublic final String toString()
toString
in class AbstractHeadway
Copyright © 2014–2017 Delft University of Technology. All rights reserved.