1
2
3
4
5
6
7
8
9
10
11 package nl.tudelft.simulation.traffic.controlpoint.real;
12
13 import java.rmi.RemoteException;
14 import nl.tudelft.simulation.dsol.simulators.SimulatorInterface;
15 import nl.tudelft.simulation.traffic.controlpoint.virtual.VirtualControlPoint;
16 import nl.tudelft.simulation.traffic.track.TrackInterface;
17 import nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface;
18
19 /***
20 * <br>
21 * (c) copyright 2003-2004 <a href="http://www.simulation.tudelft.nl">Delft
22 * University of Technology </a>, the Netherlands. <br>
23 * See for project information <a href="http://www.simulation.tudelft.nl">
24 * www.simulation.tudelft.nl </a> <br>
25 * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
26 * License (GPL) </a>, no warranty <br>
27 *
28 * @version Jun 21, 2004 <br>
29 * @author <a
30 * href="http://www.tbm.tudelft.nl/webstaf/alexandv/index.htm">Alexander
31 * Verbraeck </a>
32 */
33 public class RemoveControlPoint extends VirtualControlPoint
34 {
35 /***
36 * @param track
37 * @param progression
38 * @param simulator
39 */
40 public RemoveControlPoint(final TrackInterface track,
41 final double progression, final SimulatorInterface simulator)
42 {
43 super(track, progression, simulator);
44 System.out.println("removeControlpoint added on track " + track);
45 }
46
47 /***
48 * @see nl.tudelft.simulation.traffic.controlpoint.ControlPointInterface#pass(nl.tudelft.simulation.traffic.vehicle.VehiclePhysicalInterface)
49 */
50 public void pass(VehiclePhysicalInterface vehicle)
51 {
52 try
53 {
54 System.out.println("removeControlpoint track " + super.getTrack()
55 + ", remove vehicle " + vehicle);
56 vehicle.removeVehicle();
57 } catch (RemoteException e)
58 {
59 e.printStackTrace();
60 }
61 }
62 }