Plexe

The Platooning Extension for Veins.

Plexe Examples - Detailed Engine Model

This quick tutorial assumes that you already have installed Plexe and all the required software following the instruction inside the building section. After doing so, please set up the environmental variables by running the following

1 2
cd ~/src/plexe . ./setenv

Description

The fourth example shows the new detailed engine model in action. In this example we perform a “race” between three different vehicles, which are an Alfa Romeo 147 1.6 TS, an Audi R8, and a Bugatti Veyron. The three vehicles start from standstill, and we let them accelerate as much as they can for roughly one minute. After that, we let them brake as strong as they can down to a full stop. The example can be found in the examples/engine folder. In particular, you will find the parameters of the vehicles in the examples/engine/sumocfg/vehicles.xml file. For the details about the parameters and the configuration, please refer to the PhD Thesis.

Running the example

To run the example do the following:

1 2 3 4
cd ~/src/plexe/examples/engine plexe_run -u Cmdenv -c EngineTestNoGui -r 0 plexe_run -u Cmdenv -c EngineTestNoGui -r 1 plexe_run -u Cmdenv -c EngineTestNoGui -r 2

Given that there is no ongoing communication, these simulations will terminate very quickly. Even if you already know the results of the race, we can plot the results to see the outcome.

Plotting the results

As for the first example, move into the analysis folder, generate the Makefile, and run the R script

1 2 3 4
cd analysis genmakefile.py parse-config > Makefile make Rscript plot-engine.R

The script generates the following plots, i.e., the acceleration and the speed of the two vehicles as a function of time. The acceleration plot shows first of all the different acceleration capabilities of the three vehicles. Most importantly, however, it shows you that the maximum available acceleration decreases with speed and with the chosen gear ratio. Moreover, the acceleration plot shows you also the different braking capabilities of the vehicles, with a maximum deceleration which is speed-dependent due to air-drag, i.e., at a high speed a vehicle can brake harder thanks to air resistance.

Concerning speeds, instead, we can see that the maximum speed is properly modeled by considering engine and aerodynamic characteristics: The Alfa Romeo reaches about 190 km/h, the Audi roughly 300 km/h, while the Bugatti reaches the stunning speed of 400 km/h.

Figure 1. Acceleration profiles in time.

Figure 2. Speed profiles in time.