Interface LaneStructureRecord

All Superinterfaces:
LaneRecord<LaneStructureRecord>
All Known Implementing Classes:
RollingLaneStructureRecord

public interface LaneStructureRecord
extends LaneRecord<LaneStructureRecord>

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

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version 13 aug. 2018
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • getFromNode

      Node getFromNode()
      Returns the the 'from' node of the link belonging to this lane, in the driving direction.
      Returns:
      Node; the 'from' node of the link belonging to this lane, in the driving direction
    • getToNode

      Node getToNode()
      Returns the the 'to' node of the link belonging to this lane, in the driving direction.
      Returns:
      Node; the 'to' node of the link belonging to this lane, in the driving direction
    • getLeft

      Returns the left LSR or null if not available. Left and right are relative to the driving direction.
      Returns:
      LaneStructureRecord; the left LSR or null if not available
    • getRight

      Returns the right LSR or null if not available. Left and right are relative to the driving direction.
      Returns:
      LaneStructureRecord; the right LSR or null if not available
    • legalLeft

      boolean legalLeft()
      Returns whether a left lane change is legal.
      Returns:
      whether a left lane change is legal
    • legalRight

      boolean legalRight()
      Returns whether a right lane change is legal.
      Returns:
      whether a right lane change is legal
    • physicalLeft

      boolean physicalLeft()
      Returns whether a left lane change is physically possible.
      Returns:
      whether a left lane change is physically possible
    • physicalRight

      boolean physicalRight()
      Returns whether a right lane change is physically possible.
      Returns:
      whether a right lane change is physically possible
    • possibleLeft

      default boolean possibleLeft​(boolean legal)
      Returns the left lane change possibility.
      Parameters:
      legal - boolean; legal, or otherwise physical, possibility
      Returns:
      boolean; left lane change possibility
    • possibleRight

      default boolean possibleRight​(boolean legal)
      Returns the right lane change possibility.
      Parameters:
      legal - boolean; legal, or otherwise physical, possibility
      Returns:
      boolean; right lane change possibility
    • isCutOffEnd

      boolean isCutOffEnd()
      Returns whether this lane has no next records as the lane structure was cut-off.
      Returns:
      whether this lane has no next records as the lane structure was cut-off
    • isCutOffStart

      boolean isCutOffStart()
      Returns whether this lane has no previous records as the lane structure was cut-off.
      Returns:
      whether this lane has no previous records as the lane structure was cut-off
    • isDeadEnd

      boolean isDeadEnd()
      Returns whether the record forms a dead-end.
      Returns:
      whether the record forms a dead-end
    • allowsRoute

      boolean allowsRoute​(Route route, GTUType gtuType) throws NetworkException
      Returns whether this lane allows the route to be followed.
      Parameters:
      route - Route; the route to follow
      gtuType - GTUType; gtu type
      Returns:
      whether this lane allows the route to be followed
      Throws:
      NetworkException - if no destination node
    • allowsRouteAtEnd

      boolean allowsRouteAtEnd​(Route route, GTUType gtuType) throws NetworkException
      Returns whether the end of this lane allows the route to be followed.
      Parameters:
      route - Route; the route to follow
      gtuType - GTUType; gtu type
      Returns:
      whether the end of this lane allows the route to be followed
      Throws:
      NetworkException - if no destination node