public class LaneBasedTemplateCar extends AbstractLaneBasedTemplateGTU
Copyright (c) 2013-2015 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 |
LaneBasedTemplateCar.LaneBasedTemplateCarBuilder
Build a template car and use easy setter methods to instantiate the car.
|
| Constructor and Description |
|---|
LaneBasedTemplateCar(String id,
LaneBasedTemplateGTUType templateGtuType,
Set<DirectedLanePosition> initialLongitudinalPositions,
org.djunits.value.vdouble.scalar.Speed initialSpeed,
Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass,
org.opentrafficsim.core.network.OTSNetwork network) |
LaneBasedTemplateCar(String id,
LaneBasedTemplateGTUType templateGtuType,
Set<DirectedLanePosition> initialLongitudinalPositions,
org.djunits.value.vdouble.scalar.Speed initialSpeed,
org.opentrafficsim.core.network.OTSNetwork network) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
org.opentrafficsim.core.gtu.RelativePosition |
getFront() |
org.opentrafficsim.core.gtu.RelativePosition |
getRear() |
Map<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> |
getRelativePositions() |
String |
toString() |
getGTUType, getLength, getMaximumVelocity, getWidthenterLane, fractionalPosition, fractionalPosition, fractionalPositions, fractionalPositions, getBounds, getDrivingCharacteristics, getLanes, getPerception, getStrategicalPlanner, leaveLane, leaveLane, move, position, position, positions, positions, projectedPositiongetAcceleration, getAcceleration, getId, getLocation, getMaximumAcceleration, getMaximumDeceleration, getOdometer, getOperationalPlan, getReference, getSimulator, getTacticalPlanner, getVelocity, getVelocity, interruptMove, setMaximumAcceleration, setMaximumDecelerationpublic LaneBasedTemplateCar(String id, LaneBasedTemplateGTUType templateGtuType, Set<DirectedLanePosition> initialLongitudinalPositions, org.djunits.value.vdouble.scalar.Speed initialSpeed, org.opentrafficsim.core.network.OTSNetwork network) throws NamingException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.gtu.GTUException, InstantiationException, IllegalAccessException, org.opentrafficsim.core.geometry.OTSGeometryException
id - ID; the id of the GTUtemplateGtuType - the template of the GTUinitialLongitudinalPositions - Map<Lane, Length.Rel>; the initial positions of the car on one or more lanesinitialSpeed - Speed; the initial speed of the car on the lanenetwork - the network that the GTU is initially registered inNamingException - if an error occurs when adding the animation handler.org.opentrafficsim.core.network.NetworkException - when the GTU cannot be placed on the given lane.nl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduled.org.opentrafficsim.core.gtu.GTUException - when gtuFollowingModel is nullInstantiationException - in case Perception or StrategicPlanner instantiation failsIllegalAccessException - in case Perception or StrategicPlanner constructor is not publicorg.opentrafficsim.core.geometry.OTSGeometryException - when the initial path is wrongpublic LaneBasedTemplateCar(String id, LaneBasedTemplateGTUType templateGtuType, Set<DirectedLanePosition> initialLongitudinalPositions, org.djunits.value.vdouble.scalar.Speed initialSpeed, Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass, org.opentrafficsim.core.network.OTSNetwork network) throws NamingException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.gtu.GTUException, InstantiationException, IllegalAccessException, org.opentrafficsim.core.geometry.OTSGeometryException
id - ID; the id of the GTUtemplateGtuType - the template of the GTUinitialLongitudinalPositions - Map<Lane, Length.Rel>; the initial positions of the car on one or more lanesinitialSpeed - Speed; the initial speed of the car on the laneanimationClass - Class<? extends Renderable2D>; the class for animation or null if no animation.network - the network that the GTU is initially registered inNamingException - if an error occurs when adding the animation handler.org.opentrafficsim.core.network.NetworkException - when the GTU cannot be placed on the given lane.nl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduled.org.opentrafficsim.core.gtu.GTUException - when gtuFollowingModel is nullInstantiationException - in case Perception or StrategicPlanner instantiation failsIllegalAccessException - in case Perception or StrategicPlanner constructor is not publicorg.opentrafficsim.core.geometry.OTSGeometryException - when the initial path is wrongpublic org.opentrafficsim.core.gtu.RelativePosition getFront()
public org.opentrafficsim.core.gtu.RelativePosition getRear()
public final Map<org.opentrafficsim.core.gtu.RelativePosition.TYPE,org.opentrafficsim.core.gtu.RelativePosition> getRelativePositions()
public final void destroy()
destroy in interface org.opentrafficsim.core.gtu.GTUdestroy in class AbstractLaneBasedGTUpublic final String toString()
toString in class AbstractLaneBasedGTUCopyright © 2014–2016 Delft University of Technology. All rights reserved.