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

Skip to content
Snippets Groups Projects
Commit 82550a6f authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

electric motor: limit max recuperation if battery is almost full (available...

electric motor: limit max recuperation if battery is almost full (available capacity close to 0 (1e-9))
parent ef915eec
No related branches found
No related tags found
No related merge requests found
......@@ -342,7 +342,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var electricSystemResponse = ElectricPower.Request(0.SI<Second>(), dt, 0.SI<Watt>(), true);
var maxBatPower = electricSystemResponse.MaxPowerDrag;
if (maxBatPower.IsSmaller(0, 1e-3)) {
if (maxBatPower.IsSmallerOrEqual(0, 1e-3)) {
// has to be positive for recuperation - battery is full
return null;
}
......
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