1 package org.opentrafficsim.road.gtu.lane.perception.mental.channel;
2
3 import org.opentrafficsim.base.parameters.ParameterException;
4 import org.opentrafficsim.road.gtu.lane.perception.LanePerception;
5 import org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask;
6
7
8
9
10
11
12
13
14
15 public class ChannelTaskConstant extends AbstractTask implements ChannelTask
16 {
17
18
19 private final Object channel;
20
21
22 private final double taskDemand;
23
24
25
26
27
28
29
30 public ChannelTaskConstant(final String id, final Object channel, final double taskDemand)
31 {
32 super(id);
33 this.channel = channel;
34 this.taskDemand = taskDemand;
35 }
36
37 @Override
38 public Object getChannel()
39 {
40 return this.channel;
41 }
42
43 @Override
44 protected double calculateTaskDemand(final LanePerception perception) throws ParameterException
45 {
46 return this.taskDemand;
47 }
48
49 }