View Javadoc
1   package org.opentrafficsim.road.gtu.lane.perception.mental;
2   
3   import org.djutils.base.Identifiable;
4   import org.opentrafficsim.base.parameters.ParameterException;
5   import org.opentrafficsim.road.gtu.lane.perception.LanePerception;
6   
7   /**
8    * Interface for tasks, where each describes a fundamental relation between exogenous inputs causing a mental task demand.
9    * <p>
10   * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
11   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
12   * </p>
13   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
14   * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
15   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
16   */
17  public interface Task extends Identifiable
18  {
19  
20      /**
21       * Returns the gross task demand.
22       * @param perception perception
23       * @return gross task demand
24       * @throws ParameterException if a parameter is missing or out of bounds
25       */
26      double getTaskDemand(LanePerception perception) throws ParameterException;
27  
28      /**
29       * Returns the gross task demand as most recently returned by {@code getTaskDemand(LanePerception)}.
30       * @return gross task demand
31       */
32      double getTaskDemand();
33  
34  }