Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 99535f8f authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Make P4 Testcases work

parent ff6a1e96
No related branches found
No related tags found
No related merge requests found
......@@ -229,7 +229,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
if ((DataBus.DriverInfo.DrivingAction == DrivingAction.Accelerate || DataBus.DriverInfo.DrivingAction == DrivingAction.Brake) && allUnderload) {
if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) {
best = eval.MaxBy(x => x.Setting.MechanicalAssistPower.Sum(e => e.Value ?? 0.SI<NewtonMeter>()));
var filtered = eval.Where(x => !x.IgnoreReason.InvalidEngineSpeed()).OrderBy(x => currentGear - x.Gear).ToArray();
if (!filtered.Any()) {
filtered = eval.OrderBy(x => currentGear - x.Gear).ToArray();
}
best = filtered.MaxBy(
x => x.Setting.MechanicalAssistPower.Sum(e => e.Value ?? 0.SI<NewtonMeter>()));
}
}
if (DataBus.DriverInfo.DrivingAction == DrivingAction.Brake && dryRun) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment