Hello,
cooperative behavior is actually guided by three parameters that can be controlled separately:
- lcCooperative: whether to perform a cooperative lane change if decreases ego speed, See Line 1375
- lcCooperativeSpeed (defaults to lcCooperative): whether to adapt the ego speed to help other vehicles with lane changing. This is the code you already found
- lcCooperativeRoundabout (defaults to lcCooperative): whether to use the inside lane on a multi-lane roundabout. See Line 1230
lcCooperativeSpeed (myCooperativeSpeed) actually controls speed adaptions for the vehicle that wants to merge as well as the vehicle that wants to help (there is a known problem with this:
https://github.com/eclipse/sumo/issues/9473)
The 'getSlowest' code is for preventing overtaking on the right where this is forbidden. This is unrelated to cooperative behavior.
To understand the speed adaptations that are advised (myLCAccelerationAdvices), activate the 'DEBUG_INFORM' flag in line 95 and then select vehicles in the simulation. (debug console output requires the debug build when on windows).
regards,
Jakob