ID - The type of ID, e.g., String or Integerpublic class LaneBasedIndividualCar<ID> extends AbstractLaneBasedIndividualGTU<ID>
Copyright (c) 2013-2014 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<ID>
Build an individual car and use easy setter methods to instantiate the car.
|
odometer| Constructor and Description |
|---|
LaneBasedIndividualCar(ID id,
GTUType<?> gtuType,
GTUFollowingModel gtuFollowingModel,
LaneChangeModel laneChangeModel,
Map<Lane,DoubleScalar.Rel<LengthUnit>> initialLongitudinalPositions,
DoubleScalar.Abs<SpeedUnit> initialSpeed,
DoubleScalar.Rel<LengthUnit> length,
DoubleScalar.Rel<LengthUnit> width,
DoubleScalar.Abs<SpeedUnit> maximumVelocity,
Route route,
OTSDEVSSimulatorInterface simulator) |
LaneBasedIndividualCar(ID id,
GTUType<?> gtuType,
GTUFollowingModel gtuFollowingModel,
LaneChangeModel laneChangeModel,
Map<Lane,DoubleScalar.Rel<LengthUnit>> initialLongitudinalPositions,
DoubleScalar.Abs<SpeedUnit> initialSpeed,
DoubleScalar.Rel<LengthUnit> length,
DoubleScalar.Rel<LengthUnit> width,
DoubleScalar.Abs<SpeedUnit> maximumVelocity,
Route route,
OTSDEVSSimulatorInterface simulator,
Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass,
GTUColorer gtuColorer)
Construct a new LaneBasedIndividualCar.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
destroy the vehicle from the simulation and animation.
|
RelativePosition |
getFront() |
RelativePosition |
getRear() |
Map<RelativePosition.TYPE,RelativePosition> |
getRelativePositions() |
String |
toString() |
getLength, getMaximumVelocity, getSimulator, getWidthaddFrontToSubsequentLane, addLane, deltaTimeForDistance, fractionalPosition, fractionalPosition, fractionalPositions, fractionalPositions, getAcceleration, getAcceleration, getBounds, getGTUFollowingModel, getLaneChangeDistanceAndDirection, getLanes, getLastEvaluationTime, getLateralVelocity, getLocation, getLongitudinalVelocity, getLongitudinalVelocity, getNextEvaluationTime, getOdometer, getVelocity, headway, headway, move, parallel, parallel, position, position, positions, positions, projectedPosition, removeLane, timeAtDistance, toStringgetGTUType, getId, getReference, getRoute, setRouteclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetGTUType, getId, getReferencepublic LaneBasedIndividualCar(ID id, GTUType<?> gtuType, GTUFollowingModel gtuFollowingModel, LaneChangeModel laneChangeModel, Map<Lane,DoubleScalar.Rel<LengthUnit>> initialLongitudinalPositions, DoubleScalar.Abs<SpeedUnit> initialSpeed, DoubleScalar.Rel<LengthUnit> length, DoubleScalar.Rel<LengthUnit> width, DoubleScalar.Abs<SpeedUnit> maximumVelocity, Route route, OTSDEVSSimulatorInterface simulator) throws NamingException, RemoteException, NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
id - ID; the id of the GTU, could be String or IntegergtuType - 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)route - Route; the route that the GTU will followsimulator - OTSDEVSSimulatorInterface; the simulatorNamingException - if an error occurs when adding the animation handlerRemoteException - when the simulator cannot be reachedNetworkException - when the GTU cannot be placed on the given lanenl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduledGTUException - when a parameter is invalidpublic LaneBasedIndividualCar(ID id, GTUType<?> gtuType, GTUFollowingModel gtuFollowingModel, LaneChangeModel laneChangeModel, Map<Lane,DoubleScalar.Rel<LengthUnit>> initialLongitudinalPositions, DoubleScalar.Abs<SpeedUnit> initialSpeed, DoubleScalar.Rel<LengthUnit> length, DoubleScalar.Rel<LengthUnit> width, DoubleScalar.Abs<SpeedUnit> maximumVelocity, Route route, OTSDEVSSimulatorInterface simulator, Class<? extends nl.tudelft.simulation.dsol.animation.D2.Renderable2D> animationClass, GTUColorer gtuColorer) throws NamingException, RemoteException, NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
id - ID; the id of the GTU, could be String or IntegergtuType - 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)route - 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 handlerRemoteException - when the simulator cannot be reachedNetworkException - when the GTU cannot be placed on the given lanenl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduledGTUException - when a parameter is invalidpublic RelativePosition getFront()
public RelativePosition getRear()
public final Map<RelativePosition.TYPE,RelativePosition> getRelativePositions()
public final void destroy()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.