Class KpiDirectedLanePosition

  • All Implemented Interfaces:
    Serializable

    public class KpiDirectedLanePosition
    extends Object
    implements Serializable
    Store one position, direction and lane of a GTU.

    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.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 11, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • KpiDirectedLanePosition

        public KpiDirectedLanePosition​(LaneDataInterface lane,
                                       Length position,
                                       KpiGtuDirectionality gtuDirection)
        Construct a new DirectedLanePosition.
        Parameters:
        lane - LaneDataInterface; the lane for the position
        position - Length; the position on the lane, relative to the cross section link (design line)
        gtuDirection - KpiGtuDirectionality; the direction the vehicle is driving to -- either in the direction of the design line, or against it
    • Method Detail

      • getLaneData

        public final LaneDataInterface getLaneData()
        Retrieve the lane.
        Returns:
        LaneDataInterface; the lane for the position
      • getPosition

        public final Length getPosition()
        Retrieve the position on the lane.
        Returns:
        Length; the position on the lane, relative to the cross section link (design line)
      • getKpiGtuDirection

        public final KpiGtuDirectionality getKpiGtuDirection()
        Retrieve the gtuDirection.
        Returns:
        KpiGtuDirectionality; gtuDirection the direction the vehicle is driving to -- either in the direction of the design line, or against it
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object