Software

SELF4COOP software is released as Open Source. The main contribution is the Federated Simulation Framework, which integrates PLEXE (for cooperative driving and platooning) with Simu5G (for 5G New Radio networks and MEC).

Federated Simulation Framework

The simulation framework couples two powerful tools to enable the evaluation of MEC-based cooperative driving maneuvers:

  • PLEXE: An extension of Veins and SUMO for realistic simulation of platooning and cooperative driving. It provides detailed vehicle dynamics and control models.
  • Simu5G: A simulator for 5G New Radio networks that supports the ETSI MEC architecture. It enables the simulation of 5G data planes, including user equipment (UE) and MEC applications.

The federation of these frameworks allows for the simulation of complex scenarios where vehicle control logic is offloaded to the Mobile Edge Computing (MEC) infrastructure, enabling Cooperative Driving-as-a-Service (CDaaS). The software and the detailed instructions have been published on github. In particular, checkout the README.md insider the subprojects/plexe_5g folder. For completeness, below we also describe how to download and compile the software as well as run the simulations.

Compilation Instructions

To build and run the framework, you need OMNeT++ 6.0.3 and SUMO v1.20+. Some examples also require Matlab (R2020+).

The code is organized into a specific directory structure:

<root folder>
  |-- omnetpp-6.0.3
  |-- veins
  |-- inet
  |-- simu5g
  |-- plexe

1. INET Framework

Clone and compile INET v4.5.0:

git clone https://github.com/inet-framework/inet
cd inet/
git checkout -b inet_v4.5.0 v4.5.0
source setenv
make makefiles
make -j <ncores> MODE=release
make -j <ncores> MODE=debug

2. Simu5G

Clone the plexe_mec branch of Simu5G:

git clone https://github.com/michele-segata/Simu5G/ simu5g
cd simu5g/
git checkout plexe_mec
source setenv
make makefiles
make -j <ncores> MODE=release
make -j <ncores> MODE=debug

3. Veins

Clone the plexe_mec branch of Veins:

git clone https://github.com/michele-segata/veins/
cd veins/
git checkout plexe_mec
source setenv
./configure
make -j <ncores>
# Also compile veins_inet subproject
cd subprojects/veins_inet/
./configure
make -j <ncores>

4. PLEXE

Clone the plexe_mec branch of Plexe:

git clone https://github.com/michele-segata/plexe
cd plexe/
git checkout plexe_mec
source setenv

Configuration: Edit the configure file to set the correct Matlab path and version (e.g., matlab_path = "/usr/local/MATLAB/R2023b"). See the README for MacOS specific instructions.

Compile Plexe:

./configure
make -j <ncores>

Finally, compile the PLEXE 5G subproject:

cd subprojects/plexe_5g
# Edit configure file again for Matlab settings
./configure
make -j <ncores>

Example Scenarios

The framework includes four key scenarios located in plexe/subprojects/plexe_5g/examples/:

1. Platooning 5G

A scenario where a traffic authority aids two platoons to merge using 5G communication. The traffic authority runs on an Internet server.

  • Run command: ./run -u Cmdenv -c CV2XMerge -r 0 (inside examples/platooning_5g)

2. Platooning MEC

Same as above, but the traffic authority is implemented as a MEC application shared among platoon leaders, demonstrating edge-enabled coordination.

  • Run command: ./run -u Cmdenv -c CV2XMerge -r 0 (inside examples/platooning_mec)

3. MEC Overtake Maneuver

Simulates an overtake maneuver where a vehicle overtakes a platoon. The maneuver logic is implemented as a MEC application.

  • Run command: ./run -u Cmdenv -c Overtake -r <runNumber> (inside plexe_mec_overtake)

4. MEC Intersection Merge Maneuver

A complex T-shaped intersection scenario where platoons merge (ahead, in-between, or behind) with cross-traffic. The merge logic is optimized via Matlab and runs as a MEC application.

  • Pre-requisite: Run init.m in Matlab.
  • Run command: ./run -u Cmdenv -c IntersectionMerge -r <runNumber> (inside plexe_mec_intersection)