public class Distraction extends AbstractLaneBasedObject
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Distraction.DistractionProfile
Describes the profile around the distraction.
|
static class |
Distraction.TrapezoidProfile
Distraction profile with trapezoid shape.
|
| Constructor and Description |
|---|
Distraction(String id,
Lane lane,
org.djunits.value.vdouble.scalar.Length longitudinalPosition,
org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator,
Distraction.DistractionProfile profile) |
| Modifier and Type | Method and Description |
|---|---|
AbstractLaneBasedObject |
clone(CrossSectionElement newCSE,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the LaneBasedObject for e.g., copying a network.
|
Double |
getDistraction(org.djunits.value.vdouble.scalar.Length distance)
Returns the level of distraction at the given distance.
|
clone, getDirection, getFullId, getLane, getLocation, getLongitudinalPosition, toStringgetBounds, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBounds, makeGeometrypublic Distraction(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, org.opentrafficsim.core.dsol.OTSSimulatorInterface simulator, Distraction.DistractionProfile profile) throws org.opentrafficsim.core.network.NetworkException
id - String; idlane - Lane; lanelongitudinalPosition - Length; longitudinal positionsimulator - OTSSimulatorInterface; simulatorprofile - DistractionProfile; distraction profileorg.opentrafficsim.core.network.NetworkException - on network exceptionpublic AbstractLaneBasedObject clone(CrossSectionElement newCSE, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone in class AbstractLaneBasedObjectnewCSE - CrossSectionElement; the new cross section element to which the clone belongsnewSimulator - OTSSimulatorInterface; the new simulator for this networkanimation - boolean; whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException - in case the cloning failspublic Double getDistraction(org.djunits.value.vdouble.scalar.Length distance)
distance - Distance to distraction; negative when approachingnull if the distraction is no longer importantCopyright © 2014–2018 Delft University of Technology. All rights reserved.