Compare commits
No commits in common. "fcf6b2af51aaca7b156c12fb7a6f62879c3d4748" and "a98a81776db316781fb72cce59df4dcddf748ad4" have entirely different histories.
fcf6b2af51
...
a98a81776d
@ -89,7 +89,7 @@ namespace FarmmapsKPI
|
||||
TimeSpan tsTotalEstimated;
|
||||
|
||||
//Per default just 1 run per field. For debugging check if when we run multiple times do we get (should be) always the same output?
|
||||
int nrun = 5;
|
||||
int nrun = 1;
|
||||
for (int run = 1; run <= nrun; run++) {
|
||||
for (int i = 0; i < fieldsInputs.Count; i++)
|
||||
//for (int i = 3; i < 4; i++) // for testing
|
||||
@ -365,11 +365,7 @@ namespace FarmmapsKPI
|
||||
int nOperationsInput = input.DataOperations.Length;
|
||||
int nOperationsCropfield = crprecChildren.Count;
|
||||
if (nOperationsInput != nOperationsCropfield)
|
||||
{
|
||||
_logger.LogWarning(String.Format($"1. run {run}: nOperationsInput != nOperationsCropfield?!"));
|
||||
//throw new Exception(String.Format($"run {run}: nOperationsInput != nOperationsCropfield?!"));
|
||||
}
|
||||
|
||||
throw new Exception(String.Format($"run {run}: nOperationsInput != nOperationsCropfield?!"));
|
||||
|
||||
//Check totalNfertiliser input and Cropfield
|
||||
for (int o = 0; o < crprecChildren.Count; o++)
|
||||
@ -378,10 +374,7 @@ namespace FarmmapsKPI
|
||||
totalNferiliserCropfield = totalNferiliserCropfield + (double)data.n;
|
||||
}
|
||||
if (totalNferiliserInput != totalNferiliserCropfield)
|
||||
{
|
||||
_logger.LogWarning(String.Format($"2. run {run}: totalNferiliserInput != totalNferiliserCropfield?!"));
|
||||
//throw new Exception(String.Format($"run {run}: totalNferiliserInput != totalNferiliserCropfield?!"));
|
||||
}
|
||||
throw new Exception(String.Format($"run {run}: totalNferiliserInput != totalNferiliserCropfield?!"));
|
||||
|
||||
|
||||
//Now get the KPIs for this cropfield, mounted with operations & cropyield
|
||||
@ -527,13 +520,8 @@ namespace FarmmapsKPI
|
||||
//Check if totalNferiliserInput is equal to what comes out of the KPI calculation
|
||||
//PO20240515: Hier gaat het mis!!!
|
||||
if (elementName == "nFertilizerNKgHa")
|
||||
{
|
||||
if (totalNferiliserInput != Convert.ToDouble(elementValue))
|
||||
{
|
||||
_logger.LogWarning(String.Format($"3. run {run}: totalNferiliserInput != nFertilizerNKgHa"));
|
||||
//throw new Exception(String.Format($"run {run}: totalNferiliserInput != nFertilizerNKgHa"));
|
||||
}
|
||||
}
|
||||
throw new Exception(String.Format($"run {run}: totalNferiliserInput != nFertilizerNKgHa?!"));
|
||||
}
|
||||
}
|
||||
else if (kpio.id == "B2")
|
||||
|
Loading…
Reference in New Issue
Block a user