public class UpstreamNeighborsIterable extends AbstractPerceptionIterable<HeadwayGTU,LaneBasedGTU,Integer>
 Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. 
 BSD-style license. See OpenTrafficSim License.
 
AbstractPerceptionIterable.EntryAbstractPerceptionReiterable.PerceptionIterator, AbstractPerceptionReiterable.PrimaryIteratorEntryPerceptionCollectable.Intermediate<I>, PerceptionCollectable.PerceptionAccumulator<U,I>, PerceptionCollectable.PerceptionCollector<C,U,I>, PerceptionCollectable.PerceptionFinalizer<C,I>first, gtu, last| Constructor and Description | 
|---|
UpstreamNeighborsIterable(LaneBasedGTU perceivingGtu,
                         LaneRecord<?> root,
                         org.djunits.value.vdouble.scalar.Length initialPosition,
                         org.djunits.value.vdouble.scalar.Length maxDistance,
                         org.opentrafficsim.core.gtu.RelativePosition relativePosition,
                         HeadwayGtuType headwayGtuType,
                         RelativeLane lane)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected org.djunits.value.vdouble.scalar.Length | 
getDistance(LaneBasedGTU object,
           LaneRecord<?> record,
           org.djunits.value.vdouble.scalar.Length position)
Returns the distance to the object. 
 | 
protected AbstractPerceptionIterable.Entry | 
getNext(LaneRecord<?> record,
       org.djunits.value.vdouble.scalar.Length position,
       Integer counter)
Returns the next object(s) on the lane represented by the record. 
 | 
HeadwayGTU | 
perceive(LaneBasedGTU perceivingGtu,
        LaneBasedGTU object,
        org.djunits.value.vdouble.scalar.Length distance)
Returns a perceived version of the underlying object. 
 | 
getDx, isOnRoute, primaryIteratoraddNext, assureNext, collect, first, getPrimaryIterator, isEmpty, iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollectforEach, spliteratorpublic UpstreamNeighborsIterable(LaneBasedGTU perceivingGtu, LaneRecord<?> root, org.djunits.value.vdouble.scalar.Length initialPosition, org.djunits.value.vdouble.scalar.Length maxDistance, org.opentrafficsim.core.gtu.RelativePosition relativePosition, HeadwayGtuType headwayGtuType, RelativeLane lane)
perceivingGtu - LaneBasedGTU; perceiving GTUroot - R; root recordinitialPosition - Length; position on the root recordmaxDistance - Length; maximum distance to searchrelativePosition - RelativePosition; position to which distance are calculated by subclassesheadwayGtuType - HeadwayGtuType; type of HeadwayGTU to returnlane - RelativeLane; relative lane (used for a left/right distinction to prevent dead-locks)protected AbstractPerceptionIterable.Entry getNext(LaneRecord<?> record, org.djunits.value.vdouble.scalar.Length position, Integer counter) throws org.opentrafficsim.core.gtu.GTUException
getNext in class AbstractPerceptionIterable<HeadwayGTU,LaneBasedGTU,Integer>record - R; record representing the lane and directionposition - Length; position to look beyondcounter - C; counternull if noneorg.opentrafficsim.core.gtu.GTUException - on any exception in the processprotected org.djunits.value.vdouble.scalar.Length getDistance(LaneBasedGTU object, LaneRecord<?> record, org.djunits.value.vdouble.scalar.Length position)
Entry returned
 by getNext. The two methods need to be consistent with each other.getDistance in class AbstractPerceptionIterable<HeadwayGTU,LaneBasedGTU,Integer>object - U; underlying objectrecord - R; record representing the lane and directionposition - Length; position of the object on the lanepublic HeadwayGTU perceive(LaneBasedGTU perceivingGtu, LaneBasedGTU object, org.djunits.value.vdouble.scalar.Length distance) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.base.parameters.ParameterException
perceive in class AbstractPerceptionReiterable<HeadwayGTU,LaneBasedGTU>perceivingGtu - LaneBasedGTU; perceiving GTUobject - U; underlying objectdistance - Length; distance to the objectorg.opentrafficsim.core.gtu.GTUException - on exceptionorg.opentrafficsim.base.parameters.ParameterException - on invalid parameter value or missing parameterCopyright © 2014–2018 Delft University of Technology. All rights reserved.