public static class Distraction.TrapezoidProfile extends Object implements Distraction.DistractionProfile
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.
Constructor and Description |
---|
TrapezoidProfile(double maxDistraction,
Length dMin,
Length dMed,
Length dMax) |
Modifier and Type | Method and Description |
---|---|
Double |
getDistraction(Length distance)
Returns the level of distraction at the given distance.
|
public TrapezoidProfile(double maxDistraction, Length dMin, Length dMed, Length dMax)
maxDistraction
- double; maximum distraction (task-demand)dMin
- Length; distance before distraction where distraction starts to have effect (<0)dMed
- Length; distance beyond distraction where distraction has maximum effect (>0)dMax
- Length; distance beyond distraction where distraction no longer has effect (>dMed)public Double getDistraction(Length distance)
getDistraction
in interface Distraction.DistractionProfile
distance
- Distance to distraction; negative when approachingnull
if the distraction is no longer importantCopyright © 2014–2019 Delft University of Technology. All rights reserved.