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 authored and namdre committed May 2, 2024
1 parent dab4eeb commit a0d1231
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 @@ -284,7 +284,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 a0d1231

Please sign in to comment.