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