public class SensorLaneEnd extends AbstractSensor
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
SensorLaneEnd(Lane lane)
Place a sensor that is triggered with the back of the GTU one ulp (see
Math.ulp(double d) ) before
the end of the lane to make sure it will always be triggered, independent of the algorithm used to move the GTU. |
Modifier and Type | Method and Description |
---|---|
String |
toString() |
void |
trigger(LaneBasedGTU<?> gtu)
Trigger an action on the GTU.
|
compareTo, equals, getLane, getLongitudinalPosition, getLongitudinalPositionSI, getPositionType, hashCode
public SensorLaneEnd(Lane lane)
Math.ulp(double d)
) before
the end of the lane to make sure it will always be triggered, independent of the algorithm used to move the GTU.lane
- The lane for which this is a sensor.public final void trigger(LaneBasedGTU<?> gtu)
sensor.trigger(this);
. gtu
- the GTU for which to carry out the trigger action.Copyright © 2014–2015 Delft University of Technology. All rights reserved.