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 TypeMethodDescriptiondefault org.djunits.value.vdouble.scalar.LengthgetDistanceToPosition(org.djunits.value.vdouble.scalar.Length position) Returns the distance from the reference to the given location.getLane()Returns the lane.default org.djunits.value.vdouble.scalar.LengthReturns the length of the lane.default org.djunits.value.vdouble.scalar.LengthReturns the merge distance, i.e. the ego-distance after which this road merges with the road of this record.getNext()Returns a list of next lanes.getPrev()Returns a list of previous lanes.org.djunits.value.vdouble.scalar.LengthReturns the distance from a reference to the start of this lane, negative for upstream distance.default booleanReturns whether the record is part of the downstream branch.lateral()Get lateral lanes.
-
Method Details
-
getNext
Returns a list of next lanes.- Returns:
- list of next lanes
-
getPrev
Returns a list of previous lanes.- Returns:
- list of previous lanes
-
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 returnstrue.- 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.
-