public class CarTest extends Object
 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 | 
|---|---|
protected static class  | 
CarTest.Model
the helper model. 
 | 
| Constructor and Description | 
|---|
CarTest()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
carTest()
Test some basics of the Car class. 
 | 
static Lane | 
makeLane(LaneType<?> laneType)  | 
static LaneBasedIndividualCar<Integer> | 
makeReferenceCar(int nr,
                GTUType<?> gtuType,
                Lane lane,
                DoubleScalar.Rel<LengthUnit> initialPosition,
                DoubleScalar.Abs<SpeedUnit> initialSpeed,
                OTSDEVSSimulator simulator,
                GTUFollowingModel gtuFollowingModel,
                LaneChangeModel laneChangeModel)
Create a new Car. 
 | 
static OTSDEVSSimulator | 
makeSimulator()
Create the simplest possible simulator. 
 | 
public final void carTest()
                   throws RemoteException,
                          NetworkException,
                          nl.tudelft.simulation.dsol.SimRuntimeException,
                          NamingException,
                          GTUException
RemoteException - on network errorNetworkException - on ???nl.tudelft.simulation.dsol.SimRuntimeException - on ???NamingException - on ???GTUException - on ???public static OTSDEVSSimulator makeSimulator() throws RemoteException, nl.tudelft.simulation.dsol.SimRuntimeException, NamingException
RemoteException - on network errornl.tudelft.simulation.dsol.SimRuntimeException - on ???NamingException - on ???public static LaneBasedIndividualCar<Integer> makeReferenceCar(int nr, GTUType<?> gtuType, Lane lane, DoubleScalar.Rel<LengthUnit> initialPosition, DoubleScalar.Abs<SpeedUnit> initialSpeed, OTSDEVSSimulator simulator, GTUFollowingModel gtuFollowingModel, LaneChangeModel laneChangeModel) throws RemoteException, NamingException, NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
nr - int; the name (number) of the CargtuType - GTUType<?>; the type of the new carlane - Lane; the lane on which the new Car is positionedinitialPosition - DoubleScalar.Abs<LengthUnit>; the initial longitudinal position of the new CarinitialSpeed - DoubleScalar.Abs<SpeedUnit>; the initial speedsimulator - OTSDEVVSimulator; the simulator that controls the new Car (and supplies the initial value for
            getLastEvalutionTime())gtuFollowingModel - GTUFollowingModel; the GTU following modellaneChangeModel - LaneChangeModel; the lane change modelNamingException - on network error when making the animationRemoteException - when the simulator cannot be reached.NetworkException - when the GTU cannot be placed on the given lane.nl.tudelft.simulation.dsol.SimRuntimeException - when the move method cannot be scheduled.GTUException - when construction of the GTU fails (probably due to an invalid parameter)public static Lane makeLane(LaneType<?> laneType) throws NetworkException
laneType - LaneType<String>; the type of the laneNetworkException - on network errorCopyright © 2014–2015 Delft University of Technology. All rights reserved.