1 package org.opentrafficsim.core.gtu2; 2 3 import java.io.Serializable; 4 import java.util.Map; 5 6 import nl.tudelft.simulation.dsol.animation.LocatableInterface; 7 8 import org.opentrafficsim.core.OTS_SCALAR; 9 import org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface; 10 11 /** 12 * Generalized Travel Unit. <br> 13 * A GTU is an object (person, car, ship) that can travel over the infrastructure. 14 * <p> 15 * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 16 * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>. 17 * <p> 18 * @version $Revision: 1165 $, $LastChangedDate: 2015-07-28 17:11:47 +0200 (Tue, 28 Jul 2015) $, by $Author: averbraeck $, 19 * initial version May 15, 2014 <br> 20 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 21 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 22 * @author <a href="http://www.citg.tudelft.nl">Guus Tamminga</a> 23 */ 24 public interface GTU extends LocatableInterface, Serializable, OTS_SCALAR 25 { 26 /** @return the id of the GTU */ 27 String getId(); 28 29 /** @return the maximum length of the GTU (parallel with driving direction). */ 30 Length.Rel getLength(); 31 32 /** @return the maximum width of the GTU (perpendicular to driving direction). */ 33 Length.Rel getWidth(); 34 35 /** @return the maximum velocity of the GTU, in the linear direction */ 36 Speed.Abs getMaximumVelocity(); 37 38 /** @return the type of GTU, e.g. TruckType, CarType, BusType */ 39 GTUType getGTUType(); 40 41 /** @return the simulator of the GTU. */ 42 OTSDEVSSimulatorInterface getSimulator(); 43 44 /** @return the reference position of the GTU, by definition (0, 0, 0). */ 45 RelativePosition getReference(); 46 47 /** @return the front position of the GTU, relative to its reference point. */ 48 RelativePosition getFront(); 49 50 /** @return the rear position of the GTU, relative to its reference point. */ 51 RelativePosition getRear(); 52 53 /** @return the current velocity of the GTU, combining longitudinal, lateral and vertical speed components. */ 54 Speed.Abs getVelocity(); 55 56 /** @return the positions for this GTU. */ 57 Map<RelativePosition.TYPE, RelativePosition> getRelativePositions(); 58 59 /** destroy the vehicle from the simulation and animation. */ 60 void destroy(); 61 62 /** @return the current acceleration of the GTU, combining longitudinal, lateral and vertical acceleration components. */ 63 Acceleration.Abs getAcceleration(); 64 65 /** @return Speed.Abs; the current odometer value */ 66 Length.Abs getOdometer(); 67 68 }