public class LaneBasedIndividualCar extends AbstractLaneBasedIndividualGTU
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 |
LaneBasedIndividualCar.LaneBasedIndividualCarBuilder
Build an individual car and use easy setter methods to instantiate the car.
|
| Constructor and Description |
|---|
LaneBasedIndividualCar(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
GTUFollowingModel gtuFollowingModel,
LaneChangeModel laneChangeModel,
Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> initialLongitudinalPositions,
org.djunits.value.vdouble.scalar.Speed initialSpeed,
org.djunits.value.vdouble.scalar.Length.Rel length,
org.djunits.value.vdouble.scalar.Length.Rel width,
org.djunits.value.vdouble.scalar.Speed maximumVelocity,
LaneBasedRouteNavigator routeNavigator,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) |
LaneBasedIndividualCar(String id,
org.opentrafficsim.core.gtu.GTUType gtuType,
GTUFollowingModel gtuFollowingModel,
LaneChangeModel laneChangeModel,
Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> initialLongitudinalPositions,
org.djunits.value.vdouble.scalar.Speed initialSpeed,
org.djunits.value.vdouble.scalar.Length.Rel length,
org.djunits.value.vdouble.scalar.Length.Rel width,
org.djunits.value.vdouble.scalar.Speed maximumVelocity,
LaneBasedRouteNavigator routeNavigator,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass,
org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer)
Construct a new LaneBasedIndividualCar.
|
| 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() |
getLength, getMaximumVelocity, getSimulator, getWidthbestAccessibleAdjacentLane, deltaTimeForDistance, enterLane, fractionalPosition, fractionalPosition, fractionalPositions, fractionalPositions, getAcceleration, getAcceleration, getBounds, getGTUFollowingModel, getLaneChangeDistanceAndDirection, getLanes, getLastEvaluationTime, getLateralVelocity, getLocation, getLongitudinalVelocity, getLongitudinalVelocity, getNextEvaluationTime, getOdometer, getRouteNavigator, getVelocity, headway, headway, leaveLane, leaveLane, move, parallel, parallel, position, position, positions, positions, projectedPosition, timeAtDistance, toStringgetGTUType, getId, getReference, setRouteNavigatorpublic LaneBasedIndividualCar(String id, org.opentrafficsim.core.gtu.GTUType gtuType, GTUFollowingModel gtuFollowingModel, LaneChangeModel laneChangeModel, Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> initialLongitudinalPositions, org.djunits.value.vdouble.scalar.Speed initialSpeed, org.djunits.value.vdouble.scalar.Length.Rel length, org.djunits.value.vdouble.scalar.Length.Rel width, org.djunits.value.vdouble.scalar.Speed maximumVelocity, LaneBasedRouteNavigator routeNavigator, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator) throws NamingException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.gtu.GTUException
id - ID; the id of the GTUgtuType - GTUType; the type of GTU, e.g. TruckType, CarType, BusTypegtuFollowingModel - GTUFollowingModel; the following model, including a reference to the simulatorlaneChangeModel - LaneChangeModel; the lane change modelinitialLongitudinalPositions - Map<Lane, DoubleScalar.Rel<LengthUnit>>; the initial positions of the car
on one or more lanesinitialSpeed - DoubleScalar.Abs<SpeedUnit>; the initial speed of the car on the lanelength - DoubleScalar.Rel<LengthUnit>; the maximum length of the GTU (parallel with driving direction)width - DoubleScalar.Rel<LengthUnit>; the maximum width of the GTU (perpendicular to driving direction)maximumVelocity - DoubleScalar.Abs<SpeedUnit>;the maximum speed of the GTU (in the driving direction)routeNavigator - Route; the route that the GTU will followsimulator - OTSDEVSSimulatorInterface; the simulatorNamingException - if an error occurs when adding the animation handlerorg.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 a parameter is invalidpublic LaneBasedIndividualCar(String id, org.opentrafficsim.core.gtu.GTUType gtuType, GTUFollowingModel gtuFollowingModel, LaneChangeModel laneChangeModel, Map<Lane,org.djunits.value.vdouble.scalar.Length.Rel> initialLongitudinalPositions, org.djunits.value.vdouble.scalar.Speed initialSpeed, org.djunits.value.vdouble.scalar.Length.Rel length, org.djunits.value.vdouble.scalar.Length.Rel width, org.djunits.value.vdouble.scalar.Speed maximumVelocity, LaneBasedRouteNavigator routeNavigator, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass, org.opentrafficsim.core.gtu.animation.GTUColorer gtuColorer) throws NamingException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.gtu.GTUException
id - ID; the id of the GTUgtuType - GTUTYpe; the type of GTU, e.g. TruckType, CarType, BusTypegtuFollowingModel - GTUFollowingModel; the following model, including a reference to the simulatorlaneChangeModel - LaneChangeModel; the lane change modelinitialLongitudinalPositions - Map<Lane, DoubleScalar.Rel<LengthUnit>>; the initial positions of the car
on one or more lanesinitialSpeed - DoubleScalar.Abs<SpeedUnit>; the initial speed of the car on the lanelength - DoubleScalar.Rel<LengthUnit>; the maximum length of the GTU (parallel with driving direction)width - DoubleScalar.Rel<LengthUnit>; the maximum width of the GTU (perpendicular to driving direction)maximumVelocity - DoubleScalar.Abs<SpeedUnit>;the maximum speed of the GTU (in the driving direction)routeNavigator - Route the route that the GTU will followsimulator - OTSDEVSSimulatorInterface; the simulatoranimationClass - 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)NamingException - if an error occurs when adding the animation handlerorg.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 a parameter is invalidpublic 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 AbstractLaneBasedGTUCopyright © 2014–2015 Delft University of Technology. All rights reserved.