Class CrossSection

java.lang.Object
org.opentrafficsim.kpi.sampling.CrossSection
All Implemented Interfaces:
Serializable, Iterable<CrossSection.LanePosition>

public class CrossSection extends Object implements Serializable, Iterable<CrossSection.LanePosition>
A cross sections contains locations on lanes that together make up a cross section. It is not required that this is on a single road, i.e. the cross section may be any section in space.

Copyright (c) 2013-2024 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
See Also:
  • Constructor Details

    • CrossSection

      public CrossSection(Set<CrossSection.LanePosition> lanePositions)
      Constructor with set of lane positions.
      Parameters:
      lanePositions - set of lane locations
    • CrossSection

      public CrossSection(LinkData<?> link, double fraction)
      Constructor with link and fraction. Note that the fraction is used with the length of each lane. For curved links this fraction may not point to locations on the lane that are perfectly laterally adjacent. GTUs can thus possibly change lane at these gaps and be missed.
      Parameters:
      link - link
      fraction - fraction on link
  • Method Details