public class StopLineLane extends AbstractSensor
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
StopLineLane(Lane<?,?> lane,
DoubleScalar.Rel<LengthUnit> longitudinalPositionFromEnd)
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 |
|---|---|
protected void |
createStopGTU(OTSDEVSSimulatorInterface simulator)
Set up the block.
|
protected void |
removeStopGTU()
Remove the block.
|
String |
toString() |
void |
trigger(LaneBasedGTU<?> gtu)
Trigger an action on the GTU.
|
compareTo, equals, getLane, getLongitudinalPosition, getLongitudinalPositionSI, getName, getPositionType, hashCodepublic StopLineLane(Lane<?,?> lane, DoubleScalar.Rel<LengthUnit> longitudinalPositionFromEnd)
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.longitudinalPositionFromEnd - longitudinal position from the end TODO change for position, not from the end.public final void trigger(LaneBasedGTU<?> gtu)
sensor.trigger(this);. gtu - the GTU for which to carry out the trigger action.protected final void createStopGTU(OTSDEVSSimulatorInterface simulator) throws RemoteException
simulator - the simulator for the stop GTURemoteException - on communications failureprotected final void removeStopGTU()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.