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

Skip to content
Snippets Groups Projects
Commit 2b2a5790 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

hybrid strategy: do not initialize the powertrain in case a different gear is...

hybrid strategy: do not initialize the powertrain in case a different gear is engaged to avoid incorrect previous state in testpowertrain (EM)
parent fd78a3e8
No related branches found
No related tags found
No related merge requests found
......@@ -224,11 +224,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
//var vehicleSpeedPostShift = estimatedVelocityPostShift; // DataBus.VehicleInfo.VehicleSpeed - vDrop * ModelData.GearshiftParameters.VelocityDropFactor;
TestPowertrain.Gearbox.Gear = nextGear;
TestPowertrain.Gearbox.RequestAfterGearshift = true;
var init = TestPowertrain.Container.VehiclePort.Initialize(
vehicleSpeedPostShift, DataBus.DrivingCycleInfo.RoadGradient ?? 0.SI<Radian>());
if (!AllowEmergencyShift && init.Engine.EngineSpeed.IsSmaller(ModelData.EngineData.IdleSpeed)) {
return null;
}
//var init = TestPowertrain.Container.VehiclePort.Initialize(
// vehicleSpeedPostShift, DataBus.DrivingCycleInfo.RoadGradient ?? 0.SI<Radian>());
//if (!AllowEmergencyShift && init.Engine.EngineSpeed.IsSmaller(ModelData.EngineData.IdleSpeed)) {
// return null;
//}
} else {
TestPowertrain.Gearbox.RequestAfterGearshift = (DataBus.GearboxInfo as ATGearbox).RequestAfterGearshift;
}
......
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