Class ChannelTaskLaneChange
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTaskLaneChange
- All Implemented Interfaces:
Identifiable,ChannelTask,Task
Task demand for lane changing left and right. This is defined as the level of lane change desire if the lane change desire in
the relevant direction is equal or larger to the other direction. Otherwise it is 0.
Copyright (c) 2024-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<LanePerception,Set<ChannelTask>> Standard supplier that supplies instances for left and right lane-change task.Fields inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelTask
FRONT, IN_VEHICLE, LEFT, REAR, RIGHT -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateTaskDemand(LanePerception perception) Calculates the task demand.Return the channel this task pertains to.getId()Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask
getTaskDemand, getTaskDemandMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.Task
getTaskDemand, getTaskDemand
-
Field Details
-
SUPPLIER
Standard supplier that supplies instances for left and right lane-change task.
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdentifiable- Overrides:
getIdin classAbstractTask
-
getChannel
Description copied from interface:ChannelTaskReturn the channel this task pertains to.- Specified by:
getChannelin interfaceChannelTask- Returns:
- channel this task pertains to.
-
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
-