Package org.opentrafficsim.core.gtu
Interface InternalGtu
-
- All Superinterfaces:
Drawable,EventProducerInterface,Gtu,Identifiable,Locatable,Serializable
- All Known Implementing Classes:
AbstractGtu
public interface InternalGtu extends Gtu
InternalGTU contains those methods that are visible to objects belonging to the GTU (e.g., OperationalPlanner, TacticalPlanner), but that are invisible for other GTUs.Copyright (c) 2020-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Fields inherited from interface org.opentrafficsim.core.gtu.Gtu
DESTROY_EVENT, INIT_EVENT, MOVE_EVENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AccelerationgetAcceleration(Time time)Retrieve the acceleration of this GTU at the specific time, along the direction of movement.LengthgetOdometer()Retrieve the current odometer value of this GTU.LengthgetOdometer(Time time)Retrieve the odometer value of this GTU at the specific time.OperationalPlangetOperationalPlan()Retrieve the current operational plan of this GTU.OperationalPlangetOperationalPlan(Time time)Retrieve the operational plan at a specific time.ParametersgetParameters()Retrieve the parameters of this GTU.SpeedgetSpeed(Time time)Retrieve the speed of this GTU at a specific time.StrategicalPlannergetStrategicalPlanner()Retrieve the strategical planner of this GTU.StrategicalPlannergetStrategicalPlanner(Time time)Retrieve the strategical planner of this GTU at a specific time.default TacticalPlanner<?,?>getTacticalPlanner()Retrieve the current tactical planner of this GTU.default TacticalPlanner<?,?>getTacticalPlanner(Time time)Retrieve the tactical planner of this GTU at a specific time.voidsetErrorHandler(GtuErrorHandler errorHandler)Sets the error handler.voidsetParameters(Parameters parameters)Set the parameters of this GTU.-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, getSourceId, hasListeners, numberOfListeners, removeListener
-
Methods inherited from interface org.opentrafficsim.core.gtu.Gtu
addGtu, destroy, getAcceleration, getBounds, getCenter, getChildren, getContourPoints, getFront, getGTUType, getId, getLength, getLocation, getMaximumAcceleration, getMaximumDeceleration, getMaximumSpeed, getParent, getPerceivableContext, getRear, getReference, getRelativePositions, getSimulator, getSpeed, getWidth, isDestroyed, removeGtu, setParent
-
-
-
-
Method Detail
-
getSpeed
Speed getSpeed(Time time)
Retrieve the speed of this GTU at a specific time.- Parameters:
time- Time; time at which to obtain the speed- Returns:
- Time; the current speed of the GTU, along the direction of movement.
-
getAcceleration
Acceleration getAcceleration(Time time)
Retrieve the acceleration of this GTU at the specific time, along the direction of movement.- Parameters:
time- Time; time at which to obtain the acceleration- Returns:
- Acceleration; the acceleration of the GTU at the specified time, along the direction of movement
-
getOdometer
Length getOdometer()
Retrieve the current odometer value of this GTU.- Returns:
- Length; the current odometer value
-
getOdometer
Length getOdometer(Time time)
Retrieve the odometer value of this GTU at the specific time. TODO explain who needs this method?- Parameters:
time- Time; time to obtain the odometer at- Returns:
- Length; the odometer value at given time
-
getParameters
Parameters getParameters()
Retrieve the parameters of this GTU.- Returns:
- Parameters; the parameters of this GTU
-
setParameters
void setParameters(Parameters parameters)
Set the parameters of this GTU.- Parameters:
parameters- Parameters; the new parameters
-
getStrategicalPlanner
StrategicalPlanner getStrategicalPlanner()
Retrieve the strategical planner of this GTU. This is the planner responsible for the overall 'mission' of the GTU, usually indicating where it needs to go. It operates by instantiating tactical planners to do the work.- Returns:
- StrategicalPlanner; the strategical planner
-
getStrategicalPlanner
StrategicalPlanner getStrategicalPlanner(Time time)
Retrieve the strategical planner of this GTU at a specific time. TODO explain who might use this method.- Parameters:
time- Time; time to obtain the strategical planner at- Returns:
- StrategicalPlanner; the strategical planner
-
getTacticalPlanner
default TacticalPlanner<?,?> getTacticalPlanner()
Retrieve the current tactical planner of this GTU. A tactical planner can generate operational plans.- Returns:
- TacticalPlanner; the current tactical planner
-
getTacticalPlanner
default TacticalPlanner<?,?> getTacticalPlanner(Time time)
Retrieve the tactical planner of this GTU at a specific time. TODO explain who might use this method.- Parameters:
time- Time; time to obtain the tactical planner at- Returns:
- TacticalPlanner; the tactical planner at the specified time
-
getOperationalPlan
OperationalPlan getOperationalPlan()
Retrieve the current operational plan of this GTU.- Returns:
- OperationalPlan; the current operational plan for the GTU
-
getOperationalPlan
OperationalPlan getOperationalPlan(Time time)
Retrieve the operational plan at a specific time. TODO explain who might use this method.- Parameters:
time- Time; time to obtain the operational plan at- Returns:
- OperationalPlan; the operational plan for the GTU at the given time
-
setErrorHandler
void setErrorHandler(GtuErrorHandler errorHandler)
Sets the error handler.- Parameters:
errorHandler- GTUErrorHandler; error handler
-
-