Class NoTrafficLane

  • All Implemented Interfaces:
    Serializable, Locatable, EventProducerInterface, org.opentrafficsim.base.Identifiable, Drawable

    public class NoTrafficLane
    extends Lane
    Lane without traffic, e.g. emergency lane next to highway.

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

    $LastChangedDate: 2015-09-16 19:20:07 +0200 (Wed, 16 Sep 2015) $, @version $Revision: 1405 $, by $Author: averbraeck $, initial version Feb 28, 2015

    Author:
    Alexander Verbraeck
    See Also:
    Serialized Form
    • Constructor Detail

      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffsetAtStart,
                             Length lateralOffsetAtEnd,
                             Length beginWidth,
                             Length endWidth,
                             boolean fixGradualLateralOffset)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffsetAtStart - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the start of the parent Link
        lateralOffsetAtEnd - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the end of the parent Link
        beginWidth - Length; start width, positioned symmetrically around the design line
        endWidth - Length; end width, positioned symmetrically around the design line
        fixGradualLateralOffset - boolean; true if gradualLateralOffset needs to be fixed
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffsetAtStart,
                             Length lateralOffsetAtEnd,
                             Length beginWidth,
                             Length endWidth)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffsetAtStart - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the start of the parent Link
        lateralOffsetAtEnd - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link at the end of the parent Link
        beginWidth - Length; start width, positioned symmetrically around the design line
        endWidth - Length; end width, positioned symmetrically around the design line
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             Length lateralOffset,
                             Length width)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        lateralOffset - Length; the lateral offset of the design line of the new CrossSectionLink with respect to the design line of the parent Link
        width - Length; width, positioned symmetrically around the design line
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
      • NoTrafficLane

        public NoTrafficLane​(CrossSectionLink parentLink,
                             String id,
                             List<CrossSectionSlice> crossSectionSlices)
                      throws OTSGeometryException,
                             NetworkException
        Parameters:
        parentLink - CrossSectionLink; Cross Section Link to which the element belongs.
        id - String; the id of the lane. Should be unique within the parentLink.
        crossSectionSlices - List<CrossSectionSlice>; The offsets and widths at positions along the line, relative to the design line of the parent link. If there is just one with and offset, there should just be one element in the list with Length = 0. If there are more slices, the last one should be at the length of the design line. If not, a NetworkException is thrown.
        Throws:
        OTSGeometryException - when creation of the geometry fails
        NetworkException - when id equal to null or not unique
    • Method Detail

      • getZ

        public final double getZ()
        Retrieve the Z offset (used to determine what covers what when drawing).
        Specified by:
        getZ in interface Locatable
        Overrides:
        getZ in class Lane
        Returns:
        double; the Z-offset for drawing (what's on top, what's underneath).