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 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