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