Veins

The Platooning Extension for Veins.

Plexe Examples - Extending Plexe

Note: This tutorial assumes you already cloned the git repositories for running Example 1.

Step 0. Building Plexe with sample changes

To switch to the code for this example and build the source, simply do the following:

cd ~/src/plexe-veins
git checkout plexe-2.0-mycc-example
./configure
make -j <number of cores of your PC> MODE=release
cd ~/src/plexe-sumo
git checkout plexe-2.0-mycc-example
make -j <number of cores of your PC>

Description:

The second example shows how Plexe can be extended to implement a user-defined control model to be tested against the others. The control law of the custom controller is defined as

The controller tries to maintain a fixed distance of 25 m, and has two gains that acts on the speed () and the distance () error components. In this example we set to 0.6 and to 1.0.


Running the example:

This example is the same as Example 1, but this time we have the new user-defined controller as well. Assuming you already run Example 1 and you did not delete the results, you can just run the two new simulations:

cd ~/src/plexe-veins/examples/platooning
./run -u Cmdenv -c SinusoidalNoGui -r 5
./run -u Cmdenv -c BrakingNoGui -r 5


Plotting the results:

When the simulation terminates, go into the analysis folder and type

make
Rscript plot-sinusoidal.R
Rscript plot-braking.R

By typing make the Makefile you already generated for Example 1 parses the result files and merges them into the merged .Rdata files. The older results are untouched, so they are not re-processed.

The script generates plots similar to the ones of the first example, but this time they include the user-defined controller. The plots clearly show the instability of the controller (it even leads to a collision in the sinusoidal scenario), which could be expected since this is made as an example. This shows, however, how easily Plexe can be extended to test new control algorithms.

Sinusoidal scenario:

Figure 1. Control inputs in time.

Figure 2. Accelerations in time.

Figure 3. Speed profiles in time.

Figure 4. Distances in time.

Braking scenario:

Figure 5. Control inputs in time.

Figure 6. Accelerations in time.

Figure 7. Speed profiles in time.

Figure 8. Distances in time.


Changes to the source code:

This example requires changes to both Plexe-Veins and Plexe-SUMO. As the tutorial adds a new controller, the main changes are made in Plexe-SUMO, while the changes in Plexe-Veins are only needed to tell the simulator to use this new controller. We thus start describing the changes to Plexe-SUMO. In particular:

  1. CC_Const.h: we change this file in SUMO (and in Veins as well) to add some constants about the new controller we add to the simulator. In this file we find an enumeration with the list of all available controllers. We add the new one by defining the enum as
    enum ACTIVE_CONTROLLER {DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5, MYCC = 6};
    According to the control law shown above, the controller has two parameters, and , so we create two constants for setting the value of those parameters via the TraCI interface, and we do so by adding the following two lines
    #define CC_SET_MYCC_KD                   0x08    //k_d constant for new controller
    #define CC_SET_MYCC_KS                   0x09    //k_s constant for new controller
    The value of the two constants should clearly be unique within this file.
  2. CC_VehicleVariables.h: as this class maintains the state and the variables of a vehicle using automated controller, we add two variables for storing the values of and . In particular we declare them as
    /// @brief parameters for MYCC
    double myccKd, myccKs;
    and we initialize them in the constructor initialization list:
    frontInitialized(false), leaderInitialized(false), caccInitialized(false), myccKd(1), myccKs(1) {
  3. MSCFModel_CC.h: as described in the documentation, the MSCFModel_CC class is the core of the Plexe-SUMO extension. If you want to introduce a new CACC, you will need to make changes to this file. With respect to the header file, the only thing that we need to do is to define the prototype of the function for our controller, i.e.,
    SUMOReal _mycc(const MSVehicle *veh, SUMOReal egoSpeed, SUMOReal predSpeed, SUMOReal gap2pred) const;
    where veh is a pointer to the vehicle using the controller, egoSpeed is its current speed, predSpeed is the speed of the vehicle in front, and gap2pred is the distance to the front vehicle.
  4. MSCFModel_CC.cpp: the actual implementation goes into the C++ file. First, we edit the _v() function, where the model computes the speed of the vehicle at the next simulation step depending on the current vehicle state and the chosen controller. In the switch statement, we add
    case Plexe::MYCC:
        ccAcceleration = _cc(veh, egoSpeed, vars->ccDesiredSpeed);
        caccAcceleration = _mycc(veh, egoSpeed, vars->frontSpeed, gap2pred);
        if (vars->frontInitialized)
               controllerAcceleration = std::min(ccAcceleration, caccAcceleration);
        else
               controllerAcceleration = 0;
        break;
    The statement first computes the acceleration that would be applied by the cruise control given the cruise control desired speed, and then the acceleration that would be applied by our new CACC. Before applying such accelerations, the model first checks whether it has received at least one beacon from the vehicle in front. If that is the case, the model applies the minimum acceleration between the two computed ones, to avoid exceeding the cruise control desired speed. If no front beacon has been received so far, the model cannot compute a valid acceleration value, so the car keeps cruising with a constant speed.

    Next, we add the actual implementation of our controller:

    SUMOReal MSCFModel_CC::_mycc(const MSVehicle *veh, SUMOReal egoSpeed, SUMOReal predSpeed, SUMOReal gap2pred) const {
        CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables();
        return vars->myccKd * (gap2pred - 25) + vars->myccKs * (predSpeed - egoSpeed);
    }

    Finally, we need to handle the passing of the and parameters via the TraCI interface. To do so, we edit the setGenericInformation() function. This function handles data coming from Plexe-Veins and has the following prototype:

    void setGenericInformation(const MSVehicle* veh, const struct Plexe::CCDataHeader &header, const void *content);
    The veh variable is the vehicle for which this method has been called, header includes information about the call, such as the variable to set, and content is the actual data content, which is a void pointer because this method can be used to pass any kind of data, from simple numbers to complex structs.

    To handle value passing for our parameters we add two new case to the switch statement:

    case CC_SET_MYCC_KD: {
        vars->myccKd = *(double*)content;
        break;
    }
    case CC_SET_MYCC_KS: {
        vars->myccKs = *(double*)content;
        break;
    }
    The two constants we are handling are the ones we defined in the CC_Const.h file. To set the value, we simply cast content to double.

Concerning changes from the Plexe-Veins side, we simply need to edit the simulation to use the new controller available in Plexe-SUMO. The first step is to copy-paste the CC_Const.h we edited in Plexe-SUMO. Then we perform the following changes:

  1. BaseScenario.ned: we add the two parameters of our controller to be able to set them within the omnetpp.ini file. To do so we simply add
    double myccKd;
    double myccKs;
  2. *Scenario.ned: to reflect the changes into BaseScenario.ned, we add the same parameters to all inheriting scenarios, adding a default value as well
    double myccKd = default(1);
    double myccKs = default(1);
  3. BaseScenario.h: we create two class variable to store the parameters in the C++ implementation:
    double myccKd, myccKs;
  4. BaseScenario.cpp: we change the implementation to load the value of such parameters in the initialize method:
    myccKd = par("myccKd").doubleValue();
    myccKs = par("myccKs").doubleValue();
    and to pass their value to Plexe-SUMO in the initializeControllers() function:
    traciVehicle->setGenericInformation(CC_SET_MYCC_KD, &myccKd, sizeof(double));
    traciVehicle->setGenericInformation(CC_SET_MYCC_KS, &myccKs, sizeof(double));
    Finally, we need to enable the use of our new controller when requested, so in the initialize method we add the following lines:
    else if (strcmp(strController, "MYCC") == 0) {
       controller = Plexe::MYCC;
    }
  5. omnetpp.ini: the next step is to change the configuration of the simulation in examples/platooning. First, we set the values for our controller parameters:
    *.node[*].scenario.myccKd = 0.6
    *.node[*].scenario.myccKs = 1
    Then, we need to add a new simulation run that uses our new controller:
    **.numericController = ${controller = 0, 0, 1, 2, 3, 4}
    *.node[*].scenario.controller = ${sController = "ACC", "ACC", "CACC", "PLOEG", "CONSENSUS", "MYCC" ! controller}
    [...]
    **.headway = ${headway = 0.3, 1.2, 0.1, 0.1, 0.1, 0.1 ! controller}s
    [...]
    **.traffic.platoonInsertDistance = ${2, 2, 5, 2, 15, 25 ! controller}m
    **.traffic.platoonInsertHeadway = ${0.3, 1.2, 0, 0.5, 0.8, 0 ! controller}s
    The first two lines add a numeric ID to our controller (which adds an additional simulation run) and pass the MYCC string as the controller to be used associated with such ID. The headway parameter is only needed by the ACC, but we need to add a value to respect the cardinality of the controller variable. Any number can be used here. Finally, we need to modify two parameters of the PlatoonsTrafficManager class. As the class inserts platoons at steady state, we need to tell it at which distance vehicles should be inserted for each controller. In our case, we have a fixed distance of 25 m (first line) and there is no headway time (second line).
  6. plot-sinusoidal.R and plot-braking.R: finally, we change the plot scripts to plot the behavior of our controller. We change both files and add
    ifelse(id == 2, "PLOEG",
        ifelse(id == 3, "CONSENSUS", "MYCC")
    )


Diff:

To show you all the changes made in this example, in the following we show the full diff between the plexe-2.0 and the plexe-2.0-mycc-example git branches.

Plexe-SUMO

diff --git a/sumo/src/microsim/cfmodels/CC_Const.h b/sumo/src/microsim/cfmodels/CC_Const.h
index 6c6b326..050e0da 100644
--- a/sumo/src/microsim/cfmodels/CC_Const.h
+++ b/sumo/src/microsim/cfmodels/CC_Const.h
@@ -35,7 +35,7 @@ enum PLATOONING_LANE_CHANGE_ACTION {
  * leave the control to the mobility model which reproduces a human driver
  */
 enum ACTIVE_CONTROLLER
-{DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5};
+{DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5, MYCC = 6};
 
 /**
  * @brief struct used as header for generic data passing to this model through
@@ -83,6 +83,9 @@ struct VEHICLE_DATA {
 #define CC_SET_PLOEG_KP                  0x21    //kp parameter of ploeg's CACC
 #define CC_SET_PLOEG_KD                  0x22    //kd parameter of ploeg's CACC
 
+#define CC_SET_MYCC_KD                   0x08    //k_d constant for new controller
+#define CC_SET_MYCC_KS                   0x09    //k_s constant for new controller
+
 #define CC_SET_VEHICLE_ENGINE_MODEL      0x30    //set the engine model for a vehicle
 #define CC_ENGINE_MODEL_FOLM             0x00    //first order lag model
 #define CC_ENGINE_MODEL_REALISTIC        0x01    //the detailed and realistic engine model
diff --git a/sumo/src/microsim/cfmodels/CC_VehicleVariables.h b/sumo/src/microsim/cfmodels/CC_VehicleVariables.h
index 05c4f18..fb6b943 100644
--- a/sumo/src/microsim/cfmodels/CC_VehicleVariables.h
+++ b/sumo/src/microsim/cfmodels/CC_VehicleVariables.h
@@ -96,7 +96,8 @@ public:
         caccXi(-1), caccOmegaN(-1), caccC1(-1), engineTau(-1), caccAlpha1(-1), caccAlpha2(-1),
         caccAlpha3(-1), caccAlpha4(-1), caccAlpha5(-1), engineAlpha(-1), engineOneMinusAlpha(-1),
         ploegH(0.5), ploegKp(0.2), ploegKd(0.7), nInitialized(0), engine(0),
-        frontInitialized(false), leaderInitialized(false), caccInitialized(false) {
+        frontInitialized(false), leaderInitialized(false), caccInitialized(false),
+        myccKd(1), myccKs(1) {
         fakeData.frontAcceleration = 0;
         fakeData.frontDistance = 0;
         fakeData.frontSpeed = 0;
@@ -250,6 +251,8 @@ public:
     double ploegH;
     double ploegKp;
     double ploegKd;
+    /// @brief parameters for MYCC
+    double myccKd, myccKs;
 
     /// @brief engine model employed by this car
     GenericEngineModel *engine;
diff --git a/sumo/src/microsim/cfmodels/MSCFModel_CC.cpp b/sumo/src/microsim/cfmodels/MSCFModel_CC.cpp
index a943523..8dc7ac5 100644
--- a/sumo/src/microsim/cfmodels/MSCFModel_CC.cpp
+++ b/sumo/src/microsim/cfmodels/MSCFModel_CC.cpp
@@ -361,6 +361,16 @@ MSCFModel_CC::_v(const MSVehicle* const veh, SUMOReal gap2pred, SUMOReal egoSpee
 
                 break;
 
+            case Plexe::MYCC:
+
+                ccAcceleration = _cc(veh, egoSpeed, vars->ccDesiredSpeed);
+                caccAcceleration = _mycc(veh, egoSpeed, vars->frontSpeed, gap2pred);
+                if (vars->frontInitialized)
+                	controllerAcceleration = std::min(ccAcceleration, caccAcceleration);
+                else
+                	controllerAcceleration = 0;
+                break;
+
             case Plexe::DRIVER:
 
                 std::cerr << "Switching to normal driver behavior still not implemented in MSCFModel_CC\n";
@@ -531,6 +541,12 @@ MSCFModel_CC::_consensus(const MSVehicle* veh, SUMOReal egoSpeed, Position egoPo
 }
 
 SUMOReal
+MSCFModel_CC::_mycc(const MSVehicle *veh, SUMOReal egoSpeed, SUMOReal predSpeed, SUMOReal gap2pred) const {
+    CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables();
+    return vars->myccKd * (gap2pred - 25) + vars->myccKs * (predSpeed - egoSpeed);
+}
+
+SUMOReal
 MSCFModel_CC::_actuator(const MSVehicle *veh, SUMOReal acceleration, SUMOReal currentAcceleration) const {
 
     CC_VehicleVariables* vars = (CC_VehicleVariables*)veh->getCarFollowVariables();
@@ -686,6 +702,14 @@ void MSCFModel_CC::setGenericInformation(const MSVehicle* veh, const struct Plex
         vars->engine->setParameter(ENGINE_PAR_XMLFILE, std::string(file));
         break;
     }
+    case CC_SET_MYCC_KD: {
+        vars->myccKd = *(double*)content;
+        break;
+    }
+    case CC_SET_MYCC_KS: {
+        vars->myccKs = *(double*)content;
+        break;
+    }
     default: {
         break;
     }
diff --git a/sumo/src/microsim/cfmodels/MSCFModel_CC.h b/sumo/src/microsim/cfmodels/MSCFModel_CC.h
index cd8ea61..ebd637d 100644
--- a/sumo/src/microsim/cfmodels/MSCFModel_CC.h
+++ b/sumo/src/microsim/cfmodels/MSCFModel_CC.h
@@ -513,6 +514,8 @@ private:
      */
     SUMOReal d_i_j(const struct Plexe::VEHICLE_DATA *vehicles, const double h[MAX_N_CARS], int i, int j) const;
 
+    SUMOReal _mycc(const MSVehicle *veh, SUMOReal egoSpeed, SUMOReal predSpeed, SUMOReal gap2pred) const;
+
     /** @brief computes the actual acceleration the actuator is able to apply to the car, given engine time constant and previous
      * acceleration
      *

Plexe-Veins

diff --git a/examples/platooning/analysis/plot-braking.R b/examples/platooning/analysis/plot-braking.R
index 121fd08..c224753 100644
--- a/examples/platooning/analysis/plot-braking.R
+++ b/examples/platooning/analysis/plot-braking.R
@@ -5,7 +5,9 @@ library(ggplot2)
 controller <- function(id, headway) {
     ifelse(id == 0, ifelse(headway == 0.3, "ACC (0.3 s)", "ACC (1.2 s)"),
         ifelse(id == 1, "CACC",
-            ifelse(id == 2, "PLOEG", "CONSENSUS")
+            ifelse(id == 2, "PLOEG",
+                ifelse(id == 3, "CONSENSUS", "MYCC")
+            )
         )
     )
 }
diff --git a/examples/platooning/analysis/plot-sinusoidal.R b/examples/platooning/analysis/plot-sinusoidal.R
index e091413..75e3512 100644
--- a/examples/platooning/analysis/plot-sinusoidal.R
+++ b/examples/platooning/analysis/plot-sinusoidal.R
@@ -5,7 +5,9 @@ library(ggplot2)
 controller <- function(id, headway) {
     ifelse(id == 0, ifelse(headway == 0.3, "ACC (0.3 s)", "ACC (1.2 s)"),
         ifelse(id == 1, "CACC",
-            ifelse(id == 2, "PLOEG", "CONSENSUS")
+            ifelse(id == 2, "PLOEG",
+                ifelse(id == 3, "CONSENSUS", "MYCC")
+            )
         )
     )
 }
diff --git a/examples/platooning/omnetpp.ini b/examples/platooning/omnetpp.ini
index e74ae73..df23c58 100644
--- a/examples/platooning/omnetpp.ini
+++ b/examples/platooning/omnetpp.ini
@@ -129,13 +129,16 @@ seed-set = ${repetition}
 *.node[*].scenario.ploegKp = 0.2
 *.node[*].scenario.ploegKd = 0.7
 *.node[*].scenario.useRealisticEngine = false
+#set parameters for MYCC
+*.node[*].scenario.myccKd = 0.6
+*.node[*].scenario.myccKs = 1
 
 #controllers to be tested
-**.numericController = ${controller = 0, 0, 1, 2, 3}
-*.node[*].scenario.controller = ${sController = "ACC", "ACC", "CACC", "PLOEG", "CONSENSUS" ! controller}
+**.numericController = ${controller = 0, 0, 1, 2, 3, 4}
+*.node[*].scenario.controller = ${sController = "ACC", "ACC", "CACC", "PLOEG", "CONSENSUS", "MYCC" ! controller}
 
 #headway for ACCs
-**.headway = ${headway = 0.3, 1.2, 0.1, 0.1, 0.1 ! controller}s
+**.headway = ${headway = 0.3, 1.2, 0.1, 0.1, 0.1, 0.1 ! controller}s
 *.node[*].scenario.accHeadway = ${headway}s
 *.node[*].scenario.leaderHeadway = ${leaderHeadway = 1.2}s
 
@@ -190,8 +193,8 @@ seed-set = ${repetition}
 #SUMO vtype for platooning vehicles
 **.traffic.platooningVType = "vtypeauto"
 #insert vehicles already at steady-state. distance depends on controller
-**.traffic.platoonInsertDistance = ${2, 2, 5, 2, 15 ! controller}m
-**.traffic.platoonInsertHeadway = ${0.3, 1.2, 0, 0.5, 0.8 ! controller}s
+**.traffic.platoonInsertDistance = ${2, 2, 5, 2, 15, 25 ! controller}m
+**.traffic.platoonInsertHeadway = ${0.3, 1.2, 0, 0.5, 0.8, 0 ! controller}s
 **.traffic.platoonLeaderHeadway = ${leaderHeadway}s
 
 
diff --git a/src/veins/modules/application/platooning/CC_Const.h b/src/veins/modules/application/platooning/CC_Const.h
index 6c6b326..050e0da 100644
--- a/src/veins/modules/application/platooning/CC_Const.h
+++ b/src/veins/modules/application/platooning/CC_Const.h
@@ -35,7 +35,7 @@ enum PLATOONING_LANE_CHANGE_ACTION {
  * leave the control to the mobility model which reproduces a human driver
  */
 enum ACTIVE_CONTROLLER
-{DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5};
+{DRIVER = 0, ACC = 1, CACC = 2, FAKED_CACC = 3, PLOEG = 4, CONSENSUS = 5, MYCC = 6};
 
 /**
  * @brief struct used as header for generic data passing to this model through
@@ -83,6 +83,9 @@ struct VEHICLE_DATA {
 #define CC_SET_PLOEG_KP                  0x21    //kp parameter of ploeg's CACC
 #define CC_SET_PLOEG_KD                  0x22    //kd parameter of ploeg's CACC
 
+#define CC_SET_MYCC_KD                   0x08    //k_d constant for new controller
+#define CC_SET_MYCC_KS                   0x09    //k_s constant for new controller
+
 #define CC_SET_VEHICLE_ENGINE_MODEL      0x30    //set the engine model for a vehicle
 #define CC_ENGINE_MODEL_FOLM             0x00    //first order lag model
 #define CC_ENGINE_MODEL_REALISTIC        0x01    //the detailed and realistic engine model
diff --git a/src/veins/modules/application/platooning/scenarios/AccelerateAndBrakeScenario.ned b/src/veins/modules/application/platooning/scenarios/AccelerateAndBrakeScenario.ned
index 6995480..08845b1 100644
--- a/src/veins/modules/application/platooning/scenarios/AccelerateAndBrakeScenario.ned
+++ b/src/veins/modules/application/platooning/scenarios/AccelerateAndBrakeScenario.ned
@@ -50,6 +50,8 @@ simple AccelerateAndBrakeScenario like BaseScenario
         double ploegH @unit("s") = default(0.5s);
         double ploegKp = default(0.2);
         double ploegKd = default(0.7);
+        double myccKd = default(1);
+        double myccKs = default(1);
 
         //location of the file with vehicle parameters
         string vehicleFile = default("./vehicles.xml");
diff --git a/src/veins/modules/application/platooning/scenarios/BaseScenario.cc b/src/veins/modules/application/platooning/scenarios/BaseScenario.cc
index e82bc94..0509599 100644
--- a/src/veins/modules/application/platooning/scenarios/BaseScenario.cc
+++ b/src/veins/modules/application/platooning/scenarios/BaseScenario.cc
@@ -33,6 +33,8 @@ void BaseScenario::initialize(int stage) {
 		ploegH = par("ploegH").doubleValue();
 		ploegKp = par("ploegKp").doubleValue();
 		ploegKd = par("ploegKd").doubleValue();
+		myccKd = par("myccKd").doubleValue();
+		myccKs = par("myccKs").doubleValue();
 
 		useRealisticEngine = par("useRealisticEngine").boolValue();
 		if (useRealisticEngine) {
@@ -54,6 +56,9 @@ void BaseScenario::initialize(int stage) {
 		else if (strcmp(strController, "CONSENSUS") == 0) {
 			controller = Plexe::CONSENSUS;
 		}
+		else if (strcmp(strController, "MYCC") == 0) {
+			controller = Plexe::MYCC;
+		}
 		else {
 			throw cRuntimeError("Invalid controller selected");
 		}
@@ -105,6 +110,10 @@ void BaseScenario::initializeControllers() {
 	traciVehicle->setGenericInformation(CC_SET_VEHICLE_POSITION, &position, sizeof(int));
 	int nCars = positionHelper->getPlatoonSize();
 	traciVehicle->setGenericInformation(CC_SET_PLATOON_SIZE, &nCars, sizeof(int));
+	//mycc parameters
+	traciVehicle->setGenericInformation(CC_SET_MYCC_KD, &myccKd, sizeof(double));
+	traciVehicle->setGenericInformation(CC_SET_MYCC_KS, &myccKs, sizeof(double));
+
 
 	Plexe::VEHICLE_DATA vehicleData;
 	//initialize own vehicle data
diff --git a/src/veins/modules/application/platooning/scenarios/BaseScenario.h b/src/veins/modules/application/platooning/scenarios/BaseScenario.h
index f2d0132..940eccc 100644
--- a/src/veins/modules/application/platooning/scenarios/BaseScenario.h
+++ b/src/veins/modules/application/platooning/scenarios/BaseScenario.h
@@ -60,6 +60,7 @@ class BaseScenario : public BaseApplLayer
 		double ploegH;
 		double ploegKp;
 		double ploegKd;
+		double myccKd, myccKs;
 
 		//location of the file with vehicle parameters
 		std::string vehicleFile;
diff --git a/src/veins/modules/application/platooning/scenarios/BaseScenario.ned b/src/veins/modules/application/platooning/scenarios/BaseScenario.ned
index acfd7db..3295d81 100644
--- a/src/veins/modules/application/platooning/scenarios/BaseScenario.ned
+++ b/src/veins/modules/application/platooning/scenarios/BaseScenario.ned
@@ -38,6 +38,8 @@ moduleinterface BaseScenario extends IBaseApplLayer
         double ploegH @unit("s");
         double ploegKp;
         double ploegKd;
+        double myccKd;
+        double myccKs;
 
         //location of the file with vehicle parameters
         string vehicleFile;
diff --git a/src/veins/modules/application/platooning/scenarios/BrakingScenario.ned b/src/veins/modules/application/platooning/scenarios/BrakingScenario.ned
index 5668c90..43ce8d4 100644
--- a/src/veins/modules/application/platooning/scenarios/BrakingScenario.ned
+++ b/src/veins/modules/application/platooning/scenarios/BrakingScenario.ned
@@ -46,6 +46,8 @@ simple BrakingScenario like BaseScenario
         double ploegH @unit("s") = default(0.5s);
         double ploegKp = default(0.2);
         double ploegKd = default(0.7);
+        double myccKd = default(1);
+        double myccKs = default(1);
 
         //location of the file with vehicle parameters
         string vehicleFile = default("./vehicles.xml");
diff --git a/src/veins/modules/application/platooning/scenarios/SinusoidalScenario.ned b/src/veins/modules/application/platooning/scenarios/SinusoidalScenario.ned
index 9fafaf4..fc8ead4 100644
--- a/src/veins/modules/application/platooning/scenarios/SinusoidalScenario.ned
+++ b/src/veins/modules/application/platooning/scenarios/SinusoidalScenario.ned
@@ -48,6 +48,8 @@ simple SinusoidalScenario like BaseScenario
         double ploegH @unit("s") = default(0.5s);
         double ploegKp = default(0.2);
         double ploegKd = default(0.7);
+        double myccKd = default(1);
+        double myccKs = default(1);
 
         //location of the file with vehicle parameters
         string vehicleFile = default("./vehicles.xml");