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

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

optimize max. cardan torque preprocessor: reduce search target, reduce number of iterations

parent 06966e30
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
var init = TestContainer.VehiclePort.Initialize(Data.GearshiftParameters.StartVelocity, 0.SI<Radian>());
var powertrainRatioWOGearbox = (Data.GearshiftParameters.StartVelocity / init.EngineSpeed * Data.GearboxData.Gears[1].Ratio).Cast<Meter>();
var engineSpeedSteps = (Data.EngineData.FullLoadCurves[0].N95hSpeed - Data.EngineData.IdleSpeed) / 250;
var engineSpeedSteps = (Data.EngineData.FullLoadCurves[0].N95hSpeed - Data.EngineData.IdleSpeed) / 100;
foreach (var gearData in Data.GearboxData.Gears) {
retVal[gearData.Key] = new List<KeyValuePair<PerSecond, NewtonMeter>>();
......@@ -37,6 +37,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
for (var engineSpeed = Data.EngineData.IdleSpeed;
engineSpeed < Data.EngineData.FullLoadCurves[0].N95hSpeed;
engineSpeed += engineSpeedSteps) {
var maxTorque = Data.EngineData.FullLoadCurves[gearData.Key].FullLoadStationaryTorque(engineSpeed);
var vehicleSpeed = engineSpeed * powertrainRatioWOGearbox / gearData.Value.Ratio;
......@@ -55,7 +56,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl {
return TestContainer.VehiclePort.Initialize(vehicleSpeed, g);
},
criterion: r => {
return ((r as AbstractResponse).EngineTorqueDemandTotal - maxTorque).Value();
return ((r as AbstractResponse).EngineTorqueDemandTotal - maxTorque).Value() / 1e5;
}
);
max = TestContainer.VehiclePort.Initialize(vehicleSpeed, grad);
......
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