Class ChannelTaskRoadSideDistraction
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskRoadSideDistraction
- All Implemented Interfaces:
Identifiable,ChannelTask,Task
Channel implementation of task due to road side distraction.
Copyright (c) 2026-2026 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSupplier of distraction tasks. -
Field Summary
Fields inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTask
FRONT, IN_VEHICLE, LEFT, REAR, RIGHT -
Constructor Summary
ConstructorsConstructorDescriptionChannelTaskRoadSideDistraction(DistractionField distractionField, LateralDirectionality direction) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculateTaskDemand(LanePerception perception) Calculates the task demand.Return the channel this task pertains to.Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
getId, getTaskDemand, getTaskDemandMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.djutils.base.Identifiable
getIdMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.Task
getTaskDemand, getTaskDemand
-
Constructor Details
-
ChannelTaskRoadSideDistraction
public ChannelTaskRoadSideDistraction(DistractionField distractionField, LateralDirectionality direction) Constructor. This task applies to a subset of distractions depending on the direction:- LEFT: distractions on left lanes with NONE direction, and distractions on current lane with LEFT direction
- RIGHT: distractions on right lanes with NONE direction, and distractions on current lane with RIGHT direction
- NONE: distractions on current lane with NONE direction
- Parameters:
distractionField- distraction field, which should be shared amongst instancesdirection- direction of applicable distractions
-
-
Method Details
-
calculateTaskDemand
Description copied from class:AbstractTaskCalculates the task demand.- Specified by:
calculateTaskDemandin classAbstractTask- Parameters:
perception- perception- Returns:
- task demand
- Throws:
ParameterException- if a parameter is missing or out of bounds
-
getChannel
Description copied from interface:ChannelTaskReturn the channel this task pertains to.- Specified by:
getChannelin interfaceChannelTask- Returns:
- channel this task pertains to.
-