Package org.opentrafficsim.kpi.sampling
Class KpiLaneDirection
- java.lang.Object
-
- org.opentrafficsim.kpi.sampling.KpiLaneDirection
-
- All Implemented Interfaces:
Serializable
public class KpiLaneDirection extends Object implements Serializable
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Mar 30, 2016
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KpiLaneDirection(LaneDataInterface lane, KpiGtuDirectionality direction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
KpiGtuDirectionality
getKpiDirection()
LaneDataInterface
getLaneData()
Length
getPositionInDirection(Length position)
Returns the position with increasing value in the direction of travel, i.e.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
KpiLaneDirection
public KpiLaneDirection(LaneDataInterface lane, KpiGtuDirectionality direction)
- Parameters:
lane
- LaneDataInterface; the lanedirection
- KpiGtuDirectionality; the direction to drive on this lane
-
-
Method Detail
-
getLaneData
public final LaneDataInterface getLaneData()
- Returns:
- the lane
-
getKpiDirection
public final KpiGtuDirectionality getKpiDirection()
- Returns:
- the direction to drive on this lane
-
getPositionInDirection
public final Length getPositionInDirection(Length position)
Returns the position with increasing value in the direction of travel, i.e. the node to the back of the vehicle is at x = 0 while the node in front of the vehicle is at x =lane.getLength()
, irrespective of the design line direction.- Parameters:
position
- Length; the position on the lane irrespective of the direction- Returns:
- position with increasing value in the direction of travel
-
-