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

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

Merge branch 'feature/VECTO-238-look-ahead-coasting' of...

Merge branch 'feature/VECTO-238-look-ahead-coasting' of git+ssh://129.27.107.191:2211/vecto-sim into feature/VECTO-238-look-ahead-coasting
parents 17bb13bb 8f208d74
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CurrentState.EngineTorque = VectoMath.Limit(totalTorqueDemand, minTorque, maxTorque);
CurrentState.EnginePower = CurrentState.EngineTorque * avgEngineSpeed;
if (torqueOut.IsGreater(0.SI<NewtonMeter>()) &&
if (totalTorqueDemand.IsGreater(0.SI<NewtonMeter>()) &&
(deltaFull * avgEngineSpeed).IsGreater(0.SI<Watt>(), Constants.SimulationSettings.LineSearchTolerance)) {
Log.Debug("requested engine power exceeds fullload power: delta: {0}", deltaFull);
return new ResponseOverload {
......@@ -250,7 +250,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
};
}
if (torqueOut.IsSmaller(0.SI<NewtonMeter>()) &&
if (totalTorqueDemand.IsSmaller(0.SI<NewtonMeter>()) &&
(deltaDrag * avgEngineSpeed).IsSmaller(0.SI<Watt>(), Constants.SimulationSettings.LineSearchTolerance)) {
Log.Debug("requested engine power is below drag power: delta: {0}", deltaDrag);
return new ResponseUnderload {
......
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