ID - The type of ID, e.g., String or Integerpublic abstract class AbstractGTU<ID> extends Object implements GTU<ID>
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
protected DoubleScalar.Abs<LengthUnit> |
odometer
Total traveled distance.
|
| Constructor and Description |
|---|
AbstractGTU(ID id,
GTUType<?> gtuType,
Route route) |
| Modifier and Type | Method and Description |
|---|---|
GTUType<?> |
getGTUType() |
ID |
getId() |
abstract DoubleScalar.Abs<LengthUnit> |
getOdometer()
Retrieve the odometer value.
|
RelativePosition |
getReference() |
Route |
getRoute() |
void |
setRoute(Route route) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, getAcceleration, getFront, getLength, getMaximumVelocity, getRear, getRelativePositions, getSimulator, getVelocity, getWidthprotected DoubleScalar.Abs<LengthUnit> odometer
public AbstractGTU(ID id, GTUType<?> gtuType, Route route) throws GTUException
id - the id of the GTU, could be String or IntegergtuType - the type of GTU, e.g. TruckType, CarType, BusTyperoute - Route; the route that the GTU will takeGTUException - when route is nullpublic final ID getId()
public GTUType<?> getGTUType()
getGTUType in interface GTU<ID>public final Route getRoute()
public final void setRoute(Route route)
route - set route.public final RelativePosition getReference()
getReference in interface GTU<ID>public abstract DoubleScalar.Abs<LengthUnit> getOdometer() throws RemoteException
RemoteException - on communications failureCopyright © 2014–2015 Delft University of Technology. All rights reserved.