1
2
3
4
5
6
7
8
9
10
11 package nl.tudelft.simulation.traffic.vehicle;
12
13 import java.rmi.RemoteException;
14
15 import nl.tudelft.simulation.event.EventListenerInterface;
16 import nl.tudelft.simulation.event.EventProducerInterface;
17 import nl.tudelft.simulation.event.EventType;
18
19 /***
20 * This interface defines the behavior of the control of a vehicle. The control
21 * takes the decisions regarding the behavior of the vehicle based on the
22 * environment and its own internal parameters. For instance, it decides when
23 * and if to stop for trafficlights or adapt to speedlimits. <br>
24 * <br>
25 * For a detailed discussion of the involved logic, see the report (hyperlink?)
26 * and the source code of the implementation classes.
27 * <br>
28 * (c) copyright 2003-2004 <a href="http://www.simulation.tudelft.nl">Delft
29 * University of Technology </a>, the Netherlands. <br>
30 * See for project information <a href="http://www.simulation.tudelft.nl">
31 * www.simulation.tudelft.nl </a> <br>
32 * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General
33 * Public License (GPL) </a>, no warranty <br>
34 *
35 * @version Jul 4, 2004 <br>
36 * @author <a
37 * href="http://www.tbm.tudelft.nl/webstaf/alexandv/index.htm">Alexander
38 * Verbraeck </a>
39 */
40 public interface VehicleControlInterface
41 extends
42 EventListenerInterface,
43 EventProducerInterface
44 {
45 /***
46 * This event signifies that the control has updated itself.
47 */
48 public static final EventType UPDATE = new EventType("UPDATE");
49
50 /***
51 * The PLANNING_CHANGED event signals a change of planning by the control.
52 */
53 public static final EventType PLANNING_CHANGED = new EventType(
54 "PLANNING_CHANGED");
55
56 /***
57 * END_OF_SCHEDULED_SCENARIO is the event used for signalling the end of
58 * scheduled scenario.
59 *
60 */
61 public static final EventType END_OF_SCHEDULED_SCENARIO = new EventType(
62 "END_OF_SCHEDULED_SCENARIO");
63
64 /***
65 * This event is used by the vehiclePhysical to check a given scenario for
66 * any relevant physical events.
67 */
68 public static final EventType CHECK_SCENARIO_FOR_PHYSICAL_EVENTS = new EventType(
69 "CHECK_SCENARIO_FOR_PHYSICAL_EVENTS");
70
71 /***
72 * This event signals a change of acceleration
73 */
74 public static final EventType ACCELERATION_CHANGE = new EventType(
75 "ACCELERATION_CHANGE");
76
77 /***
78 * this method is needed to tell the vehicle to start driving
79 */
80 public void startDriving();
81
82 /***
83 * @return vehiclePhysical
84 */
85 public VehiclePhysicalInterface getVehiclePhysical();
86
87 /***
88 * @param vehiclePhysical The vehiclePhysical to set.
89 * @throws Exception
90 */
91 public void setVehiclePhysical(VehiclePhysicalInterface vehiclePhysical)
92 throws Exception;
93
94 /***
95 * remove the vehicle from the track
96 *
97 * @throws RemoteException
98 */
99 public void removeVehicle() throws RemoteException;
100
101 /***
102 * @return Returns the line.
103 */
104 public String getLine();
105
106 }