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

Skip to content
Snippets Groups Projects
Commit bfba0f0f authored by Michael KRISPER's avatar Michael KRISPER
Browse files

TorqueConverter: Solved Problem with Initialize for tests...

TorqueConverter: Solved Problem with Initialize for tests AT_Gearbox_Drive(10,10,-25), AT_Gearbox_Drive(10,10,-15)
parent 4c413e7c
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,19 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public IResponse Initialize(NewtonMeter outTorque, PerSecond outAngularVelocity)
{
var operatingPointList = ModelData.FindOperatingPoint(outTorque, outAngularVelocity, DataBus.EngineIdleSpeed);
var operatingPoint = SelectOperatingPoint(operatingPointList);
TorqueConverterOperatingPoint operatingPoint;
if (operatingPointList.Count > 0) {
operatingPoint = SelectOperatingPoint(operatingPointList);
} else {
Log.Warn(
"TorqueConverter Initialize: No operating point found. Using output as input values as fallback for initialize.");
operatingPoint = new TorqueConverterOperatingPoint {
OutAngularVelocity = outAngularVelocity,
OutTorque = outTorque,
InAngularVelocity = outAngularVelocity,
InTorque = outTorque
};
}
var retVal = NextComponent.Initialize(operatingPoint.InTorque, operatingPoint.InAngularVelocity);
PreviousState.SetState(operatingPoint.InTorque, operatingPoint.InAngularVelocity, operatingPoint.OutTorque,
operatingPoint.OutAngularVelocity);
......
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