1 package org.opentrafficsim.demo.fd;
2
3 import org.opentrafficsim.core.dsol.AbstractOtsModel;
4 import org.opentrafficsim.core.dsol.OtsSimulatorInterface;
5 import org.opentrafficsim.core.network.Network;
6 import org.opentrafficsim.road.network.RoadNetwork;
7
8 import nl.tudelft.simulation.dsol.SimRuntimeException;
9
10
11
12
13
14
15
16
17
18
19
20 public class FundamentalDiagramModel extends AbstractOtsModel
21 {
22
23
24 private static final long serialVersionUID = 20200516L;
25
26
27 private RoadNetwork network;
28
29
30
31
32 public FundamentalDiagramModel(final OtsSimulatorInterface simulator)
33 {
34 super(simulator, "FD Demo", "Fundamental Diagram Demo");
35 }
36
37
38 @Override
39 public Network getNetwork()
40 {
41 return this.network;
42 }
43
44
45 @Override
46 public void constructModel() throws SimRuntimeException
47 {
48 this.network = new RoadNetwork("FdNetwork", getSimulator());
49 }
50
51 }