public class LaneChangeModelTest extends Object implements OTSModelInterface
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.
nl.tudelft.simulation.dsol.ModelInterface.CalendarDouble, nl.tudelft.simulation.dsol.ModelInterface.CalendarFloat, nl.tudelft.simulation.dsol.ModelInterface.CalendarLong, nl.tudelft.simulation.dsol.ModelInterface.Double, nl.tudelft.simulation.dsol.ModelInterface.DoubleUnit, nl.tudelft.simulation.dsol.ModelInterface.Float, nl.tudelft.simulation.dsol.ModelInterface.FloatUnit, nl.tudelft.simulation.dsol.ModelInterface.Long, nl.tudelft.simulation.dsol.ModelInterface.LongUnit
Constructor and Description |
---|
LaneChangeModelTest() |
Modifier and Type | Method and Description |
---|---|
void |
changeRight()
Test that a vehicle in the left lane changes to the right lane if that is empty, or there is enough room.
|
void |
constructModel(nl.tudelft.simulation.dsol.simulators.SimulatorInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> simulator) |
nl.tudelft.simulation.dsol.simulators.SimulatorInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> |
getSimulator() |
static Lane[] |
makeMultiLane(String name,
NodeGeotools.STR from,
NodeGeotools.STR to,
LaneType<String> laneType,
int laneCount)
Create a simple straight road with the specified number of Lanes.
|
public static Lane[] makeMultiLane(String name, NodeGeotools.STR from, NodeGeotools.STR to, LaneType<String> laneType, int laneCount) throws RemoteException, NamingException, NetworkException
name
- String; name of the Linkfrom
- Node; starting node of the new Laneto
- Node; ending node of the new LanelaneType
- LaneType<String>; the type of GTU that can use the laneslaneCount
- int; number of lanes in the roadNamingException
- when network error occursRemoteException
- when netwprk error occursNetworkException
public final void changeRight() throws RemoteException, NamingException, nl.tudelft.simulation.dsol.SimRuntimeException, NetworkException, GTUException
RemoteException
- on communications failureNamingException
- on ???nl.tudelft.simulation.dsol.SimRuntimeException
- on ???NetworkException
- on Network inconsistencyGTUException
public void constructModel(nl.tudelft.simulation.dsol.simulators.SimulatorInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> simulator) throws nl.tudelft.simulation.dsol.SimRuntimeException, RemoteException
constructModel
in interface nl.tudelft.simulation.dsol.ModelInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble>
nl.tudelft.simulation.dsol.SimRuntimeException
RemoteException
public nl.tudelft.simulation.dsol.simulators.SimulatorInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> getSimulator() throws RemoteException
getSimulator
in interface nl.tudelft.simulation.dsol.ModelInterface<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble>
RemoteException
Copyright © 2014–2015 Delft University of Technology. All rights reserved.