Interface LaneRecordInterface<R extends LaneRecordInterface<R>>

Type Parameters:
R - lane record type
All Known Implementing Classes:
LaneRecord, SimpleLaneRecord

public interface LaneRecordInterface<R extends LaneRecordInterface<R>>
Interface representing a lane for search algorithms, in particular PerceptionIterable.

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
  • Method Summary

    Modifier and Type
    Method
    Description
    default org.djunits.value.vdouble.scalar.Length
    getDistanceToPosition(org.djunits.value.vdouble.scalar.Length position)
    Returns the distance from the reference to the given location.
    Returns the lane.
    default org.djunits.value.vdouble.scalar.Length
    Returns the length of the lane.
    default org.djunits.value.vdouble.scalar.Length
    Returns the merge distance, i.e. the ego-distance after which this road merges with the road of this record.
    Set<? extends R>
    Returns a list of next lanes.
    Set<? extends R>
    Returns a list of previous lanes.
    org.djunits.value.vdouble.scalar.Length
    Returns the distance from a reference to the start of this lane, negative for upstream distance.
    default boolean
    Returns whether the record is part of the downstream branch.
    default Set<? extends R>
    Get lateral lanes.
  • Method Details

    • getNext

      Set<? extends R> getNext()
      Returns a list of next lanes.
      Returns:
      list of next lanes
    • getPrev

      Set<? extends R> getPrev()
      Returns a list of previous lanes.
      Returns:
      list of previous lanes
    • lateral

      default Set<? extends R> lateral()
      Get lateral lanes.
      Returns:
      lateral lanes.
    • getStartDistance

      org.djunits.value.vdouble.scalar.Length getStartDistance()
      Returns the distance from a reference to the start of this lane, negative for upstream distance.
      Returns:
      the distance from a reference to the start of this lane, negative for upstream distance
    • getLength

      default org.djunits.value.vdouble.scalar.Length getLength()
      Returns the length of the lane.
      Returns:
      length of the lane.
    • getLane

      Lane getLane()
      Returns the lane.
      Returns:
      lane
    • getDistanceToPosition

      default org.djunits.value.vdouble.scalar.Length getDistanceToPosition(org.djunits.value.vdouble.scalar.Length position)
      Returns the distance from the reference to the given location.
      Parameters:
      position - position on the lane
      Returns:
      distance from the reference to the given location
    • isDownstreamBranch

      default boolean isDownstreamBranch()
      Returns whether the record is part of the downstream branch. This means the GTU can potentially get here and the lane is not upstream or on the other branch upstream of a merge. Default implementation returns true.
      Returns:
      whether the record is part of the downstream branch
    • getMergeDistance

      default org.djunits.value.vdouble.scalar.Length getMergeDistance()
      Returns the merge distance, i.e. the ego-distance after which this road merges with the road of this record. Returns zero if this is not the other road upstream of a merge.
      Returns:
      merge distance.