public class LaneBasedIndividualGTU extends AbstractLaneBasedIndividualGTU
 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 | Class and Description | 
|---|---|
static class  | 
LaneBasedIndividualGTU.LaneBasedIndividualCarBuilder
Build an individual car and use easy setter methods to instantiate the car. 
 | 
CACHED_POSITION, CACHING, initialLocationThresholdDifference, NON_CACHED_POSITIONALIGN_COUNT, ALIGNED, operationalPlanLANE_CHANGE_EVENT, LANE_ENTER_EVENT, LANE_EXIT_EVENT, LANEBASED_DESTROY_EVENT, LANEBASED_INIT_EVENT, LANEBASED_MOVE_EVENT, LINK_ENTER_EVENT, LINK_EXIT_EVENT| Constructor and Description | 
|---|
LaneBasedIndividualGTU(String id,
                      org.opentrafficsim.core.gtu.GTUType gtuType,
                      org.djunits.value.vdouble.scalar.Length length,
                      org.djunits.value.vdouble.scalar.Length width,
                      org.djunits.value.vdouble.scalar.Speed maximumSpeed,
                      org.djunits.value.vdouble.scalar.Length front,
                      nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator,
                      org.opentrafficsim.core.network.OTSNetwork network)
Construct a new LaneBasedIndividualCar. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
destroy() | 
org.opentrafficsim.core.gtu.RelativePosition | 
getCenter() | 
nl.tudelft.simulation.immutablecollections.ImmutableSet<org.opentrafficsim.core.gtu.RelativePosition> | 
getContourPoints() | 
org.opentrafficsim.core.gtu.RelativePosition | 
getFront() | 
org.opentrafficsim.core.gtu.RelativePosition | 
getRear() | 
nl.tudelft.simulation.immutablecollections.ImmutableMap<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> | 
getRelativePositions() | 
void | 
initWithAnimation(LaneBasedStrategicalPlanner strategicalPlanner,
                 Set<DirectedLanePosition> initialLongitudinalPositions,
                 org.djunits.value.vdouble.scalar.Speed initialSpeed,
                 Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D<? super LaneBasedIndividualGTU>> animationClass,
                 org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer)  | 
String | 
toString() | 
getLength, getMaximumSpeed, getWidth, laneChangeAllowed, setNoLaneChangeDistanceaddGtuToLane, addTrigger, changeLaneInstantaneously, enterLane, finalizeLaneChange, fractionalPosition, fractionalPosition, fractionalPositions, fractionalPositions, getBounds, getCarFollowingAcceleration, getDesiredSpeed, getDirection, getReferencePosition, getStrategicalPlanner, getStrategicalPlanner, getTurnIndicatorStatus, getTurnIndicatorStatus, getVehicleModel, init, initLaneChange, isSafeToChange, leaveLane, leaveLane, move, position, position, positions, positions, projectedPosition, reinit, scheduleEnterLeaveTriggers, setParent, setTurnIndicatorStatus, setVehicleModel, translatedPositionaddGtu, equals, getAcceleration, getAcceleration, getBaseColor, getChildren, getGTUType, getId, getLocation, getMaximumAcceleration, getMaximumDeceleration, getOdometer, getOdometer, getOperationalPlan, getOperationalPlan, getParameters, getParent, getPerceivableContext, getReference, getSimulator, getSpeed, getSpeed, hashCode, init, interruptMove, isDestroyed, removeGtu, setMaximumAcceleration, setMaximumDeceleration, setParametersaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLocation, getTacticalPlanner, getTacticalPlanner, isBrakingLightsOn, isBrakingLightsOnaddGtu, getAcceleration, getAcceleration, getBaseColor, getChildren, getGTUType, getId, getMaximumAcceleration, getMaximumDeceleration, getOdometer, getOdometer, getOperationalPlan, getOperationalPlan, getParameters, getParent, getReference, getSimulator, getSpeed, getSpeed, isDestroyed, removeGtu, setParameterspublic LaneBasedIndividualGTU(String id, org.opentrafficsim.core.gtu.GTUType gtuType, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Length width, org.djunits.value.vdouble.scalar.Speed maximumSpeed, org.djunits.value.vdouble.scalar.Length front, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit simulator, org.opentrafficsim.core.network.OTSNetwork network) throws NamingException, org.opentrafficsim.core.gtu.GTUException
id - ID; the id of the GTUgtuType - GTUTYpe; the type of GTU, e.g. TruckType, CarType, BusTypelength - Length; the maximum length of the GTU (parallel with driving direction)width - Length; the maximum width of the GTU (perpendicular to driving direction)maximumSpeed - Speed;the maximum speed of the GTU (in the driving direction)front - Length; front distance relative to the reference positionsimulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulatornetwork - the network that the GTU is initially registered inNamingException - if an error occurs when adding the animation handlerorg.opentrafficsim.core.gtu.GTUException - when a parameter is invalidpublic final void initWithAnimation(LaneBasedStrategicalPlanner strategicalPlanner, Set<DirectedLanePosition> initialLongitudinalPositions, org.djunits.value.vdouble.scalar.Speed initialSpeed, Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D<? super LaneBasedIndividualGTU>> animationClass, org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer) throws org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.geometry.OTSGeometryException
strategicalPlanner - the strategical planner (e.g., route determination) to useinitialLongitudinalPositions - the initial positions of the car on one or more lanes with their directionsinitialSpeed - the initial speed of the car on the laneanimationClass - Class<? extends Renderable2D>; the class for animation or null if no animationgtuColorer - GTUColorer; the GTUColorer that will be linked from the animation to determine the color (may be null
            in which case a default will be used)org.opentrafficsim.core.network.NetworkException - when the GTU cannot be placed on the given lanenl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduledorg.opentrafficsim.core.gtu.GTUException - when initial values are not correctorg.opentrafficsim.core.geometry.OTSGeometryException - when the initial path is wrongpublic final org.opentrafficsim.core.gtu.RelativePosition getFront()
public final org.opentrafficsim.core.gtu.RelativePosition getRear()
public final org.opentrafficsim.core.gtu.RelativePosition getCenter()
public final nl.tudelft.simulation.immutablecollections.ImmutableMap<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> getRelativePositions()
public final nl.tudelft.simulation.immutablecollections.ImmutableSet<org.opentrafficsim.core.gtu.RelativePosition> getContourPoints()
public final void destroy()
destroy in interface org.opentrafficsim.core.gtu.GTUdestroy in class AbstractLaneBasedGTUpublic final String toString()
toString in class AbstractLaneBasedGTUCopyright © 2014–2018 Delft University of Technology. All rights reserved.