public class FlankSensor 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.
DEFAULT_SENSOR_ELEVATION, SENSOR_TRIGGER_EVENTFIRST_POSITION, LAST_POSITIONEVERYTHING, MINUS, PLUS| Constructor and Description |
|---|
FlankSensor(String id,
Lane lane,
Length longitudinalPosition,
RelativePosition.TYPE positionType,
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
TrafficLightSensor parent,
Compatible compatible)
Construct a new FlankSensor.
|
| Modifier and Type | Method and Description |
|---|---|
FlankSensor |
clone(CrossSectionElement newCSE,
nl.tudelft.simulation.dsol.simulators.SimulatorInterface.TimeDoubleUnit newSimulator)
Clone the LaneBasedObject for e.g., copying a network.
|
TrafficLightSensor |
getParent()
Return the parent (TrafficLightSensor) of this FlankSensor.
|
String |
toString() |
protected void |
triggerResponse(LaneBasedGTU gtu)
Implementation of the response to a trigger of this sensor by a GTU.
|
compareTo, equals, getDetectedGTUTypes, getPositionType, getSimulator, hashCode, isCompatible, makeGeometry, triggerclone, getDirection, getFullId, getLane, getLocation, getLongitudinalPositiongetBounds, getGeometry, getHeight, getIdaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBounds, getDirection, getLane, getLocation, getLongitudinalPosition, makeGeometrygetFullId, getGeometry, getHeightgetIdpublic FlankSensor(String id, Lane lane, Length longitudinalPosition, RelativePosition.TYPE positionType, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator, TrafficLightSensor parent, Compatible compatible) throws NetworkException
id - String; the name of the new FlankSensorlane - Lane; the lane of the new FlankSensorlongitudinalPosition - Length; the longitudinal position of the new FlankSensorpositionType - TYPE; the position on the GTUs that triggers the new FlankSensorsimulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator engineparent - TrafficLightSensor; the traffic light sensor that deploys this FlankSensorcompatible - Compatible; object that determines if a GTU is detectable by the new FlankSensorNetworkException - when the network is inconsistentprotected final void triggerResponse(LaneBasedGTU gtu)
triggerResponse in class AbstractSensorgtu - LaneBasedGTU; the lane based GTU that triggered this sensor.public final FlankSensor clone(CrossSectionElement newCSE, nl.tudelft.simulation.dsol.simulators.SimulatorInterface.TimeDoubleUnit newSimulator) throws NetworkException
clone in class AbstractSensornewCSE - CrossSectionElement; the new cross section element to which the clone belongsnewSimulator - SimulatorInterface.TimeDoubleUnit; the new simulator for this networkNetworkException - in case the cloning failspublic final TrafficLightSensor getParent()
public final String toString()
toString in class AbstractSensorCopyright © 2014–2019 Delft University of Technology. All rights reserved.