Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 1a6397a3 authored by Michael KRISPER's avatar Michael KRISPER Committed by Markus Quaritsch
Browse files

Pull request #244: AbstractHybridStrategy.HandleRequestExceedsMaxPower:...

Pull request #244: AbstractHybridStrategy.HandleRequestExceedsMaxPower: corrected object-reference not found exception

Merge in VECTO/vecto-dev from VECTO/mk_vecto-dev:bugfix/VECTO-1624-max-propulsion-torque-problem to develop

* commit '2c1f74c6':
  AbstractHybridStrategy.HandleRequestExceedsMaxPower: corrected object-reference not found exception
parents 744c348f 2c1f74c6
No related branches found
No related tags found
No related merge requests found
......@@ -863,7 +863,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
var testRequest = RequestDryRun(absTime, dt, outTorque, outAngularVelocity, nextGear, emOff);
if (testRequest != null && testRequest.Engine.EngineSpeed < ModelData.EngineData.FullLoadCurves[0].NTq99hSpeed) {
var maxGbxTorque = StrategyParameters.MaxPropulsionTorque?.GetVECTOValueOrDefault(nextGear).FullLoadDriveTorque(testRequest.Gearbox.InputSpeed);
var maxGbxTorque = StrategyParameters.MaxPropulsionTorque?.GetVECTOValueOrDefault(nextGear)?.FullLoadDriveTorque(testRequest.Gearbox.InputSpeed);
candidates[nextGear] = maxGbxTorque != null
? Tuple.Create(maxGbxTorque * testRequest.Gearbox.InputSpeed, testRequest)
: Tuple.Create(testRequest.Gearbox.InputTorque * testRequest.Gearbox.InputSpeed, testRequest);
......
......@@ -178,7 +178,6 @@ namespace TUGraz.VectoCore.Utils
//iterationCount += 100;
log.Debug("LineSearch could not find an operating point.");
log.Error("Exceeded max iterations when searching for operating point!");
log.Error("debug: {0}", debug);
WriteSearch(debug, "LineSearch.csv");
throw new VectoSearchFailedException("Failed to find operating point! points: {0}", debug.LocalData.Select(d => d.b).Join());
......@@ -295,7 +294,6 @@ namespace TUGraz.VectoCore.Utils
log.Debug("InterpolateSearch could not find an operating point.");
#if DEBUG
log.Error("InterpolateSearch exceeded max iterations when searching for operating point!");
log.Error("debug: {0}", debug);
#endif
WriteSearch(debug, "InterpolateSearch.csv");
throw new VectoSearchFailedException("Failed to find operating point! points: {0}", debug.LocalData.Select(d => d.b).Join());
......
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