Class ChannelFuller
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.mental.Fuller
org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelFuller
- All Implemented Interfaces:
ChannelMental,Mental
Fuller implementation with perception channels. This is based on a set of task suppliers, which may either provide static
tasks (always the same) or a dynamic set of tasks (e.g. per conflicting road present). When relevant, task suppliers need to
map objects to channel keys when they are invoked to return the currently applicable channel tasks. For example mapping a
single conflict to a common key that refers to a channel based on a group of conflicts. In this way the correct perception
delay can be found when only knowing the single conflict, without knowing how it was grouped or what then defines the key.
Copyright (c) 2024-2025 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 ParameterTypeDoubleLevel of attention, which is the maximum in the steady state of the Attention Matrix.static final ParameterTypeDoubleErroneous estimation factor on distance and speed difference.static final ParameterTypeDoubleOver-estimation parameter type.static final ParameterTypeDurationMaximum perception delay.static final ParameterTypeDurationMinimum perception delay.static final ParameterTypeDoubleTask capability in nominal task capability units, i.e. mean is 1.static final ParameterTypeDoubleTask saturation.Fields inherited from interface org.opentrafficsim.road.gtu.lane.perception.mental.channel.ChannelMental
X0_D -
Constructor Summary
ConstructorsConstructorDescriptionChannelFuller(Collection<Function<LanePerception, Set<ChannelTask>>> taskSuppliers, Set<BehavioralAdaptation> behavioralAdapatations) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTaskSupplier(Function<LanePerception, Set<ChannelTask>> taskSupplier) Add task supplier.doublegetAttention(Object obj) Returns the level of attention of a perception channel.Returns the current channels.getPerceptionDelay(Object obj) Returns the perception delay belonging to a perception channel.getTasks()Returns the currently active tasks.protected doublegetTotalTaskDemand(LanePerception perception) Returns the total level of task demand, possibly after anticipation reliance.voidmapToChannel(Object obj, Object channel) Maps an object to a channel key.voidremoveTaskSupplier(Function<LanePerception, Set<ChannelTask>> taskSupplier) Remove task supplier.
-
Field Details
-
TC
Task capability in nominal task capability units, i.e. mean is 1. -
TS
Task saturation. -
OVER_EST
Over-estimation parameter type. Negative values reflect under-estimation. -
EST_FACTOR
Erroneous estimation factor on distance and speed difference. -
ATT
Level of attention, which is the maximum in the steady state of the Attention Matrix. -
TAU_MIN
Minimum perception delay. -
TAU_MAX
Maximum perception delay.
-
-
Constructor Details
-
ChannelFuller
public ChannelFuller(Collection<Function<LanePerception, Set<ChannelTask>>> taskSuppliers, Set<BehavioralAdaptation> behavioralAdapatations) Constructor.- Parameters:
taskSuppliers- task suppliers.behavioralAdapatations- behavioral adaptations.
-
-
Method Details
-
getTotalTaskDemand
Description copied from class:FullerReturns the total level of task demand, possibly after anticipation reliance.- Specified by:
getTotalTaskDemandin classFuller- Parameters:
perception- perception- Returns:
- level of task demand
- Throws:
ParameterException- if a parameter is missing or out of bounds
-
getTasks
Description copied from class:FullerReturns the currently active tasks. -
addTaskSupplier
Add task supplier.- Parameters:
taskSupplier- task supplier to add
-
removeTaskSupplier
Remove task supplier.- Parameters:
taskSupplier- task supplier to remove
-
getPerceptionDelay
Description copied from interface:ChannelMentalReturns the perception delay belonging to a perception channel.- Specified by:
getPerceptionDelayin interfaceChannelMental- Parameters:
obj- object that is a channel key, or that is mapped to a channel key.- Returns:
- perception delay belonging to a perception channel.
-
getAttention
Description copied from interface:ChannelMentalReturns the level of attention of a perception channel.- Specified by:
getAttentionin interfaceChannelMental- Parameters:
obj- object that is a channel key, or that is mapped to a channel key.- Returns:
- level of attention of a perception channel.
-
mapToChannel
Description copied from interface:ChannelMentalMaps an object to a channel key.- Specified by:
mapToChannelin interfaceChannelMental- Parameters:
obj- object.channel- channel key.
-
getChannels
Returns the current channels.- Returns:
- set of channels
-