public interface GTU extends nl.tudelft.simulation.dsol.animation.Locatable, Serializable, nl.tudelft.simulation.event.EventProducerInterface, org.opentrafficsim.base.Identifiable
Copyright (c) 2013-2018 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 |
---|---|
static nl.tudelft.simulation.event.EventType |
DESTROY_EVENT
The event type for pub/sub indicating destruction of the GTU.
|
static nl.tudelft.simulation.event.EventType |
INIT_EVENT
The event type for pub/sub indicating the initialization of a new GTU.
|
static nl.tudelft.simulation.event.EventType |
MOVE_EVENT
The event type for pub/sub indicating a move.
|
Modifier and Type | Method and Description |
---|---|
void |
addGtu(GTU gtu)
Adds the provided GTU to this GTU, meaning it moves with this GTU.
|
void |
destroy()
Destroy the GTU from the simulation and animation.
|
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration() |
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration(org.djunits.value.vdouble.scalar.Time time) |
Color |
getBaseColor()
Return the base color of the GTU (not the state-based color).
|
RelativePosition |
getCenter() |
Set<GTU> |
getChildren()
Returns the children GTU's.
|
nl.tudelft.simulation.immutablecollections.ImmutableSet<RelativePosition> |
getContourPoints() |
RelativePosition |
getFront() |
GTUType |
getGTUType() |
String |
getId() |
org.djunits.value.vdouble.scalar.Length |
getLength() |
org.djunits.value.vdouble.scalar.Acceleration |
getMaximumAcceleration() |
org.djunits.value.vdouble.scalar.Acceleration |
getMaximumDeceleration() |
org.djunits.value.vdouble.scalar.Speed |
getMaximumSpeed() |
org.djunits.value.vdouble.scalar.Length |
getOdometer() |
org.djunits.value.vdouble.scalar.Length |
getOdometer(org.djunits.value.vdouble.scalar.Time time) |
OperationalPlan |
getOperationalPlan() |
OperationalPlan |
getOperationalPlan(org.djunits.value.vdouble.scalar.Time time) |
org.opentrafficsim.base.parameters.Parameters |
getParameters() |
GTU |
getParent()
Returns the parent GTU, or
null if this GTU has no parent. |
RelativePosition |
getRear() |
RelativePosition |
getReference() |
nl.tudelft.simulation.immutablecollections.ImmutableMap<RelativePosition.TYPE,RelativePosition> |
getRelativePositions() |
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit |
getSimulator() |
org.djunits.value.vdouble.scalar.Speed |
getSpeed() |
org.djunits.value.vdouble.scalar.Speed |
getSpeed(org.djunits.value.vdouble.scalar.Time time) |
StrategicalPlanner |
getStrategicalPlanner() |
StrategicalPlanner |
getStrategicalPlanner(org.djunits.value.vdouble.scalar.Time time) |
default TacticalPlanner<?,?> |
getTacticalPlanner() |
default TacticalPlanner<?,?> |
getTacticalPlanner(org.djunits.value.vdouble.scalar.Time time) |
org.djunits.value.vdouble.scalar.Length |
getWidth() |
boolean |
isDestroyed()
Returns whether the GTU is destroyed.
|
void |
removeGtu(GTU gtu)
Removes the provided GTU from this GTU, meaning it no longer moves with this GTU.
|
void |
setParameters(org.opentrafficsim.base.parameters.Parameters parameters) |
void |
setParent(GTU gtu)
Set the parent GTU.
|
static final nl.tudelft.simulation.event.EventType INIT_EVENT
static final nl.tudelft.simulation.event.EventType MOVE_EVENT
static final nl.tudelft.simulation.event.EventType DESTROY_EVENT
String getId()
getId
in interface org.opentrafficsim.base.Identifiable
org.djunits.value.vdouble.scalar.Length getLength()
org.djunits.value.vdouble.scalar.Length getWidth()
org.djunits.value.vdouble.scalar.Speed getMaximumSpeed()
org.djunits.value.vdouble.scalar.Acceleration getMaximumAcceleration()
org.djunits.value.vdouble.scalar.Acceleration getMaximumDeceleration()
GTUType getGTUType()
nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit getSimulator()
RelativePosition getReference()
RelativePosition getFront()
RelativePosition getRear()
RelativePosition getCenter()
nl.tudelft.simulation.immutablecollections.ImmutableSet<RelativePosition> getContourPoints()
nl.tudelft.simulation.immutablecollections.ImmutableMap<RelativePosition.TYPE,RelativePosition> getRelativePositions()
org.djunits.value.vdouble.scalar.Speed getSpeed()
org.djunits.value.vdouble.scalar.Speed getSpeed(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time at which to obtain the speedorg.djunits.value.vdouble.scalar.Acceleration getAcceleration()
org.djunits.value.vdouble.scalar.Acceleration getAcceleration(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time at which to obtain the accelerationorg.djunits.value.vdouble.scalar.Length getOdometer()
org.djunits.value.vdouble.scalar.Length getOdometer(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time to obtain the odometer atorg.opentrafficsim.base.parameters.Parameters getParameters()
void setParameters(org.opentrafficsim.base.parameters.Parameters parameters)
parameters
- Parameters; parametersStrategicalPlanner getStrategicalPlanner()
StrategicalPlanner getStrategicalPlanner(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time to obtain the strategical planner atdefault TacticalPlanner<?,?> getTacticalPlanner()
default TacticalPlanner<?,?> getTacticalPlanner(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time to obtain the tactical planner atOperationalPlan getOperationalPlan()
OperationalPlan getOperationalPlan(org.djunits.value.vdouble.scalar.Time time)
time
- Time; time to obtain the operational plan atvoid destroy()
boolean isDestroyed()
Color getBaseColor()
void addGtu(GTU gtu) throws GTUException
gtu
- GTU; gtu to enter this GTUGTUException
- if the gtu already has a parentvoid removeGtu(GTU gtu)
gtu
- GTU; gtu to exit this GTUvoid setParent(GTU gtu) throws GTUException
gtu
- GTU; parent GTU, may be null
GTUException
- if the gtu already has a parentGTU getParent()
null
if this GTU has no parent.null
if this GTU has no parentCopyright © 2014–2018 Delft University of Technology. All rights reserved.