Skip to content

Commit

Permalink
MSCFModel_CC: avoid setting chosing the speed factor when using a fix…
Browse files Browse the repository at this point in the history
…ed acceleration

This avoids problems if the user sets the CC desired speed to 0 by chance
  • Loading branch information
michele-segata committed Apr 10, 2024
1 parent 4faf2f6 commit 6dee757
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/microsim/cfmodels/MSCFModel_CC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ MSCFModel_CC::finalizeSpeed(MSVehicle* const veh, double vPos) const {
}
}

if (vars->activeController != Plexe::DRIVER) {
if (vars->activeController != Plexe::DRIVER && !vars->useFixedAcceleration) {
veh->setChosenSpeedFactor(vars->ccDesiredSpeed / veh->getLane()->getSpeedLimit());
}

Expand Down

0 comments on commit 6dee757

Please sign in to comment.