SUMO simulates roads and vehicle movement, OMNeT++ runs the network, and Simu5G models the LTE/NR protocol stack and RAN/core behavior. SUMO is the mobility engine and Simu5G is the radio/network engine, then connect vehicle positions from SUMO to UE mobility in OMNeT++. Simu5G already supports vehicular mobility, dual connectivity, multiple gNBs/eNBs, and heterogeneous deployments, so SUMO is mainly used to drive realistic movement and handovers.
**Note:** Veins mobility manager is the bridge that synchronizes SUMO mobility updates with OMNeT++ nodes (see [clause 5.3.2.4.4](#53244-installation)).
The figure below shows the SUMO architecture overview.
The figure below shows the SUMO architecture overview.
##### 5.3.2.4.2 Focused on vehicular mobility at Monaco
The SUMO framework provides several tools and scripts to import OpenStreetMap (OSM) data and generate a road network. The following tools are available:
-`netconvert`: Converts OSM data to a road network.
-`netgenerate`: Generates a road network from a road network file.
-`netedit`: Edits a road network.
-`netconvert`: Converts OSM data to a road network.
-`netgenerate`: Generates a road network from a road network file.
-`netedit`: Edits a road network.
**Note:** the link [https://www.openstreetmap.org/export](https://www.openstreetmap.org/export) can also be used to import OSM data.
The script creates a sumo road network from the given osm file is osmGet.py:
```bash
$ python3 osmBuild.py --osm-file <osm-file> --vehicle-classes all --pedestrian
```
The SUMO road network scenario looks like the following:
The OSM Web Wizard script is a web-based tool that offers an easy solutions to start modeling traffic scenarios with SUMO. The user can specify the area to model graphically through an openstreetmap map excerpt, and configure a randomized traffic demand and run and visualize the scenario in the sumo-gui. To run this tool, the following command must be run:

##### 5.3.2.4.2.1 Round0: Describe the project
##### 5.3.2.4.2.1.1 The network topology
The objectives is to create a squeleton of simulation of one vehicular mobility at Monaco harbor.
The network topology is the following:
- One POA4G (4G macro cell);
- One POA5G (5G small cell);
- One high velocity UE (vehicle).
- One low velocity UE (pedestrian).
For the vehicular mobility, the following is considered:
- There is a handover from the 4G macro cell to the 5G small cell;
- The UEs are moving from the 4G macro cell to the 5G small cell;
- Simu5G/SimuLTE is using the emulation mode to connect the simulated network to the real network;
- iperf3 is used as real application on the UE side and the server side and also to measure network characteristics such as the throughput and the latency (see [Annex A](#annex-a-feasibility-study-for-replacing-the-current-network-simulation-with-simu5gsimulte-simulators)).
The figure below shows the network topology.
**TODO**: To be done
##### 5.3.2.4.2.1.2 The SUMO road network scenario
In addintion of the road network, the SUMO framework requires the "demand modelling" to be defined. The demand modelling describes the car and the pedestrian traffic flow.
##### 5.3.2.4.2.3 Round2: Setup the NED file and the omnetpp.ini file
The NED file that models the network topology is the following:
- One LTE eNB;
- One 5G gNB;
- One dual-access UE driven by SUMO mobility;
- One NAT router;
- One external router/server side for emulation.
The packets go through ExtLowerEthernetInterface, veth pairs, and a NAT router that rewrites addresses so external applications can talk through the simulated network.

The INI file sets the simulation parameters:
- One SUMO-driven UE;
- Dual connectivity between LTE and 5G;
- Real-time emulation through veth/NAT;
- Room for handover testing.
##### 5.3.2.4.4 Installation
##### 5.3.2.4.2.4 Round3: Describe the SUMO road scenario
The purpose is to define the road graph so vehicles circulate around the port basin and along the quay roads, with a loop that repeatedly crosses the LTE/5G overlap area. That is ideal for handover testing because the UE alternates between stronger LTE and stronger 5G zones.
**TODO**: To be refined
##### 5.3.2.4.2.5 Round4: Execute and debug the first simulation
The purpose of this clause is to execute and debug the first simulation.
The first step is to start the simulation manually:
1. Setup the veth;
2. Start the the SUMO simulation;
3. ???
4. Start the iperf3 server on UE-side sim-veth1;
5. Start the iperf3 client on client-side sim-veth2;
6. Verify that the traffic is flowing through the simulated network;
7. Terminate the simulation;
8. Delete the veth.
The second step is to start the simulation using the Makefile:
```bash
$ clear && make clean && make && make run
```
**Note:** The traffic simulation is generated in separated consoles.
##### 5.3.2.4.2.6 Round5: Conclusion
Getting this simulation working and the traffic flowing through the simulated network is a major milestone. It validates the feasibility of the new network simulation approach to replace the current network simulation approach in the ETSI MEC Sandbox [\[i.1\]](#_ref_i.1).
The next clauses introduce:
- The Veins framework to enhance this first project ([clause 5.3.2.5](#5325-viens-learning));
- Additional code to extract radio network information ([clause 5.3.2.6](#5326-gathering-network-information));
- Additional code to extract position of the UE ([clause 5.3.2.7](#5327-gathering-positions-of-the-ue));
- and network characteristics from the simulation ([clause 5.3.2.8](#5328-gathering-network-characteristics)).
To verify that the SUMO simulation is working as expected, the following command can be used:
```bash
$ source ~/setenv.sh
$ sumo-gui
```
##### 5.3.2.4.4 Notes
**Note 1:** Use SUMO online documentation to learn the basics of SUMO.
**Note 1:** Use SUMO online documentation to learn the basics of SUMO.
**Note 2:** Do not forget to add SUMO environment variables to the shell profile.
**Note 2:** Do not forget to add SUMO environment variables to the shell profile.
**Note 3:** Using tutorial sample in command line:
#### 5.3.2.5 Veins learning
#### 5.3.2.5.1 Veins architecture overview
The Veins framework includes a comprehensive suite of models to make vehicular network simulations as realistic as possible, without sacrificing speed. The GUI and IDE of OMNeT++ and SUMO can be used for quickly setting up and interactively running simulations.
The figure below shows the Veins architecture overview.
#### 5.3.2.5.2 Enhance monaco-harbor project with Veins
The purpose of this clause is to enhance the monaco-harbor project with Veins.
**TODO**
#### 5.3.2.5.3 Installation
The procedure to install Veins is the following:
```bash
```bash
$ cd sumo-src-1.25.0/tutorials/tutorial
$ tar xvzf ./veins-src-5.3.1.tar.gz
$ sumo-gui
$ cd veins-src-5.3.1
$ ./configure
$ make
$ make install
```
```
#### 5.3.2.5 Viens learning
#### 5.3.2.6 Gathering network information
The purpose of this clause is to gather the network information from the simulation. The network information element are the one described by the ETSI MEC 012 [\[i.5\]](#_ref_i.5) and ETSI MEC 013 [\[i.6\]](#_ref_i.6):
- S1 bearer information;
- RAB information;
- L2 measurements.
#### 5.3.2.6.1 Gathering S1 bearer information
**TODO**: To be refined
#### 5.3.2.7 Gathering positions of the UE
**TODO**: To be refined
#### 5.3.2.8 Gathering network characteristics
**TODO**: To be refined
## 5.4 Round 1: Architecture and Spikes
## 5.4 Round 1: Architecture and Spikes
### 5.4.1 Introduction
### 5.4.1 Introduction
The purpose of this round is:
Based on the previous round, the following tasks are proposed for this round:
- Task 1: Create the skeletons of the new network simulation approach. The goal is to go deeper in the Simu5G/SimuLTE simulation and refine all the radio network models and properties than can be set in the Simu5G/SimuLTE simulation;
- Task 2: Create a git repository for the new network simulation project, including CI/CD pipeline and documentation generation;
- Task 3: Verify that the network simulator is working as expected;
- Task 4: Evaluate some network characteristics from the simulation using iperf3.
### 5.4.2 Refine the Simu5G/SimuLTE simulation
**TODO**
### 5.4.3 Create a git repository for the new network simulation project
**TODO**
### 5.4.4 Verify that the network simulator
1. To create a reproducible environment to validate the feasibility of the new network simulation approach;
**TODO**
2. To create the skeletons of the new network simulation approach;