Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

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

EM: GetTorqueForElectricPower: handle the case that the maxdrive torque may be...

EM: GetTorqueForElectricPower: handle the case that the maxdrive torque may be null because the REESS is almost empty
parent d08fc831
Branches
Tags
No related merge requests found
......@@ -82,6 +82,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var maxTorque = electricPower > 0
? GetMaxRecuperationTorque(volt, dt, avgEmSpeed, gear)
: GetMaxDriveTorque(volt, dt, avgEmSpeed, gear);
if (maxTorque == null) {
return null;
}
var tqEmMap = ModelData.EfficiencyData.EfficiencyMapLookupTorque(volt, electricPower, avgEmSpeed, maxTorque, gear);
if (tqEmMap == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment