public class SinkSensor extends AbstractSensor
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.
$LastChangedDate: 2015-08-12 16:37:45 +0200 (Wed, 12 Aug 2015) $, @version $Revision: 1240 $, by $Author: averbraeck $,
initial version an 30, 2015
listeners
DEFAULT_SENSOR_ELEVATION, SENSOR_TRIGGER_EVENT
FIRST_POSITION, LAST_POSITION
EVERYTHING
Constructor and Description |
---|
SinkSensor(Lane lane,
Length position,
DEVSSimulatorInterface.TimeDoubleUnit simulator) |
SinkSensor(String dummy1,
Lane lane,
Length position,
RelativePosition.TYPE dummy2,
DEVSSimulatorInterface.TimeDoubleUnit simulator) |
Modifier and Type | Method and Description |
---|---|
SinkSensor |
clone(CrossSectionElement newCSE,
SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the LaneBasedObject for e.g., copying a network.
|
String |
toString() |
void |
triggerResponse(LaneBasedGTU gtu)
Implementation of the response to a trigger of this sensor by a GTU.
|
compareTo, equals, getDetectedGTUTypes, getPositionType, getSimulator, hashCode, isCompatible, trigger
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition
getBounds, getGeometry, getHeight, getId
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBounds, getDirection, getLane, getLocation, getLongitudinalPosition
getFullId, getGeometry, getHeight
getId
addListener, addListener, addListener, addListener, removeListener
public SinkSensor(Lane lane, Length position, DEVSSimulatorInterface.TimeDoubleUnit simulator) throws NetworkException
lane
- Lane; the lane that triggers the deletion of the GTU.position
- Length; the position of the sensorsimulator
- DEVSSimulatorInterface.TimeDoubleUnit; the simulator to enable animation.NetworkException
- when the position on the lane is out of bounds w.r.t. the center line of the lanepublic SinkSensor(String dummy1, Lane lane, Length position, RelativePosition.TYPE dummy2, DEVSSimulatorInterface.TimeDoubleUnit simulator) throws NetworkException
dummy1
- String; dummylane
- Lane; the lane that triggers the deletion of the GTU.position
- Length; the position of the sensordummy2
- RelativePosition.TYPE; dummysimulator
- DEVSSimulatorInterface.TimeDoubleUnit; the simulator to enable animation.NetworkException
- when the position on the lane is out of bounds w.r.t. the center line of the lanepublic final void triggerResponse(LaneBasedGTU gtu)
triggerResponse
in class AbstractSensor
gtu
- LaneBasedGTU; the lane based GTU that triggered this sensor.public final String toString()
toString
in class AbstractSensor
public SinkSensor clone(CrossSectionElement newCSE, SimulatorInterface.TimeDoubleUnit newSimulator) throws NetworkException
clone
in class AbstractSensor
newCSE
- CrossSectionElement; the new cross section element to which the clone belongsnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkNetworkException
- in case the cloning failsCopyright © 2014–2019 Delft University of Technology. All rights reserved.