1 package org.opentrafficsim.road.gtu.strategical;
2
3 import org.junit.Test;
4 import org.opentrafficsim.base.parameters.Parameters;
5 import org.opentrafficsim.core.geometry.OTSGeometryException;
6 import org.opentrafficsim.core.geometry.OTSLine3D;
7 import org.opentrafficsim.core.geometry.OTSPoint3D;
8 import org.opentrafficsim.core.gtu.GTUException;
9 import org.opentrafficsim.core.network.LinkType;
10 import org.opentrafficsim.core.network.Network;
11 import org.opentrafficsim.core.network.NetworkException;
12 import org.opentrafficsim.core.network.OTSLink;
13 import org.opentrafficsim.core.network.OTSNetwork;
14 import org.opentrafficsim.core.network.OTSNode;
15 import org.opentrafficsim.road.DefaultTestParameters;
16 import org.opentrafficsim.road.gtu.lane.tactical.LaneBasedCFLCTacticalPlanner;
17 import org.opentrafficsim.road.gtu.lane.tactical.following.CarFollowingModel;
18 import org.opentrafficsim.road.gtu.lane.tactical.following.IDMPlus;
19 import org.opentrafficsim.road.mock.MockSimulator;
20
21 import nl.tudelft.simulation.dsol.simulators.SimulatorInterface;
22
23
24
25
26
27
28
29
30
31
32
33 public class LaneBasedStrategicalRoutePlannerTest
34 {
35
36
37
38
39
40
41
42 @Test
43 public final void nextLinkDirectionTest() throws GTUException, NetworkException, OTSGeometryException
44 {
45 Network network = new OTSNetwork("next link direction test");
46
47 OTSNode fromNode = new OTSNode(network, "from", new OTSPoint3D(0, 0, 0));
48 OTSNode toNode = new OTSNode(network, "to", new OTSPoint3D(100, 0, 0));
49 OTSLine3D designLine = new OTSLine3D(fromNode.getPoint(), toNode.getPoint());
50 SimulatorInterface.TimeDoubleUnit simulator = MockSimulator.createMock();
51 OTSLink link = new OTSLink(network, "link", fromNode, toNode, LinkType.ROAD, designLine, simulator);
52 CarFollowingModel cfm = new IDMPlus();
53 LaneBasedCFLCTacticalPlanner tacticalPlanner = new LaneBasedCFLCTacticalPlanner(null, null, null);
54 Parameters params = DefaultTestParameters.create();
55
56
57
58 }
59 }