1 package org.opentrafficsim.road.gtu.lane.perception.mental;
2
3 import org.opentrafficsim.base.parameters.ParameterException;
4 import org.opentrafficsim.base.parameters.Parameters;
5 import org.opentrafficsim.core.gtu.GtuException;
6 import org.opentrafficsim.road.gtu.lane.LaneBasedGtu;
7 import org.opentrafficsim.road.gtu.lane.perception.LanePerception;
8
9
10
11
12
13
14
15
16
17
18
19 public class ConstantTask extends AbstractTask
20 {
21
22
23
24
25
26 public ConstantTask(final String id, final double taskDemand)
27 {
28 super(id);
29 setTaskDemand(taskDemand);
30 }
31
32
33 @Override
34 public double calculateTaskDemand(final LanePerception perception, final LaneBasedGtu gtu, final Parameters parameters)
35 throws ParameterException, GtuException
36 {
37 return getTaskDemand();
38 }
39 }