Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 5070693a authored by Michael KRISPER's avatar Michael KRISPER
Browse files

HybridStrategy.SelectBestOption: added emergency shift also for upshift

parent 8f761677
Branches
Tags
No related merge requests found
......@@ -1484,6 +1484,22 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
}
if ((!prohibitGearshift || AllowEmergencyShift) && (best.IgnoreReason.EngineSpeedAboveUpshift() || best.IgnoreReason.EngineSpeedTooHigh())) {
best = DoSelectBestOption(eval, absTime, dt, outTorque, outAngularVelocity, dryRun, currentGear);
if (best.IgnoreReason.EngineSpeedAboveUpshift()) {
//try upshift
var newEval = new List<HybridResultEntry>();
EvaluateConfigsForGear(
absTime, dt, outTorque, outAngularVelocity, GearList.Successor(best.Gear),
AllowICEOff(absTime), newEval,
best.Setting.MechanicalAssistPower.First().Key, dryRun);
if (newEval.Count > 0) {
best = DoSelectBestOption(newEval, absTime, dt, outTorque, outAngularVelocity, dryRun,
currentGear);
}
}
}
best.SimulationInterval = dt;
best.ProhibitGearshift = prohibitGearshift;
return best;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment