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 7b305246 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

fix: handle case when max cooling power for driver and passenger is 0 => set...

fix: handle case when max cooling power for driver and passenger is 0 => set COP to 1 (avoid division 0/0)
parent 7db045c2
No related branches found
No related tags found
No related merge requests found
......@@ -304,6 +304,9 @@ namespace TUGraz.VectoCore.Models.Declaration
if (coolingPwrDriver.IsGreater(0) && comprTypeDriver == ACCompressorType.None) {
comprTypeDriver = comprTypePass;
}
if (coolingPwrDriver.IsEqual(0) && coolingPwrPass.IsEqual(0)) {
return 1.0;
}
return (coolingPwrDriver * comprTypeDriver.COP(floorType) + coolingPwrPass * comprTypePass.COP(floorType)) /
(coolingPwrDriver + coolingPwrPass);
}
......
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