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

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

Merge pull request #7 in VECTO/mq_vecto-sim from...

Merge pull request #7 in VECTO/mq_vecto-sim from bugfix/VECTO-1420-failed-to-find-operating-point-on-search-braking-power-with-tc-gear to develop

* commit '473f9326':
  for AT transmissions in case of braking: if an operating point on the engine's drag curve cannot be found use an operating point where the engine is not full in drag.
parents bd9301bc 473f9326
No related branches found
No related tags found
No related merge requests found
......@@ -791,8 +791,50 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
forceLineSearch: DataBus.GearboxType.AutomaticTransmission() && !DataBus.TCLocked);
return operatingPoint;
} catch (Exception) {
Log.Error("Failed to find operating point for braking power! absTime: {0}", absTime);
} catch (VectoSearchFailedException vse) {
Log.Error("Failed to find operating point for braking power! absTime: {0} {1}", absTime, vse);
if (DataBus.GearboxType.AutomaticTransmission() && !DataBus.TCLocked) {
// AT transmission in TC gear - maybe search failed because engine speed 'jumps' during
// search and cannot reach drag curve
// take an operating point that is
try {
DataBus.BrakePower = SearchAlgorithm.Search(DataBus.BrakePower, deltaPower,
DataBus.BrakePower * 0.01,
getYValue: result => {
var response = (ResponseDryRun)result;
return DataBus.ClutchClosed(absTime)
? response.DeltaDragLoad
: response.GearboxPowerRequest;
},
evaluateFunction: x => {
DataBus.BrakePower = x;
operatingPoint = ComputeTimeInterval(operatingPoint.Acceleration, ds);
IterationStatistics.Increment(this, "SearchBrakingPower");
DriverAcceleration = operatingPoint.Acceleration;
return NextComponent.Request(absTime, operatingPoint.SimulationInterval,
operatingPoint.Acceleration, gradient,
true);
},
criterion: result => {
var response = (ResponseDryRun)result;
var delta = DataBus.ClutchClosed(absTime)
? response.DeltaDragLoad
: response.GearboxPowerRequest;
return Math.Min(delta.Value(), 0);
},
forceLineSearch: true);
return operatingPoint;
} catch (Exception e2) {
Log.Error("Failed to find operating point for braking power (attempt 2)! absTime: {0} {1}", absTime, e2);
throw;
}
} else {
throw;
}
} catch (Exception e) {
Log.Error("Failed to find operating point for braking power! absTime: {0} {1}", absTime, e);
throw;
}
}
......
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