1 package org.opentrafficsim.road.gtu.lane.perception.mental.ar;
2
3 import org.opentrafficsim.road.gtu.lane.perception.mental.AbstractTask;
4
5 /**
6 * Has id, task demand and anticipation reliance as internal variables.
7 * <p>
8 * Copyright (c) 2025-2025 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9 * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
10 * </p>
11 * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
12 * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
13 * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
14 */
15 public abstract class AbstractArTask extends AbstractTask implements ArTask
16 {
17
18 /** Anticipation reliance. */
19 private double anticipationReliance;
20
21 /**
22 * Constructor.
23 * @param id id
24 */
25 public AbstractArTask(final String id)
26 {
27 super(id);
28 }
29
30 @Override
31 public void setAnticipationReliance(final double anticipationReliance)
32 {
33 this.anticipationReliance = anticipationReliance;
34 }
35
36 @Override
37 public double getAnticipationReliance()
38 {
39 return this.anticipationReliance;
40 }
41
42 @Override
43 public String toString()
44 {
45 return "ArTask (" + getId() + ")";
46 }
47 }