Class PerceivedConflictFull

All Implemented Interfaces:
Comparable<PerceivedObject>, Identifiable, PerceivedConflict, PerceivedLaneBasedObject, PerceivedObject

public class PerceivedConflictFull extends PerceivedLaneBasedObjectBase implements PerceivedConflict
Perceived intersection conflict with given input values.

Copyright (c) 2013-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • PerceivedConflictFull

      public PerceivedConflictFull(String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, ConflictType conflictType, ConflictPriority conflictPriority, Class<? extends ConflictRule> conflictRuleType, org.djunits.value.vdouble.scalar.Length conflictingLength, PerceptionCollectable<PerceivedGtu,LaneBasedGtu> upstreamConflictingGTUs, PerceptionCollectable<PerceivedGtu,LaneBasedGtu> downstreamConflictingGTUs, org.djunits.value.vdouble.scalar.Length conflictingVisibility, SpeedLimit conflictingSpeedLimit, CrossSectionLink conflictingLink, PerceivedConflictFull.Width width, PerceivedObject stopLine, PerceivedObject conflictingStopLine, LateralDirectionality turn, Lane lane)
      Constructor.
      Parameters:
      id - id
      distance - distance to conflict
      length - length of the conflict
      conflictType - conflict type
      conflictPriority - conflict priority
      conflictRuleType - conflict rule type
      conflictingLength - length of the conflict on the conflicting lane
      upstreamConflictingGTUs - conflicting GTU's upstream of the <i>start</i> of the conflict
      downstreamConflictingGTUs - conflicting GTU's downstream of the <i>start</i> of the conflict
      conflictingVisibility - visibility on the conflicting lane within which conflicting vehicles are visible
      conflictingSpeedLimit - speed limit on the conflicting lane
      conflictingLink - conflicting link
      width - width progression of conflict
      stopLine - stop line on the own lane
      conflictingStopLine - stop line on the conflicting lane
      turn - turn direction relative to other conflict
      lane - the lane
  • Method Details

    • getConflictType

      public ConflictType getConflictType()
      Description copied from interface: PerceivedConflict
      Returns the conflict type.
      Specified by:
      getConflictType in interface PerceivedConflict
      Returns:
      conflict type
    • isCrossing

      public boolean isCrossing()
      Description copied from interface: PerceivedConflict
      Returns whether this is a crossing conflict.
      Specified by:
      isCrossing in interface PerceivedConflict
      Returns:
      whether this is a crossing conflict
    • isMerge

      public boolean isMerge()
      Description copied from interface: PerceivedConflict
      Returns whether this is a merge conflict.
      Specified by:
      isMerge in interface PerceivedConflict
      Returns:
      whether this is a merge conflict
    • isSplit

      public boolean isSplit()
      Description copied from interface: PerceivedConflict
      Returns whether this is a split conflict.
      Specified by:
      isSplit in interface PerceivedConflict
      Returns:
      whether this is a split conflict
    • getConflictPriority

      public ConflictPriority getConflictPriority()
      Description copied from interface: PerceivedConflict
      Returns the conflict priority.
      Specified by:
      getConflictPriority in interface PerceivedConflict
      Returns:
      conflict priority
    • getConflictingLength

      public org.djunits.value.vdouble.scalar.Length getConflictingLength()
      Description copied from interface: PerceivedConflict
      Returns the length of the conflict on the conflicting lane.
      Specified by:
      getConflictingLength in interface PerceivedConflict
      Returns:
      length of the conflict on the conflicting lane
    • getUpstreamConflictingGtus

      public PerceptionCollectable<PerceivedGtu,LaneBasedGtu> getUpstreamConflictingGtus()
      Description copied from interface: PerceivedConflict
      Returns a set of conflicting GTU's upstream of the start of the conflict ordered close to far from the conflict.
      Specified by:
      getUpstreamConflictingGtus in interface PerceivedConflict
      Returns:
      set of conflicting GTU's upstream of the start of the conflict ordered close to far from the conflict
    • getDownstreamConflictingGtus

      public PerceptionCollectable<PerceivedGtu,LaneBasedGtu> getDownstreamConflictingGtus()
      Description copied from interface: PerceivedConflict
      Returns a set of conflicting GTU's downstream of the start of the conflict ordered close to far from the conflict. Distance is given relative to the end of the conflict, or null for conflicting vehicles on the conflict. In the latter case the overlap is used.
      Specified by:
      getDownstreamConflictingGtus in interface PerceivedConflict
      Returns:
      set of conflicting GTU's downstream of the start of the conflict ordered close to far from the conflict
    • getConflictingVisibility

      public org.djunits.value.vdouble.scalar.Length getConflictingVisibility()
      Description copied from interface: PerceivedConflict
      Returns the visibility on the conflicting lane within which conflicting vehicles are visible. All upstream conflicting GTUs have a distance smaller than the visibility. Depending on a limited visibility, a certain (lower) speed may be required while approaching the conflict.
      Specified by:
      getConflictingVisibility in interface PerceivedConflict
      Returns:
      visibility on the conflicting lane within which conflicting vehicles are visible
    • getConflictingSpeedLimit

      public SpeedLimit getConflictingSpeedLimit()
      Description copied from interface: PerceivedConflict
      Returns the speed limit on the conflicting lane.
      Specified by:
      getConflictingSpeedLimit in interface PerceivedConflict
      Returns:
      speed limit on the conflicting lane
    • getConflictingLink

      public CrossSectionLink getConflictingLink()
      Description copied from interface: PerceivedConflict
      Returns the conflicting link.
      Specified by:
      getConflictingLink in interface PerceivedConflict
      Returns:
      the conflicting link
    • getStopLine

      public PerceivedObject getStopLine()
      Description copied from interface: PerceivedConflict
      Returns the stop line.
      Specified by:
      getStopLine in interface PerceivedConflict
      Returns:
      stop line
    • getConflictingStopLine

      public PerceivedObject getConflictingStopLine()
      Description copied from interface: PerceivedConflict
      Returns the stop line on the conflicting lane.
      Specified by:
      getConflictingStopLine in interface PerceivedConflict
      Returns:
      stop line
    • getTurn

      public LateralDirectionality getTurn()
      Description copied from interface: PerceivedConflict
      Returns the turn direction of this conflict relative to the other conflict. This is NONE for crossing conflicts.
      Specified by:
      getTurn in interface PerceivedConflict
      Returns:
      turn direction of this conflict relative to the other conflict
    • getConflictRuleType

      public Class<? extends ConflictRule> getConflictRuleType()
      Description copied from interface: PerceivedConflict
      Returns the conflict rule type.
      Specified by:
      getConflictRuleType in interface PerceivedConflict
      Returns:
      conflict rule type
    • getConflictingTrafficLightDistance

      public Optional<org.djunits.value.vdouble.scalar.Length> getConflictingTrafficLightDistance()
      Description copied from interface: PerceivedConflict
      Returns the distance of a traffic light upstream on the conflicting lane.
      Specified by:
      getConflictingTrafficLightDistance in interface PerceivedConflict
      Returns:
      distance of a traffic light upstream on the conflicting lane, empty if no traffic light
    • isPermitted

      public boolean isPermitted()
      Description copied from interface: PerceivedConflict
      Whether the conflict is permitted by the traffic light.
      Specified by:
      isPermitted in interface PerceivedConflict
      Returns:
      whether the conflict is permitted by the traffic light
    • setConflictingTrafficLight

      public void setConflictingTrafficLight(org.djunits.value.vdouble.scalar.Length trafficLightDistance, boolean permittedConflict)
      Set the distance of a traffic light upstream on the conflicting lane.
      Parameters:
      trafficLightDistance - distance of a traffic light upstream on the conflicting lane.
      permittedConflict - whether the conflict is permitted by the traffic light
    • getWidthAtFraction

      public org.djunits.value.vdouble.scalar.Length getWidthAtFraction(double fraction)
      Description copied from interface: PerceivedConflict
      Returns the width at the given fraction.
      Specified by:
      getWidthAtFraction in interface PerceivedConflict
      Parameters:
      fraction - fraction from 0 to 1
      Returns:
      width at the given fraction
    • toString

      public final String toString()
      Description copied from class: PerceivedLaneBasedObjectBase
      Overrides:
      toString in class PerceivedLaneBasedObjectBase