Class RoadSideDistraction.TrapezoidProfile
java.lang.Object
org.opentrafficsim.road.network.lane.object.RoadSideDistraction.TrapezoidProfile
- All Implemented Interfaces:
RoadSideDistraction.DistractionProfile
- Enclosing class:
- RoadSideDistraction
public static class RoadSideDistraction.TrapezoidProfile
extends Object
implements RoadSideDistraction.DistractionProfile
Distraction profile with trapezoid shape. The constant part is from the location of the distraction downstream.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Constructor Summary
ConstructorsConstructorDescriptionTrapezoidProfile(double maxDistraction, Length dMin, Length dMed, Length dMax) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDistraction(Length distance) Returns the level of distraction at the given distance.
-
Constructor Details
-
TrapezoidProfile
Constructor.- Parameters:
maxDistraction- maximum distraction (task-demand)dMin- distance before distraction where distraction starts to have effect (<0)dMed- distance beyond distraction where distraction has maximum effect (>0)dMax- distance beyond distraction where distraction no longer has effect (>dMed)
-
-
Method Details
-
getDistraction
Description copied from interface:RoadSideDistraction.DistractionProfileReturns the level of distraction at the given distance.- Specified by:
getDistractionin interfaceRoadSideDistraction.DistractionProfile- Parameters:
distance- negative when approaching- Returns:
- level of distraction (task-demand), empty if the distraction is no longer important
-