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

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

Merge remote-tracking branch 'origin/develop' into dev/9-multi-target

parents c882de33 2e4bc3db
No related branches found
No related tags found
No related merge requests found
......@@ -53,10 +53,18 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data
var r1 = a.EfficiencyMap.LookupTorque(electricPower, avgSpeed, maxEmTorque);
var r2 = b.EfficiencyMap.LookupTorque(electricPower, avgSpeed, maxEmTorque);
if (r1 == null && r2 == null) {
if (r1 is null && r2 is null) {
return null;
}
// if one of the values is limited by EM, but the other is not (is null): use maxEmTorque instead
if (r1 is null) {
r1 = maxEmTorque;
}
if (r2 is null) {
r2 = maxEmTorque;
}
var retVal = VectoMath.Interpolate(a.Voltage, b.Voltage,
r1, r2, voltage);
var elPwr = LookupElectricPower(voltage, avgSpeed, retVal, true);
......
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