Class UpstreamNeighborsIterable

All Implemented Interfaces:
Iterable<HeadwayGTU>, PerceptionCollectable<HeadwayGTU,​LaneBasedGTU>, PerceptionIterable<HeadwayGTU>

public class UpstreamNeighborsIterable
extends AbstractPerceptionIterable<HeadwayGTU,​LaneBasedGTU,​Integer>
Iterable to find upstream GTU's.

Copyright (c) 2013-2019 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 19 feb. 2018
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • UpstreamNeighborsIterable

      public UpstreamNeighborsIterable​(LaneBasedGTU perceivingGtu, LaneRecord<?> root, Length initialPosition, Length maxDistance, RelativePosition relativePosition, HeadwayGtuType headwayGtuType, RelativeLane lane)
      Constructor.
      Parameters:
      perceivingGtu - LaneBasedGTU; perceiving GTU
      root - LaneRecord<?>; root record
      initialPosition - Length; position on the root record
      maxDistance - Length; maximum distance to search
      relativePosition - RelativePosition; position to which distance are calculated by subclasses
      headwayGtuType - HeadwayGtuType; type of HeadwayGTU to return
      lane - RelativeLane; relative lane (used for a left/right distinction to prevent dead-locks)
  • Method Details