From 07e191ee78281ae732e529de20836efc73704448 Mon Sep 17 00:00:00 2001 From: "rogerio.cichota@plantandfood.co.nz" Date: Mon, 2 Dec 2024 09:06:09 +1300 Subject: [PATCH 1/2] set ignore outputs from crop2ML --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1898019fba..2fa8287c37 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ launchSettings.json /testEnvironments.json .mono ApsimX.xml +Prototypes/Crop2ML/SoilTemp/SensitivityAnalysis/Outputs*/ From 9f09bb6c12020484950fbde39062e7177246ef67 Mon Sep 17 00:00:00 2001 From: "rogerio.cichota@plantandfood.co.nz" Date: Mon, 2 Dec 2024 09:06:54 +1300 Subject: [PATCH 2/2] Change return value of the Divide function in case of denominator being zero --- Models/Functions/DivideFunction.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/Functions/DivideFunction.cs b/Models/Functions/DivideFunction.cs index 01694207b7..6f105eb765 100644 --- a/Models/Functions/DivideFunction.cs +++ b/Models/Functions/DivideFunction.cs @@ -33,7 +33,7 @@ public double Value(int arrayIndex = -1) F = ChildFunctions[i] as IFunction; double denominator = F.Value(arrayIndex); if (denominator == 0) - returnValue = 0; + returnValue = double.MaxValue; else returnValue = MathUtilities.Divide(returnValue, denominator,0); }