diff --git a/AvailableWaterSupply.nls b/AvailableWaterSupply.nls new file mode 100644 index 0000000..929b6b5 --- /dev/null +++ b/AvailableWaterSupply.nls @@ -0,0 +1,5586 @@ +to AvailableWaterSupply + ask patches with [LandType = 3] ;; ask storage pathces + [ + if pxcor > 25 and pycor > 14 + [ + if HarvestCycle = 0 + [ + if ticks > 365 * 0 and ticks <= 365 * 1 + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * 1 and ticks <= 365 * 2 + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * 2 and ticks <= 365 * 3 + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * 3 and ticks <= 365 * 4 + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * 4 and ticks <= 365 * 5 + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * 5 and ticks <= 365 * 6 + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * 6 and ticks <= 365 * 7 + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * 7 and ticks <= 365 * 8 + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * 8 and ticks <= 365 * 9 + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * 9 and ticks <= 365 * 10 + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 10 and ticks <= 365 * 11 + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 11 and ticks <= 365 * 12 + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 12 and ticks <= 365 * 13 + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 13 and ticks <= 365 * 14 + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 14 and ticks <= 365 * 15 + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 15 and ticks <= 365 * 16 + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 16 and ticks <= 365 * 17 + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 17 and ticks <= 365 * 18 + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 18 and ticks <= 365 * 19 + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 19 and ticks <= 365 * 20 + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 20 and ticks <= 365 * 21 + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 21 and ticks <= 365 * 22 + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 22 and ticks <= 365 * 23 + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 23 and ticks <= 365 * 24 + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 24 and ticks <= 365 * 25 + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 25 and ticks <= 365 * 26 + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 26 and ticks <= 365 * 27 + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 27 and ticks <= 365 * 28 + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 28 and ticks <= 365 * 29 + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 29 and ticks <= 365 * 30 + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 30 and ticks <= 365 * 31 + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 31 and ticks <= 365 * 32 + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 32 and ticks <= 365 * 33 + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 33 and ticks <= 365 * 34 + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 34 and ticks <= 365 * 35 + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 35 and ticks <= 365 * 36 + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 36 and ticks <= 365 * 37 + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 37 and ticks <= 365 * 38 + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 38 and ticks <= 365 * 39 + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 39 and ticks <= 365 * 40 + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 40 and ticks <= 365 * 41 + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 41 and ticks <= 365 * 42 + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 42 and ticks <= 365 * 43 + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 43 and ticks <= 365 * 44 + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 44 and ticks <= 365 * 45 + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 45 and ticks <= 365 * 46 + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 46 and ticks <= 365 * 47 + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 47 and ticks <= 365 * 48 + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 48 and ticks <= 365 * 49 + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 49 and ticks <= 365 * 50 + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 50 and ticks <= 365 * 51 + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 51 and ticks <= 365 * 52 + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 52 and ticks <= 365 * 53 + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 53 and ticks <= 365 * 54 + [ + + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 54 and ticks <= 365 * 55 + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 55 and ticks <= 365 * 56 + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 56 and ticks <= 365 * 57 + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 57 and ticks <= 365 * 58 + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 58 and ticks <= 365 * 59 + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 59 and ticks <= 365 * 60 + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 60 and ticks <= 365 * 61 + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 61 and ticks <= 365 * 62 + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 62 and ticks <= 365 * 63 + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 63 and ticks <= 365 * 64 + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 64 and ticks <= 365 * 65 + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 65 and ticks <= 365 * 66 + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 66 and ticks <= 365 * 67 + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 67 and ticks <= 365 * 68 + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 68 and ticks <= 365 * 69 + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 69 and ticks <= 365 * 70 + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 70 and ticks <= 365 * 71 + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 71 and ticks <= 365 * 72 + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 72 and ticks <= 365 * 73 + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 73 and ticks <= 365 * 74 + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 74 and ticks <= 365 * 75 + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 75 and ticks <= 365 * 76 + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 76 and ticks <= 365 * 77 + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 77 and ticks <= 365 * 78 + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 78 and ticks <= 365 * 79 + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 79 and ticks <= 365 * 80 + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 80 and ticks <= 365 * 81 + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 81 and ticks <= 365 * 82 + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 82 and ticks <= 365 * 83 + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 83 and ticks <= 365 * 84 + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 84 and ticks <= 365 * 85 + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 85 and ticks <= 365 * 86 + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 86 and ticks <= 365 * 87 + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 87 and ticks <= 365 * 88 + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 88 and ticks <= 365 * 89 + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 89 and ticks <= 365 * 90 + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 90 and ticks <= 365 * 91 + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 91 and ticks <= 365 * 92 + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 92 and ticks <= 365 * 93 + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 93 and ticks <= 365 * 94 + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 94 and ticks <= 365 * 95 + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 95 and ticks <= 365 * 96 + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 96 and ticks <= 365 * 97 + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 97 and ticks <= 365 * 98 + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 98 and ticks <= 365 * 99 + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 99 and ticks <= 365 * 100 + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;; if HarvestCycle = 0 + ] + + if pycor < 15 + [ + ;if [pcolor] of patch 38 7 != red + 2 + if [pcolor] of patch 38 7 != 4 + [ + if F11NeverWithLand? = True + [ + if [LandType] of patch 37 13 != 4 + [ + set F11NeverWithLand? False + ] + ] + if F11NeverWithLand? = False + [ + set CountDownLandF11 (CountDownLandF11 - 1) + if CountDownLandF11 > 360 and CountDownLandF11 < 365 + [ + set F11FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F11FirstWithLand + 0) and ticks <= 365 * (F11FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F11FirstWithLand + 1) and ticks <= 365 * (F11FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F11FirstWithLand + 2) and ticks <= 365 * (F11FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F11FirstWithLand + 3) and ticks <= 365 * (F11FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F11FirstWithLand + 4) and ticks <= 365 * (F11FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F11FirstWithLand + 5) and ticks <= 365 * (F11FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F11FirstWithLand + 6) and ticks <= 365 * (F11FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F11FirstWithLand + 7) and ticks <= 365 * (F11FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F11FirstWithLand + 8) and ticks <= 365 * (F11FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F11FirstWithLand + 9) and ticks <= 365 * (F11FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 10) and ticks <= 365 * (F11FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 11) and ticks <= 365 * (F11FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 12) and ticks <= 365 * (F11FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 13) and ticks <= 365 * (F11FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 14) and ticks <= 365 * (F11FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 15) and ticks <= 365 * (F11FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 16) and ticks <= 365 * (F11FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 17) and ticks <= 365 * (F11FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 18) and ticks <= 365 * (F11FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 19) and ticks <= 365 * (F11FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 20) and ticks <= 365 * (F11FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 21) and ticks <= 365 * (F11FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 22) and ticks <= 365 * (F11FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 23) and ticks <= 365 * (F11FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 24) and ticks <= 365 * (F11FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 25) and ticks <= 365 * (F11FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 26) and ticks <= 365 * (F11FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 27) and ticks <= 365 * (F11FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 28) and ticks <= 365 * (F11FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 29) and ticks <= 365 * (F11FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 30) and ticks <= 365 * (F11FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 31) and ticks <= 365 * (F11FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 32) and ticks <= 365 * (F11FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 33) and ticks <= 365 * (F11FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 34) and ticks <= 365 * (F11FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 35) and ticks <= 365 * (F11FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 36) and ticks <= 365 * (F11FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 37) and ticks <= 365 * (F11FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 38) and ticks <= 365 * (F11FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 39) and ticks <= 365 * (F11FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 40) and ticks <= 365 * (F11FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 41) and ticks <= 365 * (F11FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 42) and ticks <= 365 * (F11FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 43) and ticks <= 365 * (F11FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 44) and ticks <= 365 * (F11FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 45) and ticks <= 365 * (F11FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 46) and ticks <= 365 * (F11FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 47) and ticks <= 365 * (F11FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 48) and ticks <= 365 * (F11FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 49) and ticks <= 365 * (F11FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 50) and ticks <= 365 * (F11FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 51) and ticks <= 365 * (F11FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 52) and ticks <= 365 * (F11FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 53) and ticks <= 365 * (F11FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 54) and ticks <= 365 * (F11FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 55) and ticks <= 365 * (F11FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 56) and ticks <= 365 * (F11FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 57) and ticks <= 365 * (F11FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 58) and ticks <= 365 * (F11FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 59) and ticks <= 365 * (F11FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 60) and ticks <= 365 * (F11FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 61) and ticks <= 365 * (F11FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 62) and ticks <= 365 * (F11FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 63) and ticks <= 365 * (F11FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 64) and ticks <= 365 * (F11FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 65) and ticks <= 365 * (F11FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 66) and ticks <= 365 * (F11FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 67) and ticks <= 365 * (F11FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 68) and ticks <= 365 * (F11FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 69) and ticks <= 365 * (F11FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 70) and ticks <= 365 * (F11FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 71) and ticks <= 365 * (F11FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 72) and ticks <= 365 * (F11FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 73) and ticks <= 365 * (F11FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 74) and ticks <= 365 * (F11FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 75) and ticks <= 365 * (F11FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 76) and ticks <= 365 * (F11FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 77) and ticks <= 365 * (F11FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 78) and ticks <= 365 * (F11FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 79) and ticks <= 365 * (F11FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 80) and ticks <= 365 * (F11FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 81) and ticks <= 365 * (F11FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 82) and ticks <= 365 * (F11FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 83) and ticks <= 365 * (F11FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 84) and ticks <= 365 * (F11FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 85) and ticks <= 365 * (F11FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 86) and ticks <= 365 * (F11FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 87) and ticks <= 365 * (F11FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 88) and ticks <= 365 * (F11FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 89) and ticks <= 365 * (F11FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 90) and ticks <= 365 * (F11FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 91) and ticks <= 365 * (F11FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 92) and ticks <= 365 * (F11FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 93) and ticks <= 365 * (F11FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 94) and ticks <= 365 * (F11FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 95) and ticks <= 365 * (F11FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 96) and ticks <= 365 * (F11FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 97) and ticks <= 365 * (F11FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 98) and ticks <= 365 * (F11FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F11FirstWithLand + 99) and ticks <= 365 * (F11FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;if HarvestCycle = 0 + ] + ] +;;;;;;;F14 + if pxcor > 38 and pxcor < 41 and pycor > 5 and pycor < 9 + [ + if F14NeverWithLand? = True + [ + if [LandType] of patch 38 7 != 4 + [ + set F14NeverWithLand? False + ] + ] + if F14NeverWithLand? = False + [ + set CountDownLandF14 (CountDownLandF14 - 1) + if CountDownLandF14 > 360 and CountDownLandF14 < 365 + [ + set F14FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F14FirstWithLand + 0) and ticks <= 365 * (F14FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F14FirstWithLand + 1) and ticks <= 365 * (F14FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F14FirstWithLand + 2) and ticks <= 365 * (F14FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F14FirstWithLand + 3) and ticks <= 365 * (F14FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F14FirstWithLand + 4) and ticks <= 365 * (F14FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F14FirstWithLand + 5) and ticks <= 365 * (F14FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F14FirstWithLand + 6) and ticks <= 365 * (F14FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F14FirstWithLand + 7) and ticks <= 365 * (F14FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F14FirstWithLand + 8) and ticks <= 365 * (F14FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F14FirstWithLand + 9) and ticks <= 365 * (F14FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 10) and ticks <= 365 * (F14FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 11) and ticks <= 365 * (F14FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 12) and ticks <= 365 * (F14FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 13) and ticks <= 365 * (F14FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 14) and ticks <= 365 * (F14FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 15) and ticks <= 365 * (F14FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 16) and ticks <= 365 * (F14FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 17) and ticks <= 365 * (F14FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 18) and ticks <= 365 * (F14FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 19) and ticks <= 365 * (F14FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 20) and ticks <= 365 * (F14FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 21) and ticks <= 365 * (F14FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 22) and ticks <= 365 * (F14FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 23) and ticks <= 365 * (F14FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 24) and ticks <= 365 * (F14FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 25) and ticks <= 365 * (F14FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 26) and ticks <= 365 * (F14FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 27) and ticks <= 365 * (F14FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 28) and ticks <= 365 * (F14FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 29) and ticks <= 365 * (F14FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 30) and ticks <= 365 * (F14FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 31) and ticks <= 365 * (F14FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 32) and ticks <= 365 * (F14FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 33) and ticks <= 365 * (F14FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 34) and ticks <= 365 * (F14FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 35) and ticks <= 365 * (F14FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 36) and ticks <= 365 * (F14FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 37) and ticks <= 365 * (F14FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 38) and ticks <= 365 * (F14FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 39) and ticks <= 365 * (F14FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 40) and ticks <= 365 * (F14FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 41) and ticks <= 365 * (F14FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 42) and ticks <= 365 * (F14FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 43) and ticks <= 365 * (F14FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 44) and ticks <= 365 * (F14FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 45) and ticks <= 365 * (F14FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 46) and ticks <= 365 * (F14FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 47) and ticks <= 365 * (F14FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 48) and ticks <= 365 * (F14FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 49) and ticks <= 365 * (F14FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 50) and ticks <= 365 * (F14FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 51) and ticks <= 365 * (F14FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 52) and ticks <= 365 * (F14FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 53) and ticks <= 365 * (F14FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 54) and ticks <= 365 * (F14FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 55) and ticks <= 365 * (F14FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 56) and ticks <= 365 * (F14FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 57) and ticks <= 365 * (F14FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 58) and ticks <= 365 * (F14FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 59) and ticks <= 365 * (F14FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 60) and ticks <= 365 * (F14FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 61) and ticks <= 365 * (F14FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 62) and ticks <= 365 * (F14FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 63) and ticks <= 365 * (F14FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 64) and ticks <= 365 * (F14FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 65) and ticks <= 365 * (F14FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 66) and ticks <= 365 * (F14FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 67) and ticks <= 365 * (F14FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 68) and ticks <= 365 * (F14FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 69) and ticks <= 365 * (F14FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 70) and ticks <= 365 * (F14FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 71) and ticks <= 365 * (F14FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 72) and ticks <= 365 * (F14FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 73) and ticks <= 365 * (F14FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 74) and ticks <= 365 * (F14FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 75) and ticks <= 365 * (F14FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 76) and ticks <= 365 * (F14FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 77) and ticks <= 365 * (F14FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 78) and ticks <= 365 * (F14FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 79) and ticks <= 365 * (F14FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 80) and ticks <= 365 * (F14FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 81) and ticks <= 365 * (F14FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 82) and ticks <= 365 * (F14FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 83) and ticks <= 365 * (F14FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 84) and ticks <= 365 * (F14FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 85) and ticks <= 365 * (F14FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 86) and ticks <= 365 * (F14FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 87) and ticks <= 365 * (F14FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 88) and ticks <= 365 * (F14FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 89) and ticks <= 365 * (F14FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 90) and ticks <= 365 * (F14FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 91) and ticks <= 365 * (F14FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 92) and ticks <= 365 * (F14FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 93) and ticks <= 365 * (F14FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 94) and ticks <= 365 * (F14FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 95) and ticks <= 365 * (F14FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 96) and ticks <= 365 * (F14FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 97) and ticks <= 365 * (F14FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 98) and ticks <= 365 * (F14FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F14FirstWithLand + 99) and ticks <= 365 * (F14FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] +;;;;;;;F15 + if pxcor > 35 and pxcor < 38 and pycor > 3 and pycor < 7 + [ + if F15NeverWithLand? = True + [ + if [LandType] of patch 38 5 != 4 + [ + set F15NeverWithLand? False + ] + ] + if F15NeverWithLand? = False + [ + set CountDownLandF15 (CountDownLandF15 - 1) + if CountDownLandF15 > 360 and CountDownLandF15 < 365 + [ + set F15FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F15FirstWithLand + 0) and ticks <= 365 * (F15FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F15FirstWithLand + 1) and ticks <= 365 * (F15FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F15FirstWithLand + 2) and ticks <= 365 * (F15FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F15FirstWithLand + 3) and ticks <= 365 * (F15FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F15FirstWithLand + 4) and ticks <= 365 * (F15FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F15FirstWithLand + 5) and ticks <= 365 * (F15FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F15FirstWithLand + 6) and ticks <= 365 * (F15FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F15FirstWithLand + 7) and ticks <= 365 * (F15FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F15FirstWithLand + 8) and ticks <= 365 * (F15FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F15FirstWithLand + 9) and ticks <= 365 * (F15FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 10) and ticks <= 365 * (F15FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 11) and ticks <= 365 * (F15FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 12) and ticks <= 365 * (F15FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 13) and ticks <= 365 * (F15FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 14) and ticks <= 365 * (F15FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 15) and ticks <= 365 * (F15FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 16) and ticks <= 365 * (F15FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 17) and ticks <= 365 * (F15FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 18) and ticks <= 365 * (F15FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 19) and ticks <= 365 * (F15FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 20) and ticks <= 365 * (F15FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 21) and ticks <= 365 * (F15FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 22) and ticks <= 365 * (F15FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 23) and ticks <= 365 * (F15FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 24) and ticks <= 365 * (F15FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 25) and ticks <= 365 * (F15FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 26) and ticks <= 365 * (F15FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 27) and ticks <= 365 * (F15FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 28) and ticks <= 365 * (F15FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 29) and ticks <= 365 * (F15FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 30) and ticks <= 365 * (F15FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 31) and ticks <= 365 * (F15FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 32) and ticks <= 365 * (F15FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 33) and ticks <= 365 * (F15FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 34) and ticks <= 365 * (F15FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 35) and ticks <= 365 * (F15FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 36) and ticks <= 365 * (F15FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 37) and ticks <= 365 * (F15FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 38) and ticks <= 365 * (F15FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 39) and ticks <= 365 * (F15FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 40) and ticks <= 365 * (F15FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 41) and ticks <= 365 * (F15FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 42) and ticks <= 365 * (F15FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 43) and ticks <= 365 * (F15FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 44) and ticks <= 365 * (F15FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 45) and ticks <= 365 * (F15FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 46) and ticks <= 365 * (F15FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 47) and ticks <= 365 * (F15FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 48) and ticks <= 365 * (F15FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 49) and ticks <= 365 * (F15FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 50) and ticks <= 365 * (F15FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 51) and ticks <= 365 * (F15FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 52) and ticks <= 365 * (F15FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 53) and ticks <= 365 * (F15FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 54) and ticks <= 365 * (F15FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 55) and ticks <= 365 * (F15FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 56) and ticks <= 365 * (F15FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 57) and ticks <= 365 * (F15FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 58) and ticks <= 365 * (F15FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 59) and ticks <= 365 * (F15FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 60) and ticks <= 365 * (F15FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 61) and ticks <= 365 * (F15FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 62) and ticks <= 365 * (F15FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 63) and ticks <= 365 * (F15FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 64) and ticks <= 365 * (F15FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 65) and ticks <= 365 * (F15FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 66) and ticks <= 365 * (F15FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 67) and ticks <= 365 * (F15FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 68) and ticks <= 365 * (F15FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 69) and ticks <= 365 * (F15FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 70) and ticks <= 365 * (F15FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 71) and ticks <= 365 * (F15FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 72) and ticks <= 365 * (F15FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 73) and ticks <= 365 * (F15FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 74) and ticks <= 365 * (F15FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 75) and ticks <= 365 * (F15FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 76) and ticks <= 365 * (F15FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 77) and ticks <= 365 * (F15FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 78) and ticks <= 365 * (F15FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 79) and ticks <= 365 * (F15FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 80) and ticks <= 365 * (F15FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 81) and ticks <= 365 * (F15FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 82) and ticks <= 365 * (F15FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 83) and ticks <= 365 * (F15FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 84) and ticks <= 365 * (F15FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 85) and ticks <= 365 * (F15FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 86) and ticks <= 365 * (F15FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 87) and ticks <= 365 * (F15FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 88) and ticks <= 365 * (F15FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 89) and ticks <= 365 * (F15FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 90) and ticks <= 365 * (F15FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 91) and ticks <= 365 * (F15FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 92) and ticks <= 365 * (F15FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 93) and ticks <= 365 * (F15FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 94) and ticks <= 365 * (F15FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 95) and ticks <= 365 * (F15FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 96) and ticks <= 365 * (F15FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 97) and ticks <= 365 * (F15FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 98) and ticks <= 365 * (F15FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F15FirstWithLand + 99) and ticks <= 365 * (F15FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] +;;;;;;;F16 + if pxcor > 38 and pxcor < 41 and pycor > 1 and pycor < 5 + [ + if F16NeverWithLand? = True + [ + if [LandType] of patch 38 3 != 4 + [ + set F16NeverWithLand? False + ] + ] + if F16NeverWithLand? = False + [ + set CountDownLandF16 (CountDownLandF16 - 1) + if CountDownLandF16 > 360 and CountDownLandF16 < 365 + [ + set F16FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F16FirstWithLand + 0) and ticks <= 365 * (F16FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F16FirstWithLand + 1) and ticks <= 365 * (F16FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F16FirstWithLand + 2) and ticks <= 365 * (F16FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F16FirstWithLand + 3) and ticks <= 365 * (F16FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F16FirstWithLand + 4) and ticks <= 365 * (F16FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F16FirstWithLand + 5) and ticks <= 365 * (F16FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F16FirstWithLand + 6) and ticks <= 365 * (F16FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F16FirstWithLand + 7) and ticks <= 365 * (F16FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F16FirstWithLand + 8) and ticks <= 365 * (F16FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F16FirstWithLand + 9) and ticks <= 365 * (F16FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 10) and ticks <= 365 * (F16FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 11) and ticks <= 365 * (F16FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 12) and ticks <= 365 * (F16FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 13) and ticks <= 365 * (F16FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 14) and ticks <= 365 * (F16FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 15) and ticks <= 365 * (F16FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 16) and ticks <= 365 * (F16FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 17) and ticks <= 365 * (F16FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 18) and ticks <= 365 * (F16FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 19) and ticks <= 365 * (F16FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 20) and ticks <= 365 * (F16FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 21) and ticks <= 365 * (F16FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 22) and ticks <= 365 * (F16FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 23) and ticks <= 365 * (F16FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 24) and ticks <= 365 * (F16FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 25) and ticks <= 365 * (F16FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 26) and ticks <= 365 * (F16FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 27) and ticks <= 365 * (F16FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 28) and ticks <= 365 * (F16FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 29) and ticks <= 365 * (F16FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 30) and ticks <= 365 * (F16FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 31) and ticks <= 365 * (F16FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 32) and ticks <= 365 * (F16FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 33) and ticks <= 365 * (F16FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 34) and ticks <= 365 * (F16FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 35) and ticks <= 365 * (F16FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 36) and ticks <= 365 * (F16FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 37) and ticks <= 365 * (F16FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 38) and ticks <= 365 * (F16FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 39) and ticks <= 365 * (F16FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 40) and ticks <= 365 * (F16FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 41) and ticks <= 365 * (F16FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 42) and ticks <= 365 * (F16FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 43) and ticks <= 365 * (F16FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 44) and ticks <= 365 * (F16FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 45) and ticks <= 365 * (F16FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 46) and ticks <= 365 * (F16FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 47) and ticks <= 365 * (F16FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 48) and ticks <= 365 * (F16FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 49) and ticks <= 365 * (F16FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 50) and ticks <= 365 * (F16FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 51) and ticks <= 365 * (F16FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 52) and ticks <= 365 * (F16FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 53) and ticks <= 365 * (F16FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 54) and ticks <= 365 * (F16FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 55) and ticks <= 365 * (F16FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 56) and ticks <= 365 * (F16FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 57) and ticks <= 365 * (F16FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 58) and ticks <= 365 * (F16FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 59) and ticks <= 365 * (F16FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 60) and ticks <= 365 * (F16FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 61) and ticks <= 365 * (F16FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 62) and ticks <= 365 * (F16FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 63) and ticks <= 365 * (F16FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 64) and ticks <= 365 * (F16FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 65) and ticks <= 365 * (F16FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 66) and ticks <= 365 * (F16FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 67) and ticks <= 365 * (F16FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 68) and ticks <= 365 * (F16FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 69) and ticks <= 365 * (F16FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 70) and ticks <= 365 * (F16FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 71) and ticks <= 365 * (F16FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 72) and ticks <= 365 * (F16FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 73) and ticks <= 365 * (F16FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 74) and ticks <= 365 * (F16FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 75) and ticks <= 365 * (F16FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 76) and ticks <= 365 * (F16FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 77) and ticks <= 365 * (F16FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 78) and ticks <= 365 * (F16FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 79) and ticks <= 365 * (F16FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 80) and ticks <= 365 * (F16FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 81) and ticks <= 365 * (F16FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 82) and ticks <= 365 * (F16FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 83) and ticks <= 365 * (F16FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 84) and ticks <= 365 * (F16FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 85) and ticks <= 365 * (F16FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 86) and ticks <= 365 * (F16FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 87) and ticks <= 365 * (F16FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 88) and ticks <= 365 * (F16FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 89) and ticks <= 365 * (F16FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 90) and ticks <= 365 * (F16FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 91) and ticks <= 365 * (F16FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 92) and ticks <= 365 * (F16FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 93) and ticks <= 365 * (F16FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 94) and ticks <= 365 * (F16FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 95) and ticks <= 365 * (F16FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 96) and ticks <= 365 * (F16FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 97) and ticks <= 365 * (F16FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 98) and ticks <= 365 * (F16FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F16FirstWithLand + 99) and ticks <= 365 * (F16FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] + ] +;;if F17-19 + if pxcor < 25 and pycor > 14 + [ + if [pcolor] of patch 16 17 != red + [ + if F17NeverWithLand? = True + [ + if [LandType] of patch 24 17 != -1 + [ + set F17NeverWithLand? False + ] + ] + if F17NeverWithLand? = False + [ + set CountDownLandF17 (CountDownLandF17 - 1) + if CountDownLandF17 > 360 and CountDownLandF17 < 365 + [ + set F17FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F17FirstWithLand + 0) and ticks <= 365 * (F17FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F17FirstWithLand + 1) and ticks <= 365 * (F17FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F17FirstWithLand + 2) and ticks <= 365 * (F17FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F17FirstWithLand + 3) and ticks <= 365 * (F17FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F17FirstWithLand + 4) and ticks <= 365 * (F17FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F17FirstWithLand + 5) and ticks <= 365 * (F17FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F17FirstWithLand + 6) and ticks <= 365 * (F17FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F17FirstWithLand + 7) and ticks <= 365 * (F17FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F17FirstWithLand + 8) and ticks <= 365 * (F17FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F17FirstWithLand + 9) and ticks <= 365 * (F17FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 10) and ticks <= 365 * (F17FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 11) and ticks <= 365 * (F17FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 12) and ticks <= 365 * (F17FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 13) and ticks <= 365 * (F17FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 14) and ticks <= 365 * (F17FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 15) and ticks <= 365 * (F17FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 16) and ticks <= 365 * (F17FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 17) and ticks <= 365 * (F17FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 18) and ticks <= 365 * (F17FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 19) and ticks <= 365 * (F17FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 20) and ticks <= 365 * (F17FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 21) and ticks <= 365 * (F17FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 22) and ticks <= 365 * (F17FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 23) and ticks <= 365 * (F17FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 24) and ticks <= 365 * (F17FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 25) and ticks <= 365 * (F17FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 26) and ticks <= 365 * (F17FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 27) and ticks <= 365 * (F17FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 28) and ticks <= 365 * (F17FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 29) and ticks <= 365 * (F17FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 30) and ticks <= 365 * (F17FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 31) and ticks <= 365 * (F17FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 32) and ticks <= 365 * (F17FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 33) and ticks <= 365 * (F17FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 34) and ticks <= 365 * (F17FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 35) and ticks <= 365 * (F17FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 36) and ticks <= 365 * (F17FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 37) and ticks <= 365 * (F17FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 38) and ticks <= 365 * (F17FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 39) and ticks <= 365 * (F17FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 40) and ticks <= 365 * (F17FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 41) and ticks <= 365 * (F17FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 42) and ticks <= 365 * (F17FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 43) and ticks <= 365 * (F17FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 44) and ticks <= 365 * (F17FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 45) and ticks <= 365 * (F17FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 46) and ticks <= 365 * (F17FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 47) and ticks <= 365 * (F17FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 48) and ticks <= 365 * (F17FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 49) and ticks <= 365 * (F17FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 50) and ticks <= 365 * (F17FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 51) and ticks <= 365 * (F17FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 52) and ticks <= 365 * (F17FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 53) and ticks <= 365 * (F17FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 54) and ticks <= 365 * (F17FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 55) and ticks <= 365 * (F17FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 56) and ticks <= 365 * (F17FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 57) and ticks <= 365 * (F17FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 58) and ticks <= 365 * (F17FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 59) and ticks <= 365 * (F17FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 60) and ticks <= 365 * (F17FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 61) and ticks <= 365 * (F17FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 62) and ticks <= 365 * (F17FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 63) and ticks <= 365 * (F17FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 64) and ticks <= 365 * (F17FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 65) and ticks <= 365 * (F17FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 66) and ticks <= 365 * (F17FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 67) and ticks <= 365 * (F17FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 68) and ticks <= 365 * (F17FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 69) and ticks <= 365 * (F17FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 70) and ticks <= 365 * (F17FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 71) and ticks <= 365 * (F17FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 72) and ticks <= 365 * (F17FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 73) and ticks <= 365 * (F17FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 74) and ticks <= 365 * (F17FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 75) and ticks <= 365 * (F17FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 76) and ticks <= 365 * (F17FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 77) and ticks <= 365 * (F17FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 78) and ticks <= 365 * (F17FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 79) and ticks <= 365 * (F17FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 80) and ticks <= 365 * (F17FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 81) and ticks <= 365 * (F17FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 82) and ticks <= 365 * (F17FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 83) and ticks <= 365 * (F17FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 84) and ticks <= 365 * (F17FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 85) and ticks <= 365 * (F17FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 86) and ticks <= 365 * (F17FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 87) and ticks <= 365 * (F17FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 88) and ticks <= 365 * (F17FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 89) and ticks <= 365 * (F17FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 90) and ticks <= 365 * (F17FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 91) and ticks <= 365 * (F17FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 92) and ticks <= 365 * (F17FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 93) and ticks <= 365 * (F17FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 94) and ticks <= 365 * (F17FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 95) and ticks <= 365 * (F17FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 96) and ticks <= 365 * (F17FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 97) and ticks <= 365 * (F17FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 98) and ticks <= 365 * (F17FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F17FirstWithLand + 99) and ticks <= 365 * (F17FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;if HarvestCycle = 0 + ] + ] +;;;;;;;F20 + if pxcor > 14 and pxcor < 18 and pycor > 14 and pycor < 17 + [ + if F20NeverWithLand? = True + [ + if [LandType] of patch 18 17 != 4 + [ + set F20NeverWithLand? False + ] + ] + if F20NeverWithLand? = False + [ + set CountDownLandF20 (CountDownLandF20 - 1) + if CountDownLandF20 > 360 and CountDownLandF20 < 365 + [ + set F20FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F20FirstWithLand + 0) and ticks <= 365 * (F20FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F20FirstWithLand + 1) and ticks <= 365 * (F20FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F20FirstWithLand + 2) and ticks <= 365 * (F20FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F20FirstWithLand + 3) and ticks <= 365 * (F20FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F20FirstWithLand + 4) and ticks <= 365 * (F14FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F20FirstWithLand + 5) and ticks <= 365 * (F20FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F20FirstWithLand + 6) and ticks <= 365 * (F20FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F20FirstWithLand + 7) and ticks <= 365 * (F20FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F20FirstWithLand + 8) and ticks <= 365 * (F20FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F20FirstWithLand + 9) and ticks <= 365 * (F20FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 10) and ticks <= 365 * (F20FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 11) and ticks <= 365 * (F20FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 12) and ticks <= 365 * (F20FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 13) and ticks <= 365 * (F20FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 14) and ticks <= 365 * (F20FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 15) and ticks <= 365 * (F20FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 16) and ticks <= 365 * (F20FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 17) and ticks <= 365 * (F20FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 18) and ticks <= 365 * (F20FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 19) and ticks <= 365 * (F20FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 20) and ticks <= 365 * (F20FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 21) and ticks <= 365 * (F20FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 22) and ticks <= 365 * (F20FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 23) and ticks <= 365 * (F20FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 24) and ticks <= 365 * (F20FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 25) and ticks <= 365 * (F20FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 26) and ticks <= 365 * (F20FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 27) and ticks <= 365 * (F20FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 28) and ticks <= 365 * (F20FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 29) and ticks <= 365 * (F20FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 30) and ticks <= 365 * (F20FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 31) and ticks <= 365 * (F20FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 32) and ticks <= 365 * (F20FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 33) and ticks <= 365 * (F20FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 34) and ticks <= 365 * (F20FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 35) and ticks <= 365 * (F20FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 36) and ticks <= 365 * (F20FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 37) and ticks <= 365 * (F20FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 38) and ticks <= 365 * (F20FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 39) and ticks <= 365 * (F20FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 40) and ticks <= 365 * (F20FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 41) and ticks <= 365 * (F20FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 42) and ticks <= 365 * (F20FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 43) and ticks <= 365 * (F20FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 44) and ticks <= 365 * (F20FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 45) and ticks <= 365 * (F20FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 46) and ticks <= 365 * (F20FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 47) and ticks <= 365 * (F20FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 48) and ticks <= 365 * (F20FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 49) and ticks <= 365 * (F20FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 50) and ticks <= 365 * (F20FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 51) and ticks <= 365 * (F20FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 52) and ticks <= 365 * (F20FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 53) and ticks <= 365 * (F20FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 54) and ticks <= 365 * (F20FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 55) and ticks <= 365 * (F20FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 56) and ticks <= 365 * (F20FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 57) and ticks <= 365 * (F20FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 58) and ticks <= 365 * (F20FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 59) and ticks <= 365 * (F20FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 60) and ticks <= 365 * (F20FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 61) and ticks <= 365 * (F20FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 62) and ticks <= 365 * (F20FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 63) and ticks <= 365 * (F20FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 64) and ticks <= 365 * (F20FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 65) and ticks <= 365 * (F20FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 66) and ticks <= 365 * (F20FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 67) and ticks <= 365 * (F20FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 68) and ticks <= 365 * (F20FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 69) and ticks <= 365 * (F20FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 70) and ticks <= 365 * (F20FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 71) and ticks <= 365 * (F20FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 72) and ticks <= 365 * (F20FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 73) and ticks <= 365 * (F20FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 74) and ticks <= 365 * (F20FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 75) and ticks <= 365 * (F20FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 76) and ticks <= 365 * (F20FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 77) and ticks <= 365 * (F20FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 78) and ticks <= 365 * (F20FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 79) and ticks <= 365 * (F20FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 80) and ticks <= 365 * (F20FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 81) and ticks <= 365 * (F20FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 82) and ticks <= 365 * (F20FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 83) and ticks <= 365 * (F20FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 84) and ticks <= 365 * (F20FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 85) and ticks <= 365 * (F20FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 86) and ticks <= 365 * (F20FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 87) and ticks <= 365 * (F20FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 88) and ticks <= 365 * (F20FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 89) and ticks <= 365 * (F20FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 90) and ticks <= 365 * (F20FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 91) and ticks <= 365 * (F20FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 92) and ticks <= 365 * (F20FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 93) and ticks <= 365 * (F20FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 94) and ticks <= 365 * (F20FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 95) and ticks <= 365 * (F20FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 96) and ticks <= 365 * (F20FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 97) and ticks <= 365 * (F20FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 98) and ticks <= 365 * (F20FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F20FirstWithLand + 99) and ticks <= 365 * (F20FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] +;;;;;;;F21 + if pxcor > 12 and pxcor < 16 and pycor > 17 and pycor < 20 + [ + if F21NeverWithLand? = True + [ + if [LandType] of patch 16 17 != 4 + [ + set F21NeverWithLand? False + ] + ] + if F21NeverWithLand? = False + [ + set CountDownLandF21 (CountDownLandF21 - 1) + if CountDownLandF21 > 360 and CountDownLandF21 < 365 + [ + set F21FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F21FirstWithLand + 0) and ticks <= 365 * (F21FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F21FirstWithLand + 1) and ticks <= 365 * (F21FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F21FirstWithLand + 2) and ticks <= 365 * (F21FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F21FirstWithLand + 3) and ticks <= 365 * (F21FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F21FirstWithLand + 4) and ticks <= 365 * (F21FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F21FirstWithLand + 5) and ticks <= 365 * (F21FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F21FirstWithLand + 6) and ticks <= 365 * (F21FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F21FirstWithLand + 7) and ticks <= 365 * (F21FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F21FirstWithLand + 8) and ticks <= 365 * (F21FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F21FirstWithLand + 9) and ticks <= 365 * (F21FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 10) and ticks <= 365 * (F21FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 11) and ticks <= 365 * (F21FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 12) and ticks <= 365 * (F21FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 13) and ticks <= 365 * (F21FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 14) and ticks <= 365 * (F21FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 15) and ticks <= 365 * (F21FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 16) and ticks <= 365 * (F21FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 17) and ticks <= 365 * (F21FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 18) and ticks <= 365 * (F21FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 19) and ticks <= 365 * (F21FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 20) and ticks <= 365 * (F21FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 21) and ticks <= 365 * (F21FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 22) and ticks <= 365 * (F21FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 23) and ticks <= 365 * (F21FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 24) and ticks <= 365 * (F21FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 25) and ticks <= 365 * (F21FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 26) and ticks <= 365 * (F21FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 27) and ticks <= 365 * (F21FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 28) and ticks <= 365 * (F21FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 29) and ticks <= 365 * (F21FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 30) and ticks <= 365 * (F21FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 31) and ticks <= 365 * (F21FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 32) and ticks <= 365 * (F21FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 33) and ticks <= 365 * (F21FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 34) and ticks <= 365 * (F21FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 35) and ticks <= 365 * (F21FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 36) and ticks <= 365 * (F21FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 37) and ticks <= 365 * (F21FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 38) and ticks <= 365 * (F21FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 39) and ticks <= 365 * (F21FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 40) and ticks <= 365 * (F21FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 41) and ticks <= 365 * (F21FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 42) and ticks <= 365 * (F21FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 43) and ticks <= 365 * (F21FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 44) and ticks <= 365 * (F21FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 45) and ticks <= 365 * (F21FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 46) and ticks <= 365 * (F21FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 47) and ticks <= 365 * (F21FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 48) and ticks <= 365 * (F21FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 49) and ticks <= 365 * (F21FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 50) and ticks <= 365 * (F21FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 51) and ticks <= 365 * (F21FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 52) and ticks <= 365 * (F21FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 53) and ticks <= 365 * (F21FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 54) and ticks <= 365 * (F21FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 55) and ticks <= 365 * (F21FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 56) and ticks <= 365 * (F21FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 57) and ticks <= 365 * (F21FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 58) and ticks <= 365 * (F21FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 59) and ticks <= 365 * (F21FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 60) and ticks <= 365 * (F21FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 61) and ticks <= 365 * (F21FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 62) and ticks <= 365 * (F21FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 63) and ticks <= 365 * (F21FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 64) and ticks <= 365 * (F21FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 65) and ticks <= 365 * (F21FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 66) and ticks <= 365 * (F21FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 67) and ticks <= 365 * (F21FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 68) and ticks <= 365 * (F21FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 69) and ticks <= 365 * (F21FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 70) and ticks <= 365 * (F21FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 71) and ticks <= 365 * (F21FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 72) and ticks <= 365 * (F21FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 73) and ticks <= 365 * (F21FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 74) and ticks <= 365 * (F21FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 75) and ticks <= 365 * (F21FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 76) and ticks <= 365 * (F21FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 77) and ticks <= 365 * (F21FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 78) and ticks <= 365 * (F21FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 79) and ticks <= 365 * (F21FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 80) and ticks <= 365 * (F21FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 81) and ticks <= 365 * (F21FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 82) and ticks <= 365 * (F21FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 83) and ticks <= 365 * (F21FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 84) and ticks <= 365 * (F21FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 85) and ticks <= 365 * (F21FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 86) and ticks <= 365 * (F21FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 87) and ticks <= 365 * (F21FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 88) and ticks <= 365 * (F21FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 89) and ticks <= 365 * (F21FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 90) and ticks <= 365 * (F21FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 91) and ticks <= 365 * (F21FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 92) and ticks <= 365 * (F21FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 93) and ticks <= 365 * (F21FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 94) and ticks <= 365 * (F21FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 95) and ticks <= 365 * (F21FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 96) and ticks <= 365 * (F21FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 97) and ticks <= 365 * (F21FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 98) and ticks <= 365 * (F21FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F21FirstWithLand + 99) and ticks <= 365 * (F21FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] +;;;;;;;F22 + if pxcor > 10 and pxcor < 14 and pycor > 14 and pycor < 17 + [ + if F22NeverWithLand? = True + [ + if [LandType] of patch 12 17 != 4 + [ + set F22NeverWithLand? False + ] + ] + if F22NeverWithLand? = False + [ + set CountDownLandF22 (CountDownLandF22 - 1) + if CountDownLandF22 > 360 and CountDownLandF22 < 365 + [ + set F22FirstWithLand Year + ] + if HarvestCycle = 0 + [ + if ticks > 365 * (F22FirstWithLand + 0) and ticks <= 365 * (F22FirstWithLand + 1) + [ + set AvailableWaterY1 Landed_Year + set AverageAvailableWater ((AvailableWaterY1) / 1) + ] + if ticks > 365 * (F22FirstWithLand + 1) and ticks <= 365 * (F22FirstWithLand + 2) + [ + set AvailableWaterY2 Landed_Year + set AverageAvailableWater ((AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (F22FirstWithLand + 2) and ticks <= 365 * (F22FirstWithLand + 3) + [ + set AvailableWaterY3 Landed_Year + set AverageAvailableWater ((AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (F22FirstWithLand + 3) and ticks <= 365 * (F22FirstWithLand + 4) + [ + set AvailableWaterY4 Landed_Year + set AverageAvailableWater ((AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (F22FirstWithLand + 4) and ticks <= 365 * (F22FirstWithLand + 5) + [ + set AvailableWaterY5 Landed_Year + set AverageAvailableWater ((AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (F22FirstWithLand + 5) and ticks <= 365 * (F22FirstWithLand + 6) + [ + set AvailableWaterY6 Landed_Year + set AverageAvailableWater ((AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (F22FirstWithLand + 6) and ticks <= 365 * (F22FirstWithLand + 7) + [ + set AvailableWaterY7 Landed_Year + set AverageAvailableWater ((AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (F22FirstWithLand + 7) and ticks <= 365 * (F22FirstWithLand + 8) + [ + set AvailableWaterY8 Landed_Year + set AverageAvailableWater ((AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (F22FirstWithLand + 8) and ticks <= 365 * (F22FirstWithLand + 9) + [ + set AvailableWaterY9 Landed_Year + set AverageAvailableWater ((AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (F22FirstWithLand + 9) and ticks <= 365 * (F22FirstWithLand + 10) + [ + set AvailableWaterY10 Landed_Year + set AverageAvailableWater ((AvailableWaterY10 * 10 + AvailableWaterY9 * 9 + AvailableWaterY8 * 8 + AvailableWaterY7 * 7 + AvailableWaterY6 * 6 + AvailableWaterY5 * 5 + AvailableWaterY4 * 4 + AvailableWaterY3 * 3 + AvailableWaterY2 * 2 + AvailableWaterY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 10) and ticks <= 365 * (F22FirstWithLand + 11) + [ + set AvailableWaterY11 Landed_Year + set AverageAvailableWater ((AvailableWaterY11 * 10 + AvailableWaterY10 * 9 + AvailableWaterY9 * 8 + AvailableWaterY8 * 7 + AvailableWaterY7 * 6 + AvailableWaterY6 * 5 + AvailableWaterY5 * 4 + AvailableWaterY4 * 3 + AvailableWaterY3 * 2 + AvailableWaterY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 11) and ticks <= 365 * (F22FirstWithLand + 12) + [ + set AvailableWaterY12 Landed_Year + set AverageAvailableWater ((AvailableWaterY12 * 10 + AvailableWaterY11 * 9 + AvailableWaterY10 * 8 + AvailableWaterY9 * 7 + AvailableWaterY8 * 6 + AvailableWaterY7 * 5 + AvailableWaterY6 * 4 + AvailableWaterY5 * 3 + AvailableWaterY4 * 2 + AvailableWaterY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 12) and ticks <= 365 * (F22FirstWithLand + 13) + [ + set AvailableWaterY13 Landed_Year + set AverageAvailableWater ((AvailableWaterY13 * 10 + AvailableWaterY12 * 9 + AvailableWaterY11 * 8 + AvailableWaterY10 * 7 + AvailableWaterY9 * 6 + AvailableWaterY8 * 5 + AvailableWaterY7 * 4 + AvailableWaterY6 * 3 + AvailableWaterY5 * 2 + AvailableWaterY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 13) and ticks <= 365 * (F22FirstWithLand + 14) + [ + set AvailableWaterY14 Landed_Year + set AverageAvailableWater ((AvailableWaterY14 * 10 + AvailableWaterY13 * 9 + AvailableWaterY12 * 8 + AvailableWaterY11 * 7 + AvailableWaterY10 * 6 + AvailableWaterY9 * 5 + AvailableWaterY8 * 4 + AvailableWaterY7 * 3 + AvailableWaterY6 * 2 + AvailableWaterY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 14) and ticks <= 365 * (F22FirstWithLand + 15) + [ + set AvailableWaterY15 Landed_Year + set AverageAvailableWater ((AvailableWaterY15 * 10 + AvailableWaterY14 * 9 + AvailableWaterY13 * 8 + AvailableWaterY12 * 7 + AvailableWaterY11 * 6 + AvailableWaterY10 * 5 + AvailableWaterY9 * 4 + AvailableWaterY8 * 3 + AvailableWaterY7 * 2 + AvailableWaterY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 15) and ticks <= 365 * (F22FirstWithLand + 16) + [ + set AvailableWaterY16 Landed_Year + set AverageAvailableWater ((AvailableWaterY16 * 10 + AvailableWaterY15 * 9 + AvailableWaterY14 * 8 + AvailableWaterY13 * 7 + AvailableWaterY12 * 6 + AvailableWaterY11 * 5 + AvailableWaterY10 * 4 + AvailableWaterY9 * 3 + AvailableWaterY8 * 2 + AvailableWaterY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 16) and ticks <= 365 * (F22FirstWithLand + 17) + [ + set AvailableWaterY17 Landed_Year + set AverageAvailableWater ((AvailableWaterY17 * 10 + AvailableWaterY16 * 9 + AvailableWaterY15 * 8 + AvailableWaterY14 * 7 + AvailableWaterY13 * 6 + AvailableWaterY12 * 5 + AvailableWaterY11 * 4 + AvailableWaterY10 * 3 + AvailableWaterY9 * 2 + AvailableWaterY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 17) and ticks <= 365 * (F22FirstWithLand + 18) + [ + set AvailableWaterY18 Landed_Year + set AverageAvailableWater ((AvailableWaterY18 * 10 + AvailableWaterY17 * 9 + AvailableWaterY16 * 8 + AvailableWaterY15 * 7 + AvailableWaterY14 * 6 + AvailableWaterY13 * 5 + AvailableWaterY12 * 4 + AvailableWaterY11 * 3 + AvailableWaterY10 * 2 + AvailableWaterY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 18) and ticks <= 365 * (F22FirstWithLand + 19) + [ + set AvailableWaterY19 Landed_Year + set AverageAvailableWater ((AvailableWaterY19 * 10 + AvailableWaterY18 * 9 + AvailableWaterY17 * 8 + AvailableWaterY16 * 7 + AvailableWaterY15 * 6 + AvailableWaterY14 * 5 + AvailableWaterY13 * 4 + AvailableWaterY12 * 3 + AvailableWaterY11 * 2 + AvailableWaterY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 19) and ticks <= 365 * (F22FirstWithLand + 20) + [ + set AvailableWaterY20 Landed_Year + set AverageAvailableWater ((AvailableWaterY20 * 10 + AvailableWaterY19 * 9 + AvailableWaterY18 * 8 + AvailableWaterY17 * 7 + AvailableWaterY16 * 6 + AvailableWaterY15 * 5 + AvailableWaterY14 * 4 + AvailableWaterY13 * 3 + AvailableWaterY12 * 2 + AvailableWaterY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 20) and ticks <= 365 * (F22FirstWithLand + 21) + [ + set AvailableWaterY21 Landed_Year + set AverageAvailableWater ((AvailableWaterY21 * 10 + AvailableWaterY20 * 9 + AvailableWaterY19 * 8 + AvailableWaterY18 * 7 + AvailableWaterY17 * 6 + AvailableWaterY16 * 5 + AvailableWaterY15 * 4 + AvailableWaterY14 * 3 + AvailableWaterY13 * 2 + AvailableWaterY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 21) and ticks <= 365 * (F22FirstWithLand + 22) + [ + set AvailableWaterY22 Landed_Year + set AverageAvailableWater ((AvailableWaterY22 * 10 + AvailableWaterY21 * 9 + AvailableWaterY20 * 8 + AvailableWaterY19 * 7 + AvailableWaterY18 * 6 + AvailableWaterY17 * 5 + AvailableWaterY16 * 4 + AvailableWaterY15 * 3 + AvailableWaterY14 * 2 + AvailableWaterY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 22) and ticks <= 365 * (F22FirstWithLand + 23) + [ + set AvailableWaterY23 Landed_Year + set AverageAvailableWater ((AvailableWaterY23 * 10 + AvailableWaterY22 * 9 + AvailableWaterY21 * 8 + AvailableWaterY20 * 7 + AvailableWaterY19 * 6 + AvailableWaterY18 * 5 + AvailableWaterY17 * 4 + AvailableWaterY16 * 3 + AvailableWaterY15 * 2 + AvailableWaterY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 23) and ticks <= 365 * (F22FirstWithLand + 24) + [ + set AvailableWaterY24 Landed_Year + set AverageAvailableWater ((AvailableWaterY24 * 10 + AvailableWaterY23 * 9 + AvailableWaterY22 * 8 + AvailableWaterY21 * 7 + AvailableWaterY20 * 6 + AvailableWaterY19 * 5 + AvailableWaterY18 * 4 + AvailableWaterY17 * 3 + AvailableWaterY16 * 2 + AvailableWaterY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 24) and ticks <= 365 * (F22FirstWithLand + 25) + [ + set AvailableWaterY25 Landed_Year + set AverageAvailableWater ((AvailableWaterY25 * 10 + AvailableWaterY24 * 9 + AvailableWaterY23 * 8 + AvailableWaterY22 * 7 + AvailableWaterY21 * 6 + AvailableWaterY20 * 5 + AvailableWaterY19 * 4 + AvailableWaterY18 * 3 + AvailableWaterY17 * 2 + AvailableWaterY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 25) and ticks <= 365 * (F22FirstWithLand + 26) + [ + set AvailableWaterY26 Landed_Year + set AverageAvailableWater ((AvailableWaterY26 * 10 + AvailableWaterY25 * 9 + AvailableWaterY24 * 8 + AvailableWaterY23 * 7 + AvailableWaterY22 * 6 + AvailableWaterY21 * 5 + AvailableWaterY20 * 4 + AvailableWaterY19 * 3 + AvailableWaterY18 * 2 + AvailableWaterY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 26) and ticks <= 365 * (F22FirstWithLand + 27) + [ + set AvailableWaterY27 Landed_Year + set AverageAvailableWater ((AvailableWaterY27 * 10 + AvailableWaterY26 * 9 + AvailableWaterY25 * 8 + AvailableWaterY24 * 7 + AvailableWaterY23 * 6 + AvailableWaterY22 * 5 + AvailableWaterY21 * 4 + AvailableWaterY20 * 3 + AvailableWaterY19 * 2 + AvailableWaterY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 27) and ticks <= 365 * (F22FirstWithLand + 28) + [ + set AvailableWaterY28 Landed_Year + set AverageAvailableWater ((AvailableWaterY28 * 10 + AvailableWaterY27 * 9 + AvailableWaterY26 * 8 + AvailableWaterY25 * 7 + AvailableWaterY24 * 6 + AvailableWaterY23 * 5 + AvailableWaterY22 * 4 + AvailableWaterY21 * 3 + AvailableWaterY20 * 2 + AvailableWaterY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 28) and ticks <= 365 * (F22FirstWithLand + 29) + [ + set AvailableWaterY29 Landed_Year + set AverageAvailableWater ((AvailableWaterY29 * 10 + AvailableWaterY28 * 9 + AvailableWaterY27 * 8 + AvailableWaterY26 * 7 + AvailableWaterY25 * 6 + AvailableWaterY24 * 5 + AvailableWaterY23 * 4 + AvailableWaterY22 * 3 + AvailableWaterY21 * 2 + AvailableWaterY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 29) and ticks <= 365 * (F22FirstWithLand + 30) + [ + set AvailableWaterY30 Landed_Year + set AverageAvailableWater ((AvailableWaterY30 * 10 + AvailableWaterY29 * 9 + AvailableWaterY28 * 8 + AvailableWaterY27 * 7 + AvailableWaterY26 * 6 + AvailableWaterY25 * 5 + AvailableWaterY24 * 4 + AvailableWaterY23 * 3 + AvailableWaterY22 * 2 + AvailableWaterY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 30) and ticks <= 365 * (F22FirstWithLand + 31) + [ + set AvailableWaterY31 Landed_Year + set AverageAvailableWater ((AvailableWaterY31 * 10 + AvailableWaterY30 * 9 + AvailableWaterY29 * 8 + AvailableWaterY28 * 7 + AvailableWaterY27 * 6 + AvailableWaterY26 * 5 + AvailableWaterY25 * 4 + AvailableWaterY24 * 3 + AvailableWaterY23 * 2 + AvailableWaterY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 31) and ticks <= 365 * (F22FirstWithLand + 32) + [ + set AvailableWaterY32 Landed_Year + set AverageAvailableWater ((AvailableWaterY32 * 10 + AvailableWaterY31 * 9 + AvailableWaterY30 * 8 + AvailableWaterY29 * 7 + AvailableWaterY28 * 6 + AvailableWaterY27 * 5 + AvailableWaterY26 * 4 + AvailableWaterY25 * 3 + AvailableWaterY24 * 2 + AvailableWaterY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 32) and ticks <= 365 * (F22FirstWithLand + 33) + [ + set AvailableWaterY33 Landed_Year + set AverageAvailableWater ((AvailableWaterY33 * 10 + AvailableWaterY32 * 9 + AvailableWaterY31 * 81 + AvailableWaterY30 * 7 + AvailableWaterY29 * 6 + AvailableWaterY28 * 5 + AvailableWaterY27 * 4 + AvailableWaterY26 * 3 + AvailableWaterY25 * 2 + AvailableWaterY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 33) and ticks <= 365 * (F22FirstWithLand + 34) + [ + set AvailableWaterY34 Landed_Year + set AverageAvailableWater ((AvailableWaterY34 * 10 + AvailableWaterY33 * 9 + AvailableWaterY32 * 8 + AvailableWaterY31 * 7 + AvailableWaterY30 * 6 + AvailableWaterY29 * 5 + AvailableWaterY28 * 4 + AvailableWaterY27 * 3 + AvailableWaterY26 * 2 + AvailableWaterY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 34) and ticks <= 365 * (F22FirstWithLand + 35) + [ + set AvailableWaterY35 Landed_Year + set AverageAvailableWater ((AvailableWaterY35 * 10 + AvailableWaterY34 * 9 + AvailableWaterY33 * 8 + AvailableWaterY32 * 7 + AvailableWaterY31 * 6 + AvailableWaterY30 * 5 + AvailableWaterY29 * 4 + AvailableWaterY28 * 3 + AvailableWaterY27 * 2 + AvailableWaterY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 35) and ticks <= 365 * (F22FirstWithLand + 36) + [ + set AvailableWaterY36 Landed_Year + set AverageAvailableWater ((AvailableWaterY36 * 10 + AvailableWaterY35 * 9 + AvailableWaterY34 * 8 + AvailableWaterY33 * 7 + AvailableWaterY32 * 6 + AvailableWaterY31 * 5 + AvailableWaterY30 * 4 + AvailableWaterY29 * 3 + AvailableWaterY28 * 2 + AvailableWaterY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 36) and ticks <= 365 * (F22FirstWithLand + 37) + [ + set AvailableWaterY37 Landed_Year + set AverageAvailableWater ((AvailableWaterY37 * 10 + AvailableWaterY36 * 9 + AvailableWaterY35 * 8 + AvailableWaterY34 * 7 + AvailableWaterY33 * 6 + AvailableWaterY32 * 5 + AvailableWaterY31 * 4 + AvailableWaterY30 * 3 + AvailableWaterY29 * 2 + AvailableWaterY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 37) and ticks <= 365 * (F22FirstWithLand + 38) + [ + set AvailableWaterY38 Landed_Year + set AverageAvailableWater ((AvailableWaterY38 * 10 + AvailableWaterY37 * 9 + AvailableWaterY36 * 8 + AvailableWaterY35 * 7 + AvailableWaterY34 * 6 + AvailableWaterY33 * 5 + AvailableWaterY32 * 4 + AvailableWaterY31 * 3 + AvailableWaterY30 * 2 + AvailableWaterY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 38) and ticks <= 365 * (F22FirstWithLand + 39) + [ + set AvailableWaterY39 Landed_Year + set AverageAvailableWater ((AvailableWaterY39 * 10 + AvailableWaterY38 * 9 + AvailableWaterY37 * 8 + AvailableWaterY36 * 7 + AvailableWaterY35 * 6 + AvailableWaterY34 * 5 + AvailableWaterY33 * 4 + AvailableWaterY32 * 3 + AvailableWaterY31 * 2 + AvailableWaterY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 39) and ticks <= 365 * (F22FirstWithLand + 40) + [ + set AvailableWaterY40 Landed_Year + set AverageAvailableWater ((AvailableWaterY40 * 10 + AvailableWaterY39 * 9 + AvailableWaterY38 * 8 + AvailableWaterY37 * 7 + AvailableWaterY36 * 6 + AvailableWaterY35 * 5 + AvailableWaterY34 * 4 + AvailableWaterY33 * 3 + AvailableWaterY32 * 2 + AvailableWaterY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 40) and ticks <= 365 * (F22FirstWithLand + 41) + [ + set AvailableWaterY41 Landed_Year + set AverageAvailableWater ((AvailableWaterY41 * 10 + AvailableWaterY40 * 9 + AvailableWaterY39 * 8 + AvailableWaterY38 * 7 + AvailableWaterY37 * 6 + AvailableWaterY36 * 5 + AvailableWaterY35 * 4 + AvailableWaterY34 * 3 + AvailableWaterY33 * 2 + AvailableWaterY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 41) and ticks <= 365 * (F22FirstWithLand + 42) + [ + set AvailableWaterY42 Landed_Year + set AverageAvailableWater ((AvailableWaterY42 * 10 + AvailableWaterY41 * 9 + AvailableWaterY40 * 8 + AvailableWaterY39 * 7 + AvailableWaterY38 * 6 + AvailableWaterY37 * 5 + AvailableWaterY36 * 4 + AvailableWaterY35 * 3 + AvailableWaterY34 * 2 + AvailableWaterY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 42) and ticks <= 365 * (F22FirstWithLand + 43) + [ + set AvailableWaterY43 Landed_Year + set AverageAvailableWater ((AvailableWaterY43 * 10 + AvailableWaterY42 * 9 + AvailableWaterY41 * 8 + AvailableWaterY40 * 7 + AvailableWaterY39 * 6 + AvailableWaterY38 * 5 + AvailableWaterY37 * 4 + AvailableWaterY36 * 3 + AvailableWaterY35 * 2 + AvailableWaterY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 43) and ticks <= 365 * (F22FirstWithLand + 44) + [ + set AvailableWaterY44 Landed_Year + set AverageAvailableWater ((AvailableWaterY44 * 10 + AvailableWaterY43 * 9 + AvailableWaterY42 * 8 + AvailableWaterY41 * 7 + AvailableWaterY40 * 6 + AvailableWaterY39 * 5 + AvailableWaterY38 * 4 + AvailableWaterY37 * 3 + AvailableWaterY36 * 2 + AvailableWaterY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 44) and ticks <= 365 * (F22FirstWithLand + 45) + [ + set AvailableWaterY45 Landed_Year + set AverageAvailableWater ((AvailableWaterY45 * 10 + AvailableWaterY44 * 9 + AvailableWaterY43 * 8 + AvailableWaterY42 * 7 + AvailableWaterY41 * 6 + AvailableWaterY40 * 5 + AvailableWaterY39 * 4 + AvailableWaterY38 * 3 + AvailableWaterY37 * 2 + AvailableWaterY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 45) and ticks <= 365 * (F22FirstWithLand + 46) + [ + set AvailableWaterY46 Landed_Year + set AverageAvailableWater ((AvailableWaterY46 * 10 + AvailableWaterY45 * 9 + AvailableWaterY44 * 8 + AvailableWaterY43 * 7 + AvailableWaterY42 * 6 + AvailableWaterY41 * 5 + AvailableWaterY40 * 4 + AvailableWaterY39 * 3 + AvailableWaterY38 * 2 + AvailableWaterY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 46) and ticks <= 365 * (F22FirstWithLand + 47) + [ + set AvailableWaterY47 Landed_Year + set AverageAvailableWater ((AvailableWaterY47 * 10 + AvailableWaterY46 * 9 + AvailableWaterY45 * 8 + AvailableWaterY44 * 7 + AvailableWaterY43 * 6 + AvailableWaterY42 * 5 + AvailableWaterY41 * 4 + AvailableWaterY40 * 3 + AvailableWaterY39 * 2 + AvailableWaterY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 47) and ticks <= 365 * (F22FirstWithLand + 48) + [ + set AvailableWaterY48 Landed_Year + set AverageAvailableWater ((AvailableWaterY48 * 10 + AvailableWaterY47 * 9 + AvailableWaterY46 * 8 + AvailableWaterY45 * 7 + AvailableWaterY44 * 6 + AvailableWaterY43 * 5 + AvailableWaterY42 * 4 + AvailableWaterY41 * 3 + AvailableWaterY40 * 2 + AvailableWaterY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 48) and ticks <= 365 * (F22FirstWithLand + 49) + [ + set AvailableWaterY49 Landed_Year + set AverageAvailableWater ((AvailableWaterY49 * 10 + AvailableWaterY48 * 9 + AvailableWaterY47 * 8 + AvailableWaterY46 * 7 + AvailableWaterY45 * 6 + AvailableWaterY44 * 5 + AvailableWaterY43 * 4 + AvailableWaterY42 * 3 + AvailableWaterY41 * 2 + AvailableWaterY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 49) and ticks <= 365 * (F22FirstWithLand + 50) + [ + set AvailableWaterY50 Landed_Year + set AverageAvailableWater ((AvailableWaterY50 * 10 + AvailableWaterY49 * 9 + AvailableWaterY48 * 8 + AvailableWaterY47 * 7 + AvailableWaterY46 * 6 + AvailableWaterY45 * 5 + AvailableWaterY44 * 4 + AvailableWaterY43 * 3 + AvailableWaterY42 * 2 + AvailableWaterY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 50) and ticks <= 365 * (F22FirstWithLand + 51) + [ + set AvailableWaterY51 Landed_Year + set AverageAvailableWater ((AvailableWaterY51 * 10 + AvailableWaterY50 * 9 + AvailableWaterY49 * 8 + AvailableWaterY48 * 7 + AvailableWaterY47 * 6 + AvailableWaterY46 * 5 + AvailableWaterY45 * 4 + AvailableWaterY44 * 3 + AvailableWaterY43 * 2 + AvailableWaterY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 51) and ticks <= 365 * (F22FirstWithLand + 52) + [ + set AvailableWaterY52 Landed_Year + set AverageAvailableWater ((AvailableWaterY52 * 10 + AvailableWaterY51 * 9 + AvailableWaterY50 * 8 + AvailableWaterY49 * 7 + AvailableWaterY48 * 6 + AvailableWaterY47 * 5 + AvailableWaterY46 * 4 + AvailableWaterY45 * 3 + AvailableWaterY44 * 2 + AvailableWaterY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 52) and ticks <= 365 * (F22FirstWithLand + 53) + [ + set AvailableWaterY53 Landed_Year + set AverageAvailableWater ((AvailableWaterY53 * 10 + AvailableWaterY52 * 9 + AvailableWaterY51 * 8 + AvailableWaterY50 * 7 + AvailableWaterY49 * 6 + AvailableWaterY48 * 5 + AvailableWaterY47 * 4 + AvailableWaterY46 * 3 + AvailableWaterY45 * 2 + AvailableWaterY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 53) and ticks <= 365 * (F22FirstWithLand + 54) + [ + set AvailableWaterY54 Landed_Year + set AverageAvailableWater ((AvailableWaterY54 * 10 + AvailableWaterY53 * 9 + AvailableWaterY52 * 8 + AvailableWaterY51 * 7 + AvailableWaterY50 * 6 + AvailableWaterY49 * 5 + AvailableWaterY48 * 4 + AvailableWaterY47 * 3 + AvailableWaterY46 * 2 + AvailableWaterY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 54) and ticks <= 365 * (F22FirstWithLand + 55) + [ + set AvailableWaterY55 Landed_Year + set AverageAvailableWater ((AvailableWaterY55 * 10 + AvailableWaterY54 * 9 + AvailableWaterY53 * 8 + AvailableWaterY52 * 7 + AvailableWaterY51 * 6 + AvailableWaterY50 * 5 + AvailableWaterY49 * 4 + AvailableWaterY48 * 3 + AvailableWaterY47 * 2 + AvailableWaterY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 55) and ticks <= 365 * (F22FirstWithLand + 56) + [ + set AvailableWaterY56 Landed_Year + set AverageAvailableWater ((AvailableWaterY56 * 10 + AvailableWaterY55 * 9 + AvailableWaterY54 * 8 + AvailableWaterY53 * 7 + AvailableWaterY52 * 6 + AvailableWaterY51 * 5 + AvailableWaterY50 * 4 + AvailableWaterY49 * 3 + AvailableWaterY48 * 2 + AvailableWaterY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 56) and ticks <= 365 * (F22FirstWithLand + 57) + [ + set AvailableWaterY57 Landed_Year + set AverageAvailableWater ((AvailableWaterY57 * 10 + AvailableWaterY56 * 9 + AvailableWaterY55 * 8 + AvailableWaterY54 * 7 + AvailableWaterY53 * 6 + AvailableWaterY52 * 5 + AvailableWaterY51 * 4 + AvailableWaterY50 * 3 + AvailableWaterY49 * 2 + AvailableWaterY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 57) and ticks <= 365 * (F22FirstWithLand + 58) + [ + set AvailableWaterY58 Landed_Year + set AverageAvailableWater ((AvailableWaterY58 * 10 + AvailableWaterY57 * 9 + AvailableWaterY56 * 8 + AvailableWaterY55 * 7 + AvailableWaterY54 * 6 + AvailableWaterY53 * 5 + AvailableWaterY52 * 4 + AvailableWaterY51 * 3 + AvailableWaterY50 * 2 + AvailableWaterY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 58) and ticks <= 365 * (F22FirstWithLand + 59) + [ + set AvailableWaterY59 Landed_Year + set AverageAvailableWater ((AvailableWaterY59 * 10 + AvailableWaterY58 * 9 + AvailableWaterY57 * 8 + AvailableWaterY56 * 7 + AvailableWaterY55 * 6 + AvailableWaterY54 * 5 + AvailableWaterY53 * 4 + AvailableWaterY52 * 3 + AvailableWaterY51 * 2 + AvailableWaterY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 59) and ticks <= 365 * (F22FirstWithLand + 60) + [ + set AvailableWaterY60 Landed_Year + set AverageAvailableWater ((AvailableWaterY60 * 10 + AvailableWaterY59 * 9 + AvailableWaterY58 * 8 + AvailableWaterY57 * 7 + AvailableWaterY56 * 6 + AvailableWaterY55 * 5 + AvailableWaterY54 * 4 + AvailableWaterY53 * 3 + AvailableWaterY52 * 2 + AvailableWaterY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 60) and ticks <= 365 * (F22FirstWithLand + 61) + [ + set AvailableWaterY61 Landed_Year + set AverageAvailableWater ((AvailableWaterY61 * 10 + AvailableWaterY60 * 9 + AvailableWaterY59 * 8 + AvailableWaterY58 * 7 + AvailableWaterY57 * 6 + AvailableWaterY56 * 5 + AvailableWaterY55 * 4 + AvailableWaterY54 * 3 + AvailableWaterY53 * 2 + AvailableWaterY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 61) and ticks <= 365 * (F22FirstWithLand + 62) + [ + set AvailableWaterY62 Landed_Year + set AverageAvailableWater ((AvailableWaterY62 * 10 + AvailableWaterY61 * 9 + AvailableWaterY60 * 8 + AvailableWaterY59 * 7 + AvailableWaterY58 * 6 + AvailableWaterY57 * 5 + AvailableWaterY56 * 4 + AvailableWaterY55 * 3 + AvailableWaterY54 * 2 + AvailableWaterY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 62) and ticks <= 365 * (F22FirstWithLand + 63) + [ + set AvailableWaterY63 Landed_Year + set AverageAvailableWater ((AvailableWaterY63 * 10 + AvailableWaterY62 * 9 + AvailableWaterY61 * 8 + AvailableWaterY60 * 7 + AvailableWaterY59 * 6 + AvailableWaterY58 * 5 + AvailableWaterY57 * 4 + AvailableWaterY56 * 3 + AvailableWaterY55 * 2 + AvailableWaterY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 63) and ticks <= 365 * (F22FirstWithLand + 64) + [ + set AvailableWaterY64 Landed_Year + set AverageAvailableWater ((AvailableWaterY64 * 10 + AvailableWaterY63 * 9 + AvailableWaterY62 * 8 + AvailableWaterY61 * 7 + AvailableWaterY60 * 6 + AvailableWaterY59 * 5 + AvailableWaterY58 * 4 + AvailableWaterY57 * 3 + AvailableWaterY56 * 2 + AvailableWaterY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 64) and ticks <= 365 * (F22FirstWithLand + 65) + [ + set AvailableWaterY65 Landed_Year + set AverageAvailableWater ((AvailableWaterY65 * 10 + AvailableWaterY64 * 9 + AvailableWaterY63 * 8 + AvailableWaterY62 * 7 + AvailableWaterY61 * 6 + AvailableWaterY60 * 5 + AvailableWaterY59 * 4 + AvailableWaterY58 * 3 + AvailableWaterY57 * 2 + AvailableWaterY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 65) and ticks <= 365 * (F22FirstWithLand + 66) + [ + set AvailableWaterY66 Landed_Year + set AverageAvailableWater ((AvailableWaterY66 * 10 + AvailableWaterY65 * 9 + AvailableWaterY64 * 8 + AvailableWaterY63 * 7 + AvailableWaterY62 * 6 + AvailableWaterY61 * 5 + AvailableWaterY60 * 4 + AvailableWaterY59 * 3 + AvailableWaterY58 * 2 + AvailableWaterY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 66) and ticks <= 365 * (F22FirstWithLand + 67) + [ + set AvailableWaterY67 Landed_Year + set AverageAvailableWater ((AvailableWaterY67 * 10 + AvailableWaterY66 * 9 + AvailableWaterY65 * 8 + AvailableWaterY64 * 7 + AvailableWaterY63 * 6 + AvailableWaterY62 * 5 + AvailableWaterY61 * 4 + AvailableWaterY60 * 3 + AvailableWaterY59 * 2 + AvailableWaterY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 67) and ticks <= 365 * (F22FirstWithLand + 68) + [ + set AvailableWaterY68 Landed_Year + set AverageAvailableWater ((AvailableWaterY68 * 10 + AvailableWaterY67 * 9 + AvailableWaterY66 * 8 + AvailableWaterY65 * 7 + AvailableWaterY64 * 6 + AvailableWaterY63 * 5 + AvailableWaterY62 * 4 + AvailableWaterY61 * 3 + AvailableWaterY60 * 2 + AvailableWaterY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 68) and ticks <= 365 * (F22FirstWithLand + 69) + [ + set AvailableWaterY69 Landed_Year + set AverageAvailableWater ((AvailableWaterY69 * 10 + AvailableWaterY68 * 9 + AvailableWaterY67 * 8 + AvailableWaterY66 * 7 + AvailableWaterY65 * 6 + AvailableWaterY64 * 5 + AvailableWaterY63 * 4 + AvailableWaterY62 * 3 + AvailableWaterY61 * 2 + AvailableWaterY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 69) and ticks <= 365 * (F22FirstWithLand + 70) + [ + set AvailableWaterY70 Landed_Year + set AverageAvailableWater ((AvailableWaterY70 * 10 + AvailableWaterY69 * 9 + AvailableWaterY68 * 8 + AvailableWaterY67 * 7 + AvailableWaterY66 * 6 + AvailableWaterY65 * 5 + AvailableWaterY64 * 4 + AvailableWaterY63 * 3 + AvailableWaterY62 * 2 + AvailableWaterY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 70) and ticks <= 365 * (F22FirstWithLand + 71) + [ + set AvailableWaterY71 Landed_Year + set AverageAvailableWater ((AvailableWaterY71 * 10 + AvailableWaterY70 * 9 + AvailableWaterY69 * 8 + AvailableWaterY68 * 7 + AvailableWaterY67 * 6 + AvailableWaterY66 * 5 + AvailableWaterY65 * 4 + AvailableWaterY64 * 3 + AvailableWaterY63 * 2 + AvailableWaterY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 71) and ticks <= 365 * (F22FirstWithLand + 72) + [ + set AvailableWaterY72 Landed_Year + set AverageAvailableWater ((AvailableWaterY72 * 10 + AvailableWaterY71 * 9 + AvailableWaterY70 * 8 + AvailableWaterY69 * 7 + AvailableWaterY68 * 6 + AvailableWaterY67 * 5 + AvailableWaterY66 * 4 + AvailableWaterY65 * 3 + AvailableWaterY64 * 2 + AvailableWaterY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 72) and ticks <= 365 * (F22FirstWithLand + 73) + [ + set AvailableWaterY73 Landed_Year + set AverageAvailableWater ((AvailableWaterY73 * 10 + AvailableWaterY72 * 9 + AvailableWaterY71 * 8 + AvailableWaterY70 * 7 + AvailableWaterY69 * 6 + AvailableWaterY68 * 5 + AvailableWaterY67 * 4 + AvailableWaterY66 * 3 + AvailableWaterY65 * 2 + AvailableWaterY64 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 73) and ticks <= 365 * (F22FirstWithLand + 74) + [ + set AvailableWaterY74 Landed_Year + set AverageAvailableWater ((AvailableWaterY74 * 10 + AvailableWaterY73 * 9 + AvailableWaterY72 * 8 + AvailableWaterY71 * 7 + AvailableWaterY70 * 6 + AvailableWaterY69 * 5 + AvailableWaterY68 * 4 + AvailableWaterY67 * 3 + AvailableWaterY66 * 2 + AvailableWaterY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 74) and ticks <= 365 * (F22FirstWithLand + 75) + [ + set AvailableWaterY75 Landed_Year + set AverageAvailableWater ((AvailableWaterY75 * 10 + AvailableWaterY74 * 9 + AvailableWaterY73 * 8 + AvailableWaterY72 * 7 + AvailableWaterY71 * 6 + AvailableWaterY70 * 5 + AvailableWaterY69 * 4 + AvailableWaterY68 * 3 + AvailableWaterY67 * 2 + AvailableWaterY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 75) and ticks <= 365 * (F22FirstWithLand + 76) + [ + set AvailableWaterY76 Landed_Year + set AverageAvailableWater ((AvailableWaterY76 * 10 + AvailableWaterY75 * 9 + AvailableWaterY74 * 8 + AvailableWaterY73 * 7 + AvailableWaterY72 * 6 + AvailableWaterY71 * 5 + AvailableWaterY70 * 4 + AvailableWaterY69 * 3 + AvailableWaterY68 * 2 + AvailableWaterY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 76) and ticks <= 365 * (F22FirstWithLand + 77) + [ + set AvailableWaterY77 Landed_Year + set AverageAvailableWater ((AvailableWaterY77 * 10 + AvailableWaterY76 * 9 + AvailableWaterY75 * 8 + AvailableWaterY74 * 7 + AvailableWaterY73 * 6 + AvailableWaterY72 * 5 + AvailableWaterY71 * 4 + AvailableWaterY70 * 3 + AvailableWaterY69 * 2 + AvailableWaterY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 77) and ticks <= 365 * (F22FirstWithLand + 78) + [ + set AvailableWaterY78 Landed_Year + set AverageAvailableWater ((AvailableWaterY78 * 10 + AvailableWaterY77 * 9 + AvailableWaterY76 * 8 + AvailableWaterY75 * 7 + AvailableWaterY74 * 6 + AvailableWaterY73 * 5 + AvailableWaterY72 * 4 + AvailableWaterY71 * 3 + AvailableWaterY70 * 2 + AvailableWaterY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 78) and ticks <= 365 * (F22FirstWithLand + 79) + [ + set AvailableWaterY79 Landed_Year + set AverageAvailableWater ((AvailableWaterY79 * 10 + AvailableWaterY78 * 9 + AvailableWaterY77 * 8 + AvailableWaterY76 * 7 + AvailableWaterY75 * 6 + AvailableWaterY74 * 5 + AvailableWaterY73 * 4 + AvailableWaterY72 * 3 + AvailableWaterY71 * 2 + AvailableWaterY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 79) and ticks <= 365 * (F22FirstWithLand + 80) + [ + set AvailableWaterY80 Landed_Year + set AverageAvailableWater ((AvailableWaterY80 * 10 + AvailableWaterY79 * 9 + AvailableWaterY78 * 8 + AvailableWaterY77 * 7 + AvailableWaterY76 * 6 + AvailableWaterY75 * 5 + AvailableWaterY74 * 4 + AvailableWaterY73 * 3 + AvailableWaterY72 * 2 + AvailableWaterY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 80) and ticks <= 365 * (F22FirstWithLand + 81) + [ + set AvailableWaterY81 Landed_Year + set AverageAvailableWater ((AvailableWaterY81 * 10 + AvailableWaterY80 * 9 + AvailableWaterY79 * 8 + AvailableWaterY78 * 7 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 4 + AvailableWaterY74 * 3 + AvailableWaterY73 * 2 + AvailableWaterY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 81) and ticks <= 365 * (F22FirstWithLand + 82) + [ + set AvailableWaterY82 Landed_Year + set AverageAvailableWater ((AvailableWaterY82 * 10 + AvailableWaterY81 * 9 + AvailableWaterY80 * 8 + AvailableWaterY79 * 7 + AvailableWaterY78 * 6 + AvailableWaterY77 * 5 + AvailableWaterY76 * 4 + AvailableWaterY75 * 3 + AvailableWaterY74 * 2 + AvailableWaterY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 82) and ticks <= 365 * (F22FirstWithLand + 83) + [ + set AvailableWaterY83 Landed_Year + set AverageAvailableWater ((AvailableWaterY83 * 10 + AvailableWaterY82 * 9 + AvailableWaterY81 * 8 + AvailableWaterY80 * 7 + AvailableWaterY79 * 6 + AvailableWaterY78 * 5 + AvailableWaterY77 * 4 + AvailableWaterY76 * 3 + AvailableWaterY75 * 2 + AvailableWaterY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 83) and ticks <= 365 * (F22FirstWithLand + 84) + [ + set AvailableWaterY84 Landed_Year + set AverageAvailableWater ((AvailableWaterY84 * 10 + AvailableWaterY83 * 9 + AvailableWaterY82 * 8 + AvailableWaterY81 * 7 + AvailableWaterY80 * 6 + AvailableWaterY79 * 5 + AvailableWaterY78 * 4 + AvailableWaterY77 * 3 + AvailableWaterY76 * 2 + AvailableWaterY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 84) and ticks <= 365 * (F22FirstWithLand + 85) + [ + set AvailableWaterY85 Landed_Year + set AverageAvailableWater ((AvailableWaterY85 * 10 + AvailableWaterY84 * 9 + AvailableWaterY83 * 8 + AvailableWaterY82 * 7 + AvailableWaterY81 * 6 + AvailableWaterY80 * 5 + AvailableWaterY79 * 4 + AvailableWaterY78 * 3 + AvailableWaterY77 * 2 + AvailableWaterY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 85) and ticks <= 365 * (F22FirstWithLand + 86) + [ + set AvailableWaterY86 Landed_Year + set AverageAvailableWater ((AvailableWaterY86 * 10 + AvailableWaterY85 * 9 + AvailableWaterY84 * 8 + AvailableWaterY83 * 7 + AvailableWaterY82 * 6 + AvailableWaterY81 * 5 + AvailableWaterY80 * 4 + AvailableWaterY79 * 3 + AvailableWaterY78 * 2 + AvailableWaterY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 86) and ticks <= 365 * (F22FirstWithLand + 87) + [ + set AvailableWaterY87 Landed_Year + set AverageAvailableWater ((AvailableWaterY87 * 10 + AvailableWaterY86 * 9 + AvailableWaterY85 * 8 + AvailableWaterY84 * 7 + AvailableWaterY83 * 6 + AvailableWaterY82 * 5 + AvailableWaterY81 * 4 + AvailableWaterY80 * 3 + AvailableWaterY79 * 2 + AvailableWaterY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 87) and ticks <= 365 * (F22FirstWithLand + 88) + [ + set AvailableWaterY88 Landed_Year + set AverageAvailableWater ((AvailableWaterY88 * 10 + AvailableWaterY87 * 9 + AvailableWaterY86 * 8 + AvailableWaterY85 * 7 + AvailableWaterY84 * 6 + AvailableWaterY83 * 5 + AvailableWaterY82 * 4 + AvailableWaterY81 * 3 + AvailableWaterY80 * 2 + AvailableWaterY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 88) and ticks <= 365 * (F22FirstWithLand + 89) + [ + set AvailableWaterY89 Landed_Year + set AverageAvailableWater ((AvailableWaterY89 * 10 + AvailableWaterY88 * 9 + AvailableWaterY87 * 8 + AvailableWaterY86 * 7 + AvailableWaterY85 * 6 + AvailableWaterY84 * 5 + AvailableWaterY83 * 4 + AvailableWaterY82 * 3 + AvailableWaterY81 * 2 + AvailableWaterY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 89) and ticks <= 365 * (F22FirstWithLand + 90) + [ + set AvailableWaterY90 Landed_Year + set AverageAvailableWater ((AvailableWaterY90 * 10 + AvailableWaterY89 * 9 + AvailableWaterY88 * 8 + AvailableWaterY87 * 7 + AvailableWaterY86 * 6 + AvailableWaterY85 * 5 + AvailableWaterY84 * 4 + AvailableWaterY83 * 3 + AvailableWaterY82 * 2 + AvailableWaterY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 90) and ticks <= 365 * (F22FirstWithLand + 91) + [ + set AvailableWaterY91 Landed_Year + set AverageAvailableWater ((AvailableWaterY91 * 10 + AvailableWaterY90 * 9 + AvailableWaterY89 * 8 + AvailableWaterY88 * 7 + AvailableWaterY87 * 6 + AvailableWaterY86 * 5 + AvailableWaterY85 * 4 + AvailableWaterY84 * 3 + AvailableWaterY83 * 2 + AvailableWaterY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 91) and ticks <= 365 * (F22FirstWithLand + 92) + [ + set AvailableWaterY92 Landed_Year + set AverageAvailableWater ((AvailableWaterY92 * 10 + AvailableWaterY91 * 9 + AvailableWaterY90 * 8 + AvailableWaterY89 * 7 + AvailableWaterY88 * 6 + AvailableWaterY87 * 5 + AvailableWaterY86 * 4 + AvailableWaterY85 * 3 + AvailableWaterY84 * 2 + AvailableWaterY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 92) and ticks <= 365 * (F22FirstWithLand + 93) + [ + set AvailableWaterY93 Landed_Year + set AverageAvailableWater ((AvailableWaterY93 * 10 + AvailableWaterY92 * 9 + AvailableWaterY91 * 8 + AvailableWaterY90 * 7 + AvailableWaterY89 * 6 + AvailableWaterY88 * 5 + AvailableWaterY87 * 4 + AvailableWaterY86 * 3 + AvailableWaterY85 * 2 + AvailableWaterY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 93) and ticks <= 365 * (F22FirstWithLand + 94) + [ + set AvailableWaterY94 Landed_Year + set AverageAvailableWater ((AvailableWaterY94 * 10 + AvailableWaterY93 * 9 + AvailableWaterY92 * 8 + AvailableWaterY91 * 7 + AvailableWaterY90 * 6 + AvailableWaterY89 * 5 + AvailableWaterY88 * 4 + AvailableWaterY87 * 3 + AvailableWaterY86 * 2 + AvailableWaterY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 94) and ticks <= 365 * (F22FirstWithLand + 95) + [ + set AvailableWaterY95 Landed_Year + set AverageAvailableWater ((AvailableWaterY95 * 10 + AvailableWaterY94 * 9 + AvailableWaterY93 * 8 + AvailableWaterY92 * 7 + AvailableWaterY91 * 6 + AvailableWaterY90 * 5 + AvailableWaterY89 * 4 + AvailableWaterY88 * 3 + AvailableWaterY87 * 2 + AvailableWaterY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 95) and ticks <= 365 * (F22FirstWithLand + 96) + [ + set AvailableWaterY96 Landed_Year + set AverageAvailableWater ((AvailableWaterY96 * 10 + AvailableWaterY95 * 9 + AvailableWaterY94 * 8 + AvailableWaterY93 * 7 + AvailableWaterY92 * 6 + AvailableWaterY91 * 5 + AvailableWaterY90 * 4 + AvailableWaterY89 * 3 + AvailableWaterY88 * 2 + AvailableWaterY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 96) and ticks <= 365 * (F22FirstWithLand + 97) + [ + set AvailableWaterY97 Landed_Year + set AverageAvailableWater ((AvailableWaterY97 * 10 + AvailableWaterY96 * 9 + AvailableWaterY95 * 8 + AvailableWaterY94 * 7 + AvailableWaterY93 * 6 + AvailableWaterY92 * 5 + AvailableWaterY91 * 4 + AvailableWaterY90 * 3 + AvailableWaterY89 * 2 + AvailableWaterY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 97) and ticks <= 365 * (F22FirstWithLand + 98) + [ + set AvailableWaterY98 Landed_Year + set AverageAvailableWater ((AvailableWaterY98 * 10 + AvailableWaterY97 * 9 + AvailableWaterY96 * 8 + AvailableWaterY95 * 7 + AvailableWaterY94 * 6 + AvailableWaterY93 * 5 + AvailableWaterY92 * 4 + AvailableWaterY91 * 3 + AvailableWaterY90 * 2 + AvailableWaterY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 98) and ticks <= 365 * (F22FirstWithLand + 99) + [ + set AvailableWaterY99 Landed_Year + set AverageAvailableWater ((AvailableWaterY99 * 10 + AvailableWaterY98 * 9 + AvailableWaterY97 * 8 + AvailableWaterY96 * 7 + AvailableWaterY95 * 6 + AvailableWaterY94 * 5 + AvailableWaterY93 * 4 + AvailableWaterY92 * 3 + AvailableWaterY91 * 2 + AvailableWaterY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (F22FirstWithLand + 99) and ticks <= 365 * (F22FirstWithLand + 100) + [ + set AvailableWaterY100 Landed_Year + set AverageAvailableWater ((AvailableWaterY100 * 10 + AvailableWaterY99 * 9 + AvailableWaterY98 * 8 + AvailableWaterY97 * 7 + AvailableWaterY96 * 6 + AvailableWaterY95 * 5 + AvailableWaterY94 * 4 + AvailableWaterY93 * 3 + AvailableWaterY92 * 2 + AvailableWaterY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if HarvestCycle = 0 + ] + ] + ] + ] +end diff --git a/ExpansionEvaluation.nls b/ExpansionEvaluation.nls new file mode 100644 index 0000000..e307e1b --- /dev/null +++ b/ExpansionEvaluation.nls @@ -0,0 +1,3718 @@ + +to ExpansionEvaluation ;; compare the yields of each farmer for canal expansion + ask patches with [LandType = 3] ;; ask storage patch + [ + if year > 5 ;; the earliest first year of continuously good/poor harvest is 5th year + [ +;; start with the good harvest to all farmers + if ContinuouslySameHarvestYearProcedure_1year_1st? = False ;; before the 1st good harvest year + [ +;;1st year + ;;1st year start with good harvest (good1, 1st) + if NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 + ] + ] +;2nd year + if ContinuouslySameHarvestYearProcedure_1year_1st? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_1 (CountDownExpansion1_1 - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if CountDownExpansion1_1 = 0 + [ + ;;2nd year start with good harvest (good2, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_1st? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;;2nd year start with poor harvest (poor1, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_1st? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_1st? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;; 3rd year + if ContinuouslySameHarvestYearProcedure_2years_1st? = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_1 (CountDownExpansion2_1 - 1) + if CountDownExpansion2_1 = 0 + [ + ;;3rd year start with good harvest (good3, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_1st? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;;3rd year start with poor harvest (poor1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_2nd? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_2nd? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_1 (CountDownMovement1_1 - 1) + if CountDownMovement1_1 = 0 + [ + ;; 3rd year start with poor harvest (poor2, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_1st? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 3rd year start with good harvest (good1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_2nd? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_1st? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 3rd year start with good harvest (good1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_2nd? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;; 4th year + if ContinuouslySameHarvestYearProcedure_3years_1st? = True + [ + set ContinuouslySameHarvestYear 3 + set CountDownExpansion3_1 (CountDownExpansion3_1 - 1) + if CountDownExpansion3_1 = 0 + [ + ;; 4th year start with good harvest (good4, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_4years_1st? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 4 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 4th year satrt with poor harvest (poor1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_3rd? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_3rd? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_2nd? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_2 (CountDownMovement1_2 - 1) + if CountDownMovement1_2 = 0 + [ + ;; 4th year satrt with poor harvest (poor2, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_2nd? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 4th year start with good harvest (good1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_3rd? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_2nd? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 4th year start with good harvest (good1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_3rd? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_2nd? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_2 (CountDownExpansion1_2 - 1) + if CountDownExpansion1_2 = 0 + [ + ;; 4th year start with good harvest (good2, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_2nd? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 4th year satrt with poor harvest (poor1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_4th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_4th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_1st? = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_1 (CountDownMovement2_1 - 1) + if CountDownMovement2_1 = 0 + [ + ;; 4th year satrt with poor harvest (poor3, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_1st? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 4th year start with good harvest (good1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_4th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_1st? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 4th year start with good harvest (good1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_4th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;;5th year + if ContinuouslySameHarvestYearProcedure_4years_1st? = True + [ + set ContinuouslySameHarvestYear 4 + set CountDownExpansion4_1 (CountDownExpansion4_1 - 1) + if CountDownExpansion4_1 = 0 + [ + ;; 5th year with good harvest (good5, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_5years_1st? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 5 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_5th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_5th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_3rd? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_3 (CountDownMovement1_3 - 1) + if CountDownMovement1_3 = 0 + [ + ;; 5th year with poor harvest (poor2, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_3rd? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_5th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_3rd? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_5th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_3rd? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_3 (CountDownExpansion1_3 - 1) + if CountDownExpansion1_3 = 0 + [ + ;; 5th year with good harvest (good2, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_3rd? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_6th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_6th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_2nd? = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_2 (CountDownMovement2_2 - 1) + if CountDownMovement2_2 = 0 + [ + ;; 5th year with poor harvest (poor3, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_2nd? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 5th year with good harvest (good1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_6th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_2nd? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 5th year with good harvest (good1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_6th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_2nd? = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_2 (CountDownExpansion2_2 - 1) + if CountDownExpansion2_2 = 0 + [ + ;; 5th year with good harvest (good3, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_2nd? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_7th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_7th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_4th? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_3 (CountDownMovement1_3 - 1) + if CountDownMovement1_3 = 0 + [ + ;; 5th year with poor harvest (poor2, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_4th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_7th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_4th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_7th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_4th? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_4 (CountDownExpansion1_4 - 1) + if CountDownExpansion1_4 = 0 + [ + ;; 5th year with good harvest (good2, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_4th? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_8th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_8th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_3years_1st? = True + [ + set ContinuouslyPoorHarvestYear 3 + set CountDownMovement3_1 (CountDownMovement3_1 - 1) + if CountDownMovement3_1 = 0 + [ + ;; 5th year with poor harvest (poor4, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_1st? True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;; 5th year with good harvest (good1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_8th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_1st? True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;; 5th year with good harvest (good1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_8th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;;6th year + if ContinuouslySameHarvestYearProcedure_5years_1st? = True + [ + set ContinuouslySameHarvestYear 5 + set CountDownExpansion5_1 (CountDownExpansion5_1 - 1) + if CountDownExpansion5_1 = 0 + [ + ;;6th with good harvest (good6, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_6years_1st? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 6 ;; count the 3rd time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_9th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_9th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_5th? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_5 (CountDownMovement1_5 - 1) + if CountDownMovement1_5 = 0 + [ + ;;6th with poor harvest (poor2, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_5th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_9th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_5th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_9th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_5th? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_5 (CountDownExpansion1_5 - 1) + if CountDownExpansion1_5 = 0 + [ + ;;6th with good harvest (good2, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_5th? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_10th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_10th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_3rd? = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_3 (CountDownMovement2_3 - 1) + if CountDownMovement2_3 = 0 + [ + ;;6th with poor harvest (poor3, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_3rd? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;;6th with good harvest (good1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_10th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_3rd? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;;6th with good harvest (good1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_10th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_3rd? = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_3 (CountDownExpansion2_3 - 1) + if CountDownExpansion2_3 = 0 + [ + ;;6th with good harvest (good3, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_3rd? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_11th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_11th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_6th? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_6 (CountDownMovement1_6 - 1) + if CountDownMovement1_6 = 0 + [ + ;;6th with poor harvest (poor2, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_6th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_11th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_6th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_11th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_6th? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_6 (CountDownExpansion1_6 - 1) + if CountDownExpansion1_6 = 0 + [ + ;;6th with good harvest (good2, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_6th? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_12th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_12th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_3years_2nd? = True + [ + set ContinuouslyPoorHarvestYear 3 + set CountDownMovement3_2 (CountDownMovement3_2 - 1) + if CountDownMovement3_2 = 0 + [ + ;;6th with poor harvest (poor4, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_2nd? True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;;6th with good harvest (good1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_12th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_2nd? True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;;6th with good harvest (good1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_12th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_3years_2nd? = True + [ + set ContinuouslySameHarvestYear 3 + set CountDownExpansion3_2 (CountDownExpansion3_2 - 1) + if CountDownExpansion3_2 = 0 + [ + ;;6th with good harvest (good4, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_4years_2nd? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 4 ;; count the 3rd time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_13th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_13th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_7th? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_7 (CountDownMovement1_7 - 1) + if CountDownMovement1_7 = 0 + [ + ;;6th with poor harvest (poor2, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_7th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_13th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_7th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_13th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_7th? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_7 (CountDownExpansion1_7 - 1) + if CountDownExpansion1_7 = 0 + [ + ;;6th with good harvest (good2, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_7th? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_14th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_14th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_4th? = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_4 (CountDownMovement2_4 - 1) + if CountDownMovement2_4 = 0 + [ + ;;6th with poor harvest (poor3, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_4th? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;;6th with good harvest (good1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_14th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_4th? True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;;6th with good harvest (good1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_14th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_4th? = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_4 (CountDownExpansion2_4 - 1) + if CountDownExpansion2_4 = 0 + [ + ;;6th with good harvest (good3, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_4th? True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_15th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_15th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_8th? = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_8 (CountDownMovement1_8 - 1) + if CountDownMovement1_8 = 0 + [ + ;;6th with poor harvest (poor2, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_8th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_15th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_8th? True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;;6th with good harvest (good1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_15th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_8th? = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_8 (CountDownExpansion1_8 - 1) + if CountDownExpansion1_8 = 0 + [ + ;;6th with good harvest (good2, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_8th? True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;;6th with poor harvest (poor1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_16th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_16th? True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_4years_1st? = True + [ + set ContinuouslyPoorHarvestYear 4 + set CountDownMovement4_1 (CountDownMovement4_1 - 1) + if CountDownMovement4_1 = 0 + [ + ;;6th with poor harvest (poor5, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_5years_1st? True + ;set ContinuouslyPoorHarvestYear 5 + ] + [ + ;;6th with good harvest (good1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_16th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_5years_1st? True + ;set ContinuouslyPoorHarvestYear 5 + ] + [ + ;;6th with good harvest (good1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_16th? True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + +;;start with poor harvest + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False ;; before the 1st good harvest year + [ +;;1st year + ;;1st year start with poor harvest (poor1, 1st) + if NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p True ;; the 1st downstream farmers have the poor harvest + ] +; if NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 +; [ +; set ContinuouslyPoorHarvestYearProcedure_1year_1st?p True ;; the 1st downstream farmers have the poor harvest +; set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation +; ] + ] +;;2nd year + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_1p (CountDownMovement1_1p - 1) + if CountDownMovement1_1p = 0 + [ + ;; 2nd year with poor harvest (poor2, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_1st?p True + ] + [ + ;; 2nd year with good harvest (good1, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_1st?p True + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_1st?p True + ] + [ + ;; 2nd year with good harvest (good1, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_1st?p True + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;;3rd year + if ContinuouslySameHarvestYearProcedure_1year_1st?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_1p (CountDownExpansion1_1p - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if CountDownExpansion1_1p = 0 + [ + ;; 3rd year with good harvest (good2, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_1st?p True ;; the 1st time all farmers have the same good harvest + ] + [ + ;; 3rd year with poor harvest (poor1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_2nd?p True + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_2nd?p True + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_1st?p = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_1p (CountDownMovement2_1p - 1) + if CountDownMovement2_1p = 0 + [ + ;; 2nd year with poor harvest (poor3, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_1st?p True + ] + [ + ;; 2nd year with good harvest (good1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_2nd?p True + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_1st?p True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 2nd year with good harvest (good1, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_2nd?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;; 4th year + if ContinuouslySameHarvestYearProcedure_2years_1st?p = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion1_2p (CountDownExpansion1_2p - 1) + if CountDownExpansion1_2p = 0 + [ + ;; 4th year with good harvest (good3, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_1st?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 4th year with poor harvest (poor1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_3rd?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_3rd?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_2nd?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_2p (CountDownMovement1_2p - 1) + if CountDownMovement1_2p = 0 + [ + ;; 4th year with poor harvest (poor2, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_2nd?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 4th year with good harvest (good1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_3rd?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_2nd?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 4th year with good harvest (good1, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_3rd?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_2nd?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_2p (CountDownExpansion1_2p - 1) + if CountDownExpansion1_2p = 0 + [ + ;; 4th year with good harvest (good2, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_2nd?p True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 4th year with poor harvest (poor1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_4th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_4th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_3years_1st?p = True + [ + set ContinuouslyPoorHarvestYear 3 + set CountDownMovement3_1p (CountDownMovement3_1p - 1) + if CountDownMovement3_1p = 0 + [ + ;; 4th year with poor harvest (poor4, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_1st?p True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;; 4th year with good harvest (good1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_4th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_1st?p True + ;set ContinuouslyPoorHarvestYear 4 + ] + [ + ;; 4th year with good harvest (good1, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_4th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;; 5th year + if ContinuouslySameHarvestYearProcedure_3years_1st?p = True + [ + set ContinuouslySameHarvestYear 3 + set CountDownExpansion3_1p (CountDownExpansion3_1p - 1) + if CountDownExpansion3_1p = 0 + [ + ;; 5th year with good harvest (good4, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_4years_1st?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 4 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_5th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_5th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_3rd?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_3p (CountDownMovement1_3p - 1) + if CountDownMovement1_3p = 0 + [ + ;; 5th year with poor harvest (poor2, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_3rd?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_5th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_3rd?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_5th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_3rd?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_3p (CountDownExpansion1_3p - 1) + if CountDownExpansion1_3p = 0 + [ + ;; 5th year with good harvest (good2, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_3rd?p True + ;set ContinuouslySameHarvestYear 2 + ] + [ + ;; 5th year with poor harvest (poor1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_6th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_6th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_2nd?p = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_2p (CountDownMovement2_2p - 1) + if CountDownMovement2_2p = 0 + [ + ;; 5th year with poor harvest (poor3, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_2nd?p True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 5th year with good harvest (good1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_6th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_2nd?p True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 5th year with good harvest (good1, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_6th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_2nd?p = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_2p (CountDownExpansion2_2p - 1) + if CountDownExpansion2_2p = 0 + [ + ;; 5th year with good harvest (good3, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_2nd?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_7th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_7th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_4th?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_3p (CountDownMovement1_3p - 1) + if CountDownMovement1_3p = 0 + [ + ;; 5th year with poor harvest (poor2, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_4th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_7th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_4th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 5th year with good harvest (good1, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_7th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_4th?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_4p (CountDownExpansion1_4p - 1) + if CountDownExpansion1_4p = 0 + [ + ;; 5th year with good harvest (good2, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_4th?p True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 5th year with poor harvest (poor1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_8th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_8th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_4years_1st?p = True + [ + set ContinuouslyPoorHarvestYear 4 + set CountDownMovement4_1p (CountDownMovement4_1p - 1) + if CountDownMovement4_1p = 0 + [ + ;; 5th year with poor harvest (poor5, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_5years_1st?p True + ;set ContinuouslyPoorHarvestYear 5 + ] + [ + ;; 5th year with good harvest (good1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_8th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_5years_1st?p True + ;set ContinuouslyPoorHarvestYear 5 + ] + [ + ;; 5th year with good harvest (good1, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_8th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] +;;6th year + if ContinuouslySameHarvestYearProcedure_4years_1st?p = True + [ + set ContinuouslySameHarvestYear 4 + set CountDownExpansion4_1p (CountDownExpansion4_1p - 1) + if CountDownExpansion4_1p = 0 + [ + ;; 6th year with good harvest (good5, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_5years_1st?p True + ;set ContinuouslySameHarvestYear 5 + ] + [ + ;; 6th year with poor harvest (poor1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_9th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_9th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_5th?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_5p (CountDownMovement1_5p - 1) + if CountDownMovement1_5p = 0 + [ + ;; 6th year with poor harvest (poor2, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_5th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 6th year with good harvest (good1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_9th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_5th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 6th year with good harvest (good1, 9th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_9th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_5th?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_5p (CountDownExpansion1_5p - 1) + if CountDownExpansion1_5p = 0 + [ + ;; 6th year with good harvest (good2, 5th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_5th?p True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 6th year with poor harvest (poor1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_10th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_10th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_3rd?p = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_3p (CountDownMovement2_3p - 1) + if CountDownMovement2_3p = 0 + [ + ;; 6th year with poor harvest (poor3, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_3rd?p True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 6th year with good harvest (good1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_10th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_3rd?p True + ;set ContinuouslyPoorHarvestYear 3 + ] + [ + ;; 6th year with good harvest (good1, 10th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_10th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_3rd?p = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_3p (CountDownExpansion2_3p - 1) + if CountDownExpansion2_3p = 0 + [ + ;; 6th year with good harvest (good3, 3rd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_3rd?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 3 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 6th year with poor harvest (poor1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_11th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_11th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_6th?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_6p (CountDownMovement1_6p - 1) + if CountDownMovement1_6p = 0 + [ + ;; 6th year with poor harvest (poor2, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_6th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 2 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_11th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_6th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 2 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 11th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_11th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_6th?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_6p (CountDownExpansion1_6p - 1) + if CountDownExpansion1_6p = 0 + [ + ;; 6th year with good harvest (good2, 6th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_6th?p True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 6th year with poor harvest (poor1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_12th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_12th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_3years_2nd?p = True + [ + set ContinuouslyPoorHarvestYear 3 + set CountDownMovement3_2p (CountDownMovement3_2p - 1) + if CountDownMovement3_2p = 0 + [ + ;; 6th year with poor harvest (poor4, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_2nd?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 4 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_12th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_4years_2nd?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 4 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 12th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_12th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_3years_2nd?p = True + [ + set ContinuouslySameHarvestYear 3 + set CountDownExpansion3_2p (CountDownExpansion3_2p - 1) + if CountDownExpansion3_2p = 0 + [ + ;; 6th year with good harvest (good4, 2nd) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_4years_2nd?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 4 ;; count the 3rd time of same good harvest situation + ] + [ + ;; 6th year with poor harvest (poor1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_13th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_13th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_7th?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_7p (CountDownMovement1_7p - 1) + if CountDownMovement1_7p = 0 + [ + ;; 6th year with poor harvest (poor2, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_7th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 2 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_13th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_7th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 2 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 13th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_13th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_7th?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_7p (CountDownExpansion1_7p - 1) + if CountDownExpansion1_7p = 0 + [ + ;; 6th year with good harvest (good2, 7th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_7th?p True ;; the 1st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 2 ;; count the 1st time of same good harvest situation + ] + [ + ;; 6th year with poor harvest (poor1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_14th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_14th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 1 ;; count the 1st time of poor harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_2years_4th?p = True + [ + set ContinuouslyPoorHarvestYear 2 + set CountDownMovement2_4p (CountDownMovement2_4p - 1) + if CountDownMovement2_4p = 0 + [ + ;; 6th year with poor harvest (poor3, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_4th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 3 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_14th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_3years_4th?p True ;; the 1st downstream farmers have the poor harvest + ;set ContinuouslyPoorHarvestYear 3 ;; count the 1st time of poor harvest situation + ] + [ + ;; 6th year with good harvest (good1, 14th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_14th?p True ;; the 3st time all farmers have the same good harvest + ;set ContinuouslySameHarvestYear 1 ;; count the 3rd time of same good harvest situation + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_2years_4th?p = True + [ + set ContinuouslySameHarvestYear 2 + set CountDownExpansion2_4p (CountDownExpansion2_4p - 1) + if CountDownExpansion2_4p = 0 + [ + ;; 6th year with good harvest (good3, 4th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_3years_4th?p True + ;set ContinuouslySameHarvestYear 3 + ] + [ + ;; 6th year with poor harvest (poor1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_15th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_15th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_1year_8th?p = True + [ + set ContinuouslyPoorHarvestYear 1 + set CountDownMovement1_8p (CountDownMovement1_8p - 1) + if CountDownMovement1_8p = 0 + [ + ;; 6th year with poor harvest (poor2, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_8th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 6th year with good harvest (good1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_15th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_2years_8th?p True + ;set ContinuouslyPoorHarvestYear 2 + ] + [ + ;; 6th year with good harvest (good1, 15th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_15th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslySameHarvestYearProcedure_1year_8th?p = True + [ + set ContinuouslySameHarvestYear 1 + set CountDownExpansion1_8p (CountDownExpansion1_8p - 1) + if CountDownExpansion1_8p = 0 + [ + ;; 6th year with good harvest (good2, 8th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_2years_8th?p True + ;set ContinuouslySameHarvestYear 2 + ] + [ + ;; 6th year with poor harvest (poor1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_16th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_1year_16th?p True + ;set ContinuouslyPoorHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + if ContinuouslyPoorHarvestYearProcedure_5years_1st?p = True + [ + set ContinuouslyPoorHarvestYear 5 + set CountDownMovement5_1p (CountDownMovement5_1p - 1) + if CountDownMovement5_1p = 0 + [ + ;; 6th year with poor harvest (poor6, 1st) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 < 3 and NumberofHarvestFieldsF9 < 3 and NumberofHarvestFieldsF10 < 3 + [ + set ContinuouslyPoorHarvestYearProcedure_6years_1st?p True + ;set ContinuouslyPoorHarvestYear 6 + ] + [ + ;; 6th year with good harvest (good1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_16th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and one-of DownstreamfarmersHarvestFieldsList = 0 + [ + set ContinuouslyPoorHarvestYearProcedure_6years_1st?p True + ;set ContinuouslyPoorHarvestYear 6 + ] + [ + ;; 6th year with good harvest (good1, 16th) + ifelse NumberofHarvestFieldsF1 = 5 and NumberofHarvestFieldsF2 = 5 and NumberofHarvestFieldsF3 = 5 and NumberofHarvestFieldsF8 >= 3 and NumberofHarvestFieldsF9 >= 3 and NumberofHarvestFieldsF10 >= 3 + [ + set ContinuouslySameHarvestYearProcedure_1year_16th?p True + ;set ContinuouslySameHarvestYear 1 + ] + [ + set ContinuouslySameHarvestYearProcedure_1year_1st? False + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False + if ContinuouslySameHarvestYearProcedure_1year_1st? = False + [ + set ContinuouslySameHarvestYear 0 + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ] + if ContinuouslyPoorHarvestYearProcedure_1year_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) + ] + ] + ] + ] + ] + ] + + +;;canal expansion indicator + if CSHY = ContinuouslySameHarvestYear + [ + SecondaryCanal_Expansion + set ContinuouslySameHarvestYearProcedure_5years_1st? False + ] + if ContinuouslySameHarvestYearProcedure_5years_1st? = False + [ + set ContinuouslySameHarvestYear 0 + ] + + if CPHY = ContinuouslyPoorHarvestYear + [ + SecondaryCanal_Movement + set ContinuouslyPoorHarvestYearProcedure_5years_1st?p False + ] + if ContinuouslyPoorHarvestYearProcedure_5years_1st?p = False + [ + set ContinuouslyPoorHarvestYear 0 + ] + ] +end + diff --git a/ExpansionWithin2ndPrimaryCanal.nls b/ExpansionWithin2ndPrimaryCanal.nls new file mode 100644 index 0000000..92e3e4f --- /dev/null +++ b/ExpansionWithin2ndPrimaryCanal.nls @@ -0,0 +1,1068 @@ +to FarmersExpansionEvaluation_2ndPrimaryCanal ;; evaluate farmers' harvest situation and then decide to expand more farmers along the secondary canal or not + ask patches with [LandType = 3] ;; ask storage patch + [ + ;;there are F17-19 and expand to F20 + if [pcolor] of patch 18 17 = red and [pcolor] of patch 16 17 != red + [ +;;the 1st year + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + if NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F17-19WithGoodHarvestYearsProcedure_1year? = True + [ + set F17-19WithGoodHarvestYears 1 + set F17-19CountDownExpansion_1year (F17-19CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-19CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F17-19WithGoodHarvestYearsProcedure_1year? False + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F17-19WithGoodHarvestYearsProcedure_2years? = True + [ + set F17-19WithGoodHarvestYears 2 + set F17-19CountDownExpansion_2years (F17-19CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-19CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F17-19WithGoodHarvestYearsProcedure_1year? False + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_2years? False + if F17-19WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F17-19WithGoodHarvestYearsProcedure_3years? = True + [ + set F17-19WithGoodHarvestYears 3 + set F17-19CountDownExpansion_3years (F17-19CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-19CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F17-19WithGoodHarvestYearsProcedure_1year? False + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_2years? False + if F17-19WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_3years? False + if F17-19WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F17-19WithGoodHarvestYearsProcedure_4years? = True + [ + set F17-19WithGoodHarvestYears 4 + set F17-19CountDownExpansion_4years (F17-19CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-19CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F17-19WithGoodHarvestYearsProcedure_1year? False + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_2years? False + if F17-19WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_3years? False + if F17-19WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_4years? False + if F17-19WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F17-19WithGoodHarvestYearsProcedure_5years? = True + [ + set F17-19WithGoodHarvestYears 5 + set F17-19CountDownExpansion_5years (F17-19CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-19CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 >= 3 and NumberofHarvestFieldsF19 >= 3 + [ + set F17-19WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F17-19WithGoodHarvestYearsProcedure_1year? False + if F17-19WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_2years? False + if F17-19WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_3years? False + if F17-19WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_4years? False + if F17-19WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-19WithGoodHarvestYearsProcedure_5years? False + if F17-19WithGoodHarvestYearsProcedure_5years? = False + [ + set F17-19WithGoodHarvestYears 0 + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F17-19WithGoodHarvestYears = 5 + [ + The2ndPrimaryCanal_F20Expansion + ] + ] + ;;there are F17-20 and expand to F21 + if [pcolor] of patch 16 17 = red and [pcolor] of patch 14 17 != red + [ + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ +;;the 1st year + if NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F17-20WithGoodHarvestYearsProcedure_1year? = True + [ + set F17-20WithGoodHarvestYears 1 + set F17-20CountDownExpansion_1year (F17-20CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-20CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F17-20WithGoodHarvestYearsProcedure_1year? False + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F17-20WithGoodHarvestYearsProcedure_2years? = True + [ + set F17-20WithGoodHarvestYears 2 + set F17-20CountDownExpansion_2years (F17-20CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-20CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F17-20WithGoodHarvestYearsProcedure_1year? False + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_2years? False + if F17-20WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F17-20WithGoodHarvestYearsProcedure_3years? = True + [ + set F17-20WithGoodHarvestYears 3 + set F17-20CountDownExpansion_3years (F17-20CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-20CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F17-20WithGoodHarvestYearsProcedure_1year? False + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_2years? False + if F17-20WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_3years? False + if F17-20WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F17-20WithGoodHarvestYearsProcedure_4years? = True + [ + set F17-20WithGoodHarvestYears 4 + set F17-20CountDownExpansion_4years (F17-20CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-20CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F17-20WithGoodHarvestYearsProcedure_1year? False + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_2years? False + if F17-20WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_3years? False + if F17-20WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_4years? False + if F17-20WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F17-20WithGoodHarvestYearsProcedure_5years? = True + [ + set F17-20WithGoodHarvestYears 5 + set F17-20CountDownExpansion_5years (F17-20CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-20CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 + [ + set F17-20WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F17-20WithGoodHarvestYearsProcedure_1year? False + if F17-20WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_2years? False + if F17-20WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_3years? False + if F17-20WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_4years? False + if F17-20WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-20WithGoodHarvestYearsProcedure_5years? False + if F17-20WithGoodHarvestYearsProcedure_5years? = False + [ + set F17-20WithGoodHarvestYears 0 + set F17-20CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F17-20WithGoodHarvestYears = 5 + [ + The2ndPrimaryCanal_F21Expansion + ] + ] + ;;there are F17-21 and expand to F22 + if [pcolor] of patch 14 17 = red and [pcolor] of patch 12 17 != red + [ + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ +;;the 1st year + if NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 and NumberofHarvestFieldsF21 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F17-21WithGoodHarvestYearsProcedure_1year? = True + [ + set F17-21WithGoodHarvestYears 1 + set F17-21CountDownExpansion_1year (F17-21CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-21CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F17-21WithGoodHarvestYearsProcedure_1year? False + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F17-21WithGoodHarvestYearsProcedure_2years? = True + [ + set F17-21WithGoodHarvestYears 2 + set F17-21CountDownExpansion_2years (F17-21CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-21CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 and NumberofHarvestFieldsF21 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F17-21WithGoodHarvestYearsProcedure_1year? False + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_2years? False + if F17-21WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F17-21WithGoodHarvestYearsProcedure_3years? = True + [ + set F17-21WithGoodHarvestYears 3 + set F17-21CountDownExpansion_3years (F17-21CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-21CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 and NumberofHarvestFieldsF21 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F17-21WithGoodHarvestYearsProcedure_1year? False + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_2years? False + if F17-21WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_3years? False + if F17-21WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F17-21WithGoodHarvestYearsProcedure_4years? = True + [ + set F17-21WithGoodHarvestYears 4 + set F17-21CountDownExpansion_4years (F17-21CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-21CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 and NumberofHarvestFieldsF21 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F17-21WithGoodHarvestYearsProcedure_1year? False + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_2years? False + if F17-21WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_3years? False + if F17-21WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_4years? False + if F17-21WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F17-21WithGoodHarvestYearsProcedure_5years? = True + [ + set F17-21WithGoodHarvestYears 5 + set F17-21CountDownExpansion_5years (F17-21CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F17-21CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF17 = 5 and NumberofHarvestFieldsF18 = 5 and NumberofHarvestFieldsF19 >= 3 and NumberofHarvestFieldsF20 >= 3 and NumberofHarvestFieldsF21 >= 3 + [ + set F17-21WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F17-21WithGoodHarvestYearsProcedure_1year? False + if F17-21WithGoodHarvestYearsProcedure_1year? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_2years? False + if F17-21WithGoodHarvestYearsProcedure_2years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_3years? False + if F17-21WithGoodHarvestYearsProcedure_3years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_4years? False + if F17-21WithGoodHarvestYearsProcedure_4years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F17-21WithGoodHarvestYearsProcedure_5years? False + if F17-21WithGoodHarvestYearsProcedure_5years? = False + [ + set F17-21WithGoodHarvestYears 0 + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F17-21WithGoodHarvestYears = 5 + [ + The2ndPrimaryCanal_F22Expansion + set F17-21WithGoodHarvestYearsProcedure_5years? False + ] + if F17-21WithGoodHarvestYearsProcedure_5years? = False + [ + set F17-21WithGoodHarvestYears 0 + ] + ] + ] +end + +to The2ndPrimaryCanal_F20Expansion +;; canals + ask patch 15 17 + [ + set LandType -2 ;; setup 2nd Primary canal patch + set pcolor blue + ] + ask patch 14 17 + [ + set LandType -2 ;; setup 2nd Primary canal patch + set pcolor blue + ] + ask patch 13 17 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates +;F20 + ask patch 16 17 + [ + set LandType -1 + set pcolor red + set ReadyforGCDecisionF17-20 false + ] +;F17 + ask patch 22 17 + [ + set ReadyforGCDecisionF17-20 false + ] +;F18 + ask patch 20 17 + [ + set ReadyforGCDecisionF17-20 false + ] +;F19 + ask patch 18 17 + [ + set ReadyforGCDecisionF17-20 false + ] +;;storage + ;F20 + ask patch 16 16 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF17-20 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-20 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-20 ComparisonTime + set F17-20WithGoodHarvestYearsProcedure_1year? False + set F17-20WithGoodHarvestYearsProcedure_2years? False + set F17-20WithGoodHarvestYearsProcedure_3years? False + set F17-20WithGoodHarvestYearsProcedure_4years? False + set F17-20WithGoodHarvestYearsProcedure_5years? False + set F17-20WithGoodHarvestYearsProcedure_6years? False + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F17 + ask patch 22 18 ;; storage-F11 + [ + set CompareOnceAYear false + set CompareOnceAYearF17-20 true + set CompareEveryTwoYearsF17-20 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-20 ComparisonTime + set F17-20WithGoodHarvestYearsProcedure_1year? False + set F17-20WithGoodHarvestYearsProcedure_2years? False + set F17-20WithGoodHarvestYearsProcedure_3years? False + set F17-20WithGoodHarvestYearsProcedure_4years? False + set F17-20WithGoodHarvestYearsProcedure_5years? False + set F17-20WithGoodHarvestYearsProcedure_6years? False + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F18 + ask patch 20 16 ;; storage-F12 + [ + set CompareOnceAYear false + set CompareOnceAYearF17-20 true + set CompareEveryTwoYearsF17-20 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-20 ComparisonTime + set F17-20WithGoodHarvestYearsProcedure_1year? False + set F17-20WithGoodHarvestYearsProcedure_2years? False + set F17-20WithGoodHarvestYearsProcedure_3years? False + set F17-20WithGoodHarvestYearsProcedure_4years? False + set F17-20WithGoodHarvestYearsProcedure_5years? False + set F17-20WithGoodHarvestYearsProcedure_6years? False + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F19 + ask patch 18 18 ;; storage-F13 + [ + set CompareOnceAYear false + set CompareOnceAYearF17-20 true + set CompareEveryTwoYearsF17-20 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-20 ComparisonTime + set F17-20WithGoodHarvestYearsProcedure_1year? False + set F17-20WithGoodHarvestYearsProcedure_2years? False + set F17-20WithGoodHarvestYearsProcedure_3years? False + set F17-20WithGoodHarvestYearsProcedure_4years? False + set F17-20WithGoodHarvestYearsProcedure_5years? False + set F17-20WithGoodHarvestYearsProcedure_6years? False + set F17-20CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-20CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F20 + ask patch 15 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 15 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 16 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to The2ndPrimaryCanal_F21Expansion +;; canals + ask patch 13 17 + [ + set LandType -2 + set pcolor blue + ] + ask patch 12 17 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates + ;F21 + ask patch 14 17 + [ + set LandType -1 ;; setup secondary canal patch + set pcolor red + set ReadyforGCDecisionF17-21 false + ] + ;F17 + ask patch 22 17 + [ + set ReadyforGCDecisionF17-21 false + ] + ;F18 + ask patch 20 17 + [ + set ReadyforGCDecisionF17-21 false + ] + ;F19 + ask patch 18 17 + [ + set ReadyforGCDecisionF17-21 false + ] + ;F20 + ask patch 16 17 + [ + set ReadyforGCDecisionF17-21 false + ] +;;storage + ;F21 + ask patch 14 18 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF17-20 false + set CompareOnceAYearF17-21 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-21 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-21 ComparisonTime + set F17-21WithGoodHarvestYearsProcedure_1year? False + set F17-21WithGoodHarvestYearsProcedure_2years? False + set F17-21WithGoodHarvestYearsProcedure_3years? False + set F17-21WithGoodHarvestYearsProcedure_4years? False + set F17-21WithGoodHarvestYearsProcedure_5years? False + set F17-21WithGoodHarvestYearsProcedure_6years? False + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F17 + ask patch 22 18 ;; storage-F11 + [ + set CompareOnceAYearF17-20 false + set CompareOnceAYearF17-21 true + set CompareEveryTwoYearsF17-21 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-21 ComparisonTime + set F17-21WithGoodHarvestYearsProcedure_1year? False + set F17-21WithGoodHarvestYearsProcedure_2years? False + set F17-21WithGoodHarvestYearsProcedure_3years? False + set F17-21WithGoodHarvestYearsProcedure_4years? False + set F17-21WithGoodHarvestYearsProcedure_5years? False + set F17-21WithGoodHarvestYearsProcedure_6years? False + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F18 + ask patch 20 16 ;; storage-F12 + [ + set CompareOnceAYearF17-20 false + set CompareOnceAYearF17-21 true + set CompareEveryTwoYearsF17-21 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-21 ComparisonTime + set F17-21WithGoodHarvestYearsProcedure_1year? False + set F17-21WithGoodHarvestYearsProcedure_2years? False + set F17-21WithGoodHarvestYearsProcedure_3years? False + set F17-21WithGoodHarvestYearsProcedure_4years? False + set F17-21WithGoodHarvestYearsProcedure_5years? False + set F17-21WithGoodHarvestYearsProcedure_6years? False + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F19 + ask patch 18 18 ;; storage-F13 + [ + set CompareOnceAYearF17-20 false + set CompareOnceAYearF17-21 true + set CompareEveryTwoYearsF17-21 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-21 ComparisonTime + set F17-21WithGoodHarvestYearsProcedure_1year? False + set F17-21WithGoodHarvestYearsProcedure_2years? False + set F17-21WithGoodHarvestYearsProcedure_3years? False + set F17-21WithGoodHarvestYearsProcedure_4years? False + set F17-21WithGoodHarvestYearsProcedure_5years? False + set F17-21WithGoodHarvestYearsProcedure_6years? False + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F20 + ask patch 16 16 ;; storage-F13 + [ + set CompareOnceAYearF17-20 false + set CompareOnceAYearF17-21 true + set CompareEveryTwoYearsF17-21 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-21 ComparisonTime + set F17-21WithGoodHarvestYearsProcedure_1year? False + set F17-21WithGoodHarvestYearsProcedure_2years? False + set F17-21WithGoodHarvestYearsProcedure_3years? False + set F17-21WithGoodHarvestYearsProcedure_4years? False + set F17-21WithGoodHarvestYearsProcedure_5years? False + set F17-21WithGoodHarvestYearsProcedure_6years? False + set F17-21CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-21CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F21 + ask patch 13 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 13 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 14 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 15 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 15 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to The2ndPrimaryCanal_F22Expansion +;; canals + ask patch 13 17 + [ + set LandType -2 ;; setup 2nd Primary canal patch + set pcolor blue + ] + ask patch 11 17 + [ + set LandType -2 ;; setup 2nd Primary canal patch + set pcolor blue + ] + ask patch 10 17 + [ + set LandType -2 ;; setup 2nd Primary canal patch + set pcolor blue + ] + ask patch 9 17 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates + ;F22 + ask patch 12 17 + [ + set LandType -1 + set pcolor red + set ReadyforGCDecisionF17-22 false + ] + ;F17 + ask patch 22 17 + [ + set ReadyforGCDecisionF17-22 false + ] + ;F18 + ask patch 20 17 + [ + set ReadyforGCDecisionF17-22 false + ] + ;F19 + ask patch 18 17 + [ + set ReadyforGCDecisionF17-22 false + ] + ;F20 + ask patch 16 17 + [ + set ReadyforGCDecisionF17-22 false + ] + ;F21 + ask patch 14 17 + [ + set ReadyforGCDecisionF17-22 false + ] +;;storage + ;F22 + ask patch 12 16 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F17 + ask patch 22 18 ;; storage-F11 + [ + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F18 + ask patch 20 16 ;; storage-F12 + [ + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F19 + ask patch 18 18 ;; storage-F13 + [ + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F20 + ask patch 16 16 ;; storage-F13 + [ + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ;F21 + ask patch 14 18 ;; storage-F13 + [ + set CompareOnceAYearF17-21 false + set CompareOnceAYearF17-22 true + set CompareEveryTwoYearsF17-22 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-22 ComparisonTime + set F17-22WithGoodHarvestYearsProcedure_1year? False + set F17-22WithGoodHarvestYearsProcedure_2years? False + set F17-22WithGoodHarvestYearsProcedure_3years? False + set F17-22WithGoodHarvestYearsProcedure_4years? False + set F17-22WithGoodHarvestYearsProcedure_5years? False + set F17-22WithGoodHarvestYearsProcedure_6years? False + set F17-22CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-22CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F22 + ask patch 11 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 11 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 12 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 13 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 13 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end \ No newline at end of file diff --git a/ExpansionWithinSecondaryCanal.nls b/ExpansionWithinSecondaryCanal.nls new file mode 100644 index 0000000..7b38e11 --- /dev/null +++ b/ExpansionWithinSecondaryCanal.nls @@ -0,0 +1,2676 @@ + +to FarmersExpansionEvaluation_SecondayCanal ;; evaluate farmers' harvest situation and then decide to expand more farmers along the secondary canal or not + ask patches with [LandType = 3] ;; ask storage patch + [ + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;there are F11-13 and expand to F14 + if [pcolor] of patch 38 9 = red + 2 and [pcolor] of patch 38 7 != red + 2 + [ +;;the 1st year + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + if NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F11-13WithGoodHarvestYearsProcedure_1year? = True + [ + set F11-13WithGoodHarvestYears 1 + set F11-13CountDownExpansion_1year (F11-13CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F11-13WithGoodHarvestYearsProcedure_1year? False + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F11-13WithGoodHarvestYearsProcedure_2years? = True + [ + set F11-13WithGoodHarvestYears 2 + set F11-13CountDownExpansion_2years (F11-13CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F11-13WithGoodHarvestYearsProcedure_1year? False + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_2years? False + if F11-13WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F11-13WithGoodHarvestYearsProcedure_3years? = True + [ + set F11-13WithGoodHarvestYears 3 + set F11-13CountDownExpansion_3years (F11-13CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F11-13WithGoodHarvestYearsProcedure_1year? False + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_2years? False + if F11-13WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_3years? False + if F11-13WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F11-13WithGoodHarvestYearsProcedure_4years? = True + [ + set F11-13WithGoodHarvestYears 4 + set F11-13CountDownExpansion_4years (F11-13CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F11-13WithGoodHarvestYearsProcedure_1year? False + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_2years? False + if F11-13WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_3years? False + if F11-13WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_4years? False + if F11-13WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F11-13WithGoodHarvestYearsProcedure_5years? = True + [ + set F11-13WithGoodHarvestYears 5 + set F11-13CountDownExpansion_5years (F11-13CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 >= 3 and NumberofHarvestFieldsF13 >= 3 + [ + set F11-13WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F11-13WithGoodHarvestYearsProcedure_1year? False + if F11-13WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_2years? False + if F11-13WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_3years? False + if F11-13WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_4years? False + if F11-13WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithGoodHarvestYearsProcedure_5years? False + if F11-13WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-13WithGoodHarvestYears 0 + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F11-13WithGoodHarvestYears = 5 + [ + SecondaryCanal_F14Expansion + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;there are F11-14 and expand to F15 + if [pcolor] of patch 38 7 = red + 2 and [pcolor] of patch 38 5 != red + 2 + [ + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ +;;the 1st year + if NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F11-14WithGoodHarvestYearsProcedure_1year? = True + [ + set F11-14WithGoodHarvestYears 1 + set F11-14CountDownExpansion_1year (F11-14CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-14CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F11-14WithGoodHarvestYearsProcedure_1year? False + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F11-14WithGoodHarvestYearsProcedure_2years? = True + [ + set F11-14WithGoodHarvestYears 2 + set F11-14CountDownExpansion_2years (F11-14CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-14CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F11-14WithGoodHarvestYearsProcedure_1year? False + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_2years? False + if F11-14WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F11-14WithGoodHarvestYearsProcedure_3years? = True + [ + set F11-14WithGoodHarvestYears 3 + set F11-14CountDownExpansion_3years (F11-14CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-14CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F11-14WithGoodHarvestYearsProcedure_1year? False + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_2years? False + if F11-14WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_3years? False + if F11-14WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F11-14WithGoodHarvestYearsProcedure_4years? = True + [ + set F11-14WithGoodHarvestYears 4 + set F11-14CountDownExpansion_4years (F11-14CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-14CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F11-14WithGoodHarvestYearsProcedure_1year? False + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_2years? False + if F11-14WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_3years? False + if F11-14WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_4years? False + if F11-14WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F11-14WithGoodHarvestYearsProcedure_5years? = True + [ + set F11-14WithGoodHarvestYears 5 + set F11-14CountDownExpansion_5years (F11-14CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-14CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 + [ + set F11-14WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F11-14WithGoodHarvestYearsProcedure_1year? False + if F11-14WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_2years? False + if F11-14WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_3years? False + if F11-14WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_4years? False + if F11-14WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-14WithGoodHarvestYearsProcedure_5years? False + if F11-14WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-14WithGoodHarvestYears 0 + set F11-14CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F11-14WithGoodHarvestYears = 5 + [ + SecondaryCanal_F15Expansion + ] + ] + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;there are F11-15 and expand to F16 + if [pcolor] of patch 38 5 = red + 2 and [pcolor] of patch 38 3 != red + 2 + [ + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ +;;the 1st year + if NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F11-15WithGoodHarvestYearsProcedure_1year? = True + [ + set F11-15WithGoodHarvestYears 1 + set F11-15CountDownExpansion_1year (F11-15CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-15CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F11-15WithGoodHarvestYearsProcedure_1year? False + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F11-15WithGoodHarvestYearsProcedure_2years? = True + [ + set F11-15WithGoodHarvestYears 2 + set F11-15CountDownExpansion_2years (F11-15CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-15CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F11-15WithGoodHarvestYearsProcedure_1year? False + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_2years? False + if F11-15WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F11-15WithGoodHarvestYearsProcedure_3years? = True + [ + set F11-15WithGoodHarvestYears 3 + set F11-15CountDownExpansion_3years (F11-15CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-15CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F11-15WithGoodHarvestYearsProcedure_1year? False + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_2years? False + if F11-15WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_3years? False + if F11-15WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F11-15WithGoodHarvestYearsProcedure_4years? = True + [ + set F11-15WithGoodHarvestYears 4 + set F11-15CountDownExpansion_4years (F11-15CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-15CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F11-15WithGoodHarvestYearsProcedure_1year? False + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_2years? False + if F11-15WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_3years? False + if F11-15WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_4years? False + if F11-15WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F11-15WithGoodHarvestYearsProcedure_5years? = True + [ + set F11-15WithGoodHarvestYears 5 + set F11-15CountDownExpansion_5years (F11-15CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-15CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 3 and NumberofHarvestFieldsF14 >= 3 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-15WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F11-15WithGoodHarvestYearsProcedure_1year? False + if F11-15WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_2years? False + if F11-15WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_3years? False + if F11-15WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_4years? False + if F11-15WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-15WithGoodHarvestYearsProcedure_5years? False + if F11-15WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-15WithGoodHarvestYears 0 + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F11-15WithGoodHarvestYears = 5 + [ + SecondaryCanal_F16Expansion + ;PrimaryCanal_ExpansionF17-19 + set F11-15WithGoodHarvestYearsProcedure_5years? False + ] + if F11-15WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-15WithGoodHarvestYears 0 + ] + ] + ] +end + +to SecondaryCanal_F14Expansion +;; canals + ask patch 38 6 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 5 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 4 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates +;F14 + ask patch 38 7 + [ + set LandType 7 ;; setup secondary canal patch + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanalF11-14 false + ] +;F11 + ask patch 38 13 + [ + set ReadyforGCDecision_SecondaryCanalF11-14 false + ] +;F12 + ask patch 38 11 + [ + set ReadyforGCDecision_SecondaryCanalF11-14 false + ] +;F13 + ask patch 38 9 + [ + set ReadyforGCDecision_SecondaryCanalF11-14 false + ] +;;storage + ask patch 39 7 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF11-14 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondaryF11-14 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-14 ComparisonTime + set F11-14WithGoodHarvestYearsProcedure_1year? False + set F11-14WithGoodHarvestYearsProcedure_2years? False + set F11-14WithGoodHarvestYearsProcedure_3years? False + set F11-14WithGoodHarvestYearsProcedure_4years? False + set F11-14WithGoodHarvestYearsProcedure_5years? False + set F11-14WithGoodHarvestYearsProcedure_6years? False + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 13 ;; storage-F11 + [ + set CompareOnceAYear false + set CompareOnceAYearF11-14 true + set CompareEveryTwoYearsSecondaryF11-14 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-14 ComparisonTime + set F11-14WithGoodHarvestYearsProcedure_1year? False + set F11-14WithGoodHarvestYearsProcedure_2years? False + set F11-14WithGoodHarvestYearsProcedure_3years? False + set F11-14WithGoodHarvestYearsProcedure_4years? False + set F11-14WithGoodHarvestYearsProcedure_5years? False + set F11-14WithGoodHarvestYearsProcedure_6years? False + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 11 ;; storage-F12 + [ + set CompareOnceAYear false + set CompareOnceAYearF11-14 true + set CompareEveryTwoYearsSecondaryF11-14 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-14 ComparisonTime + set F11-14WithGoodHarvestYearsProcedure_1year? False + set F11-14WithGoodHarvestYearsProcedure_2years? False + set F11-14WithGoodHarvestYearsProcedure_3years? False + set F11-14WithGoodHarvestYearsProcedure_4years? False + set F11-14WithGoodHarvestYearsProcedure_5years? False + set F11-14WithGoodHarvestYearsProcedure_6years? False + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 9 ;; storage-F13 + [ + set CompareOnceAYear false + set CompareOnceAYearF11-14 true + set CompareEveryTwoYearsSecondaryF11-14 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-14 ComparisonTime + set F11-14WithGoodHarvestYearsProcedure_1year? False + set F11-14WithGoodHarvestYearsProcedure_2years? False + set F11-14WithGoodHarvestYearsProcedure_3years? False + set F11-14WithGoodHarvestYearsProcedure_4years? False + set F11-14WithGoodHarvestYearsProcedure_5years? False + set F11-14WithGoodHarvestYearsProcedure_6years? False + set F11-14CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-14CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F14 + ask patch 39 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 7 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 6 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 6 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to SecondaryCanal_F15Expansion +;; canals + ask patch 38 4 + [ + set LandType -3 + set pcolor blue + 2 + ] + ask patch 38 3 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates + ask patch 38 5 + [ + set LandType 7 ;; setup secondary canal patch + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanalF11-15 false + ] + ask patch 38 13 + [ + set ReadyforGCDecision_SecondaryCanalF11-15 false + ] + ask patch 38 11 + [ + set ReadyforGCDecision_SecondaryCanalF11-15 false + ] + ask patch 38 9 + [ + set ReadyforGCDecision_SecondaryCanalF11-15 false + ] + ask patch 38 7 + [ + set ReadyforGCDecision_SecondaryCanalF11-15 false + ] +;;storage + ask patch 37 5 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF11-14 false + set CompareOnceAYearF11-15 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondaryF11-15 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-15 ComparisonTime + set F11-15WithGoodHarvestYearsProcedure_1year? False + set F11-15WithGoodHarvestYearsProcedure_2years? False + set F11-15WithGoodHarvestYearsProcedure_3years? False + set F11-15WithGoodHarvestYearsProcedure_4years? False + set F11-15WithGoodHarvestYearsProcedure_5years? False + set F11-15WithGoodHarvestYearsProcedure_6years? False + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + + ask patch 37 13 ;; storage-F11 + [ + set CompareOnceAYearF11-14 false + set CompareOnceAYearF11-15 true + set CompareEveryTwoYearsSecondaryF11-15 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-15 ComparisonTime + set F11-15WithGoodHarvestYearsProcedure_1year? False + set F11-15WithGoodHarvestYearsProcedure_2years? False + set F11-15WithGoodHarvestYearsProcedure_3years? False + set F11-15WithGoodHarvestYearsProcedure_4years? False + set F11-15WithGoodHarvestYearsProcedure_5years? False + set F11-15WithGoodHarvestYearsProcedure_6years? False + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 11 ;; storage-F12 + [ + set CompareOnceAYearF11-14 false + set CompareOnceAYearF11-15 true + set CompareEveryTwoYearsSecondaryF11-15 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-15 ComparisonTime + set F11-15WithGoodHarvestYearsProcedure_1year? False + set F11-15WithGoodHarvestYearsProcedure_2years? False + set F11-15WithGoodHarvestYearsProcedure_3years? False + set F11-15WithGoodHarvestYearsProcedure_4years? False + set F11-15WithGoodHarvestYearsProcedure_5years? False + set F11-15WithGoodHarvestYearsProcedure_6years? False + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 9 ;; storage-F13 + [ + set CompareOnceAYearF11-14 false + set CompareOnceAYearF11-15 true + set CompareEveryTwoYearsSecondaryF11-15 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-15 ComparisonTime + set F11-15WithGoodHarvestYearsProcedure_1year? False + set F11-15WithGoodHarvestYearsProcedure_2years? False + set F11-15WithGoodHarvestYearsProcedure_3years? False + set F11-15WithGoodHarvestYearsProcedure_4years? False + set F11-15WithGoodHarvestYearsProcedure_5years? False + set F11-15WithGoodHarvestYearsProcedure_6years? False + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 7 ;; storage-F13 + [ + set CompareOnceAYearF11-14 false + set CompareOnceAYearF11-15 true + set CompareEveryTwoYearsSecondaryF11-15 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-15 ComparisonTime + set F11-15WithGoodHarvestYearsProcedure_1year? False + set F11-15WithGoodHarvestYearsProcedure_2years? False + set F11-15WithGoodHarvestYearsProcedure_3years? False + set F11-15WithGoodHarvestYearsProcedure_4years? False + set F11-15WithGoodHarvestYearsProcedure_5years? False + set F11-15WithGoodHarvestYearsProcedure_6years? False + set F11-15CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-15CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F15 + ask patch 37 6 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 6 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 5 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 4 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 4 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to SecondaryCanal_F16Expansion +;; canals + ask patch 38 2 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 1 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 0 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;; gates + ask patch 38 3 + [ + set LandType 7 ;; setup secondary canal patch + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] + ask patch 38 13 + [ + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] + ask patch 38 11 + [ + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] + ask patch 38 9 + [ + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] + ask patch 38 7 + [ + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] + ask patch 38 5 + [ + set ReadyforGCDecision_SecondaryCanalF11-16 false + ] +;;storage + ask patch 39 3 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 13 ;; storage-F11 + [ + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 11 ;; storage-F12 + [ + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 9 ;; storage-F13 + [ + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 7 ;; storage-F13 + [ + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 5 ;; storage-F13 + [ + set CompareOnceAYearF11-15 false + set CompareOnceAYearF11-16 true + set CompareEveryTwoYearsSecondaryF11-16 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondaryF11-16 ComparisonTime + set F11-16WithGoodHarvestYearsProcedure_1year? False + set F11-16WithGoodHarvestYearsProcedure_2years? False + set F11-16WithGoodHarvestYearsProcedure_3years? False + set F11-16WithGoodHarvestYearsProcedure_4years? False + set F11-16WithGoodHarvestYearsProcedure_5years? False + set F11-16WithGoodHarvestYearsProcedure_6years? False + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;farmlands +;; F16 + ask patch 39 4 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 4 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 3 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 2 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 2 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to FarmersHarvestEvaluation_SecondayCanal ;; after farmers' expansion within the secondary canal, for GC variation when there is poor harvest + ask patches with [LandType = 3] ;; ask the storage patch + [ + if pycor < 15 + [ + ;there are farmer11-14 + if [pcolor] of patch 38 7 = red + 2 and [pcolor] of patch 38 5 != red + 2 + [ +;;;;;;there are farmer11, 12, 13, 14: UP-F11 Middle-F12, 13 Down-14 + set MiddlestreamF12-13HarvestFieldsList (list NumberofHarvestFieldsF12 NumberofHarvestFieldsF13) + set MiddlestreamF12-13BarleyYieldList (list BarleyYieldPerYearF12 BarleyYieldPerYearF13) ;; the yields list for middle stream farmers: F12 13 + ifelse CompareOnceAYearF11-14 = true ;;there are farmer11-14 + [ + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 true + set ContinuousPoorYearNumberSecondaryF11-14 0 + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-13BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or one-of MiddlestreamF12-13BarleyYieldList > BarleyYieldPerYearF14 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-14 (ContinuousPoorYearNumberSecondaryF11-14 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 true + set ContinuousPoorYearNumberSecondaryF11-14 0 + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-13BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or one-of MiddlestreamF12-13BarleyYieldList > BarleyYieldPerYearF14 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-14 (ContinuousPoorYearNumberSecondaryF11-14 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF11 > one-of MiddlestreamF12-13HarvestFieldsList or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or one-of MiddlestreamF12-13HarvestFieldsList > NumberofHarvestFieldsF14 + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or + NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF14 or + NumberofHarvestFieldsF13 > NumberofHarvestFieldsF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-14 (ContinuousPoorYearNumberSecondaryF11-14 + 1) ;; record the number of times when poor year appears + ] + ] + [ + if CompareEveryTwoYearsSecondaryF11-14 = true + [ + set ComparisonCountDownSecondaryF11-14 (ComparisonCountDownSecondaryF11-14 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReaction_SecondaryCanalF11-14 + ] + ] + + if ComparisonCountDownSecondaryF11-14 = 0 + [ + set ComparisonCountDownSecondaryF11-14 (ComparisonTime + 1) + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 true + set ContinuousPoorYearNumberSecondaryF11-14 0 + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-13BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or one-of MiddlestreamF12-13BarleyYieldList > BarleyYieldPerYearF14 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 true + set ContinuousPoorYearNumberSecondaryF11-14 0 + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-13BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or one-of MiddlestreamF12-13BarleyYieldList > BarleyYieldPerYearF14 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF11 > one-of MiddlestreamF12-13HarvestFieldsList or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or one-of MiddlestreamF12-13HarvestFieldsList > NumberofHarvestFieldsF14 + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or + NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF14 or + NumberofHarvestFieldsF13 > NumberofHarvestFieldsF14 + [ + set CompareOnceAYearF11-14 false + set CompareEveryTwoYearsSecondaryF11-14 true + ] + if CompareEveryTwoYearsSecondaryF11-14 = true + [ + set ComparisonCountDownSecondaryF11-14 (ComparisonCountDownSecondaryF11-14 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberSecondaryF11-14 (ContinuousPoorYearNumberSecondaryF11-14 + 1) + SystemsReaction_SecondaryCanalF11-14 + ] + ] + ] +;;there are farmer11-15 + if [pcolor] of patch 38 5 = red + 2 and [pcolor] of patch 38 3 != red + 2 + [ + ;;there are farmer11, 12, 13, 14, 15: UP-F11 Middle-F12,13,14 Down-15 + set MiddlestreamF12-14HarvestFieldsList (list NumberofHarvestFieldsF12 NumberofHarvestFieldsF13 NumberofHarvestFieldsF14) + set MiddlestreamF12-14BarleyYieldList (list BarleyYieldPerYearF12 BarleyYieldPerYearF13 BarleyYieldPerYearF14) ;; the yields list for middle stream farmers: F12 13 14 + ifelse CompareOnceAYearF11-15 = true + [ + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 true + set ContinuousPoorYearNumberSecondaryF11-15 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-14BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or one-of MiddlestreamF12-14BarleyYieldList > BarleyYieldPerYearF15 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or BarleyYieldPerYearF12 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 or BarleyYieldPerYearF13 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF14 > BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-15 (ContinuousPoorYearNumberSecondaryF11-15 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 true + set ContinuousPoorYearNumberSecondaryF11-15 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-14BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or one-of MiddlestreamF12-14BarleyYieldList > BarleyYieldPerYearF15 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or BarleyYieldPerYearF12 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 or BarleyYieldPerYearF13 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF14 > BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-15 (ContinuousPoorYearNumberSecondaryF11-15 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF11 > one-of MiddlestreamF12-14HarvestFieldsList or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF15 or one-of MiddlestreamF12-14HarvestFieldsList > NumberofHarvestFieldsF15 + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF13 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF13 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF14 > NumberofHarvestFieldsF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-15 (ContinuousPoorYearNumberSecondaryF11-15 + 1) ;; record the number of times when poor year appears + ] + ] + [ + if CompareEveryTwoYearsSecondaryF11-15 = true + [ + set ComparisonCountDownSecondaryF11-15 (ComparisonCountDownSecondaryF11-15 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReaction_SecondaryCanalF11-15 + ] + ] + if ComparisonCountDownSecondaryF11-15 = 0 + [ + set ComparisonCountDownSecondaryF11-15 (ComparisonTime + 1) + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 true + set ContinuousPoorYearNumberSecondaryF11-15 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-14BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or one-of MiddlestreamF12-14BarleyYieldList > BarleyYieldPerYearF15 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or BarleyYieldPerYearF12 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 or BarleyYieldPerYearF13 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF14 > BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 true + set ContinuousPoorYearNumberSecondaryF11-15 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF11 > one-of MiddlestreamF12-14BarleyYieldList or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or one-of MiddlestreamF12-14BarleyYieldList > BarleyYieldPerYearF15 + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF14 or BarleyYieldPerYearF11 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF12 > BarleyYieldPerYearF14 or BarleyYieldPerYearF12 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF13 > BarleyYieldPerYearF14 or BarleyYieldPerYearF13 > BarleyYieldPerYearF15 or + BarleyYieldPerYearF14 > BarleyYieldPerYearF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF11 > one-of MiddlestreamF12-14HarvestFieldsList or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF15 or MiddlestreamF12-14HarvestFieldsList > NumberofHarvestFieldsF15 + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF13 > NumberofHarvestFieldsF14 or NumberofHarvestFieldsF13 > NumberofHarvestFieldsF15 or + NumberofHarvestFieldsF14 > NumberofHarvestFieldsF15 + [ + set CompareOnceAYearF11-15 false + set CompareEveryTwoYearsSecondaryF11-15 true + ] + + if CompareEveryTwoYearsSecondaryF11-15 = true + [ + set ComparisonCountDownSecondaryF11-15 (ComparisonCountDownSecondaryF11-15 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberSecondaryF11-15 (ContinuousPoorYearNumberSecondaryF11-15 + 1) + SystemsReaction_SecondaryCanalF11-15 + ] + ] + ] + +;;there are farmer11-16 + if [pcolor] of patch 38 3 = red + 2 and [pcolor] of patch 38 7 = red + 2 and [pcolor] of patch 38 5 = red + 2 + [ + ;;there are farmer11, 12, 13, 14, 15, 16: UP-F11,2 Middle-F13,14 Down-15,16 + set UpstreamF11-12HarvestFieldsList (list NumberofHarvestFieldsF11 NumberofHarvestFieldsF12) + set UpstreamF11-12BarleyYieldList (list BarleyYieldPerYearF11 BarleyYieldPerYearF12) + set MiddlestreamF13-14HarvestFieldsList (list NumberofHarvestFieldsF13 NumberofHarvestFieldsF14) + set MiddlestreamF13-14BarleyYieldList (list BarleyYieldPerYearF13 BarleyYieldPerYearF14) + set DownstreamF15-16HarvestFieldsList (list NumberofHarvestFieldsF15 NumberofHarvestFieldsF16) + set DownstreamF15-16BarleyYieldList (list BarleyYieldPerYearF15 BarleyYieldPerYearF16) + ifelse CompareOnceAYearF11-16 = true + [ + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + ;;farmers have the same number of harvested fieds + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if NumberofHarvestFieldsF15 = NumberofHarvestFieldsF16 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + if BarleyYieldPerYearF15 = BarleyYieldPerYearF16 + [ + set CompareOnceAYearF11-16 true + set ContinuousPoorYearNumberSecondaryF11-16 0 + ] + ] + ] + ] + ] + if one-of UpstreamF11-12BarleyYieldList > one-of MiddlestreamF13-14BarleyYieldList or one-of UpstreamF11-12BarleyYieldList > one-of DownstreamF15-16BarleyYieldList or one-of MiddlestreamF13-14BarleyYieldList > one-of DownstreamF15-16BarleyYieldList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-16 (ContinuousPoorYearNumberSecondaryF11-16 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if NumberofHarvestFieldsF15 = NumberofHarvestFieldsF16 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + if BarleyYieldPerYearF15 = BarleyYieldPerYearF16 + [ + set CompareOnceAYearF11-16 true + set ContinuousPoorYearNumberSecondaryF11-16 0 + ] + ] + ] + ] + ] + if one-of UpstreamF11-12BarleyYieldList > one-of MiddlestreamF13-14BarleyYieldList or one-of UpstreamF11-12BarleyYieldList > one-of DownstreamF15-16BarleyYieldList or one-of MiddlestreamF13-14BarleyYieldList > one-of DownstreamF15-16BarleyYieldList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-16 (ContinuousPoorYearNumberSecondaryF11-16 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if one-of UpstreamF11-12HarvestFieldsList > one-of MiddlestreamF13-14HarvestFieldsList or one-of UpstreamF11-12HarvestFieldsList > one-of DownstreamF15-16HarvestFieldsList or one-of MiddlestreamF13-14HarvestFieldsList > one-of DownstreamF15-16HarvestFieldsList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondaryF11-16 (ContinuousPoorYearNumberSecondaryF11-16 + 1) ;; record the number of times when poor year appears + ] + ] + [ + if CompareEveryTwoYearsSecondaryF11-16 = true + [ + set ComparisonCountDownSecondaryF11-16 (ComparisonCountDownSecondaryF11-16 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReaction_SecondaryCanalF11-16 + ] + ] + if ComparisonCountDownSecondaryF11-16 = 0 + [ + set ComparisonCountDownSecondaryF11-16 (ComparisonTime + 1) + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if NumberofHarvestFieldsF15 = NumberofHarvestFieldsF16 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + if BarleyYieldPerYearF15 = BarleyYieldPerYearF16 + [ + set CompareOnceAYearF11-16 true + set ContinuousPoorYearNumberSecondaryF11-16 0 + ] + ] + ] + ] + ] + if one-of UpstreamF11-12BarleyYieldList > one-of MiddlestreamF13-14BarleyYieldList or one-of UpstreamF11-12BarleyYieldList > one-of DownstreamF15-16BarleyYieldList or one-of MiddlestreamF13-14BarleyYieldList > one-of DownstreamF15-16BarleyYieldList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + ] + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if NumberofHarvestFieldsF13 = NumberofHarvestFieldsF14 + [ + if NumberofHarvestFieldsF14 = NumberofHarvestFieldsF15 + [ + if NumberofHarvestFieldsF15 = NumberofHarvestFieldsF16 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + if BarleyYieldPerYearF13 = BarleyYieldPerYearF14 + [ + if BarleyYieldPerYearF14 = BarleyYieldPerYearF15 + [ + if BarleyYieldPerYearF15 = BarleyYieldPerYearF16 + [ + set CompareOnceAYearF11-16 true + set ContinuousPoorYearNumberSecondaryF11-16 0 + ] + ] + ] + ] + ] + if one-of UpstreamF11-12BarleyYieldList > one-of MiddlestreamF13-14BarleyYieldList or one-of UpstreamF11-12BarleyYieldList > one-of DownstreamF15-16BarleyYieldList or one-of MiddlestreamF13-14BarleyYieldList > one-of DownstreamF15-16BarleyYieldList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if one-of UpstreamF11-12HarvestFieldsList > one-of MiddlestreamF13-14HarvestFieldsList or one-of UpstreamF11-12HarvestFieldsList > one-of DownstreamF15-16HarvestFieldsList or one-of MiddlestreamF13-14HarvestFieldsList > one-of DownstreamF15-16HarvestFieldsList + [ + set CompareOnceAYearF11-16 false + set CompareEveryTwoYearsSecondaryF11-16 true + ] + if CompareEveryTwoYearsSecondaryF11-16 = true + [ + set ComparisonCountDownSecondaryF11-16 (ComparisonCountDownSecondaryF11-16 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberSecondaryF11-16 (ContinuousPoorYearNumberSecondaryF11-16 + 1) + SystemsReaction_SecondaryCanalF11-16 + ] + ] + ] + ] + ] +end + +to SystemsReaction_SecondaryCanalF11-14 + if any? neighbors with [pcolor = red + 2] + [ + ask neighbors with [pcolor = red + 2] + [ + set ReadyforGCDecision_SecondaryCanalF11-14 true + ] + ] +end + +to SystemsReaction_SecondaryCanalF11-15 + if any? neighbors with [pcolor = red + 2] + [ + ask neighbors with [pcolor = red + 2] + [ + set ReadyforGCDecision_SecondaryCanalF11-15 true + ] + ] +end + +to SystemsReaction_SecondaryCanalF11-16 + if any? neighbors with [pcolor = red + 2] + [ + ask neighbors with [pcolor = red + 2] + [ + set ReadyforGCDecision_SecondaryCanalF11-16 true + ] + ] +end + +to FarmersExpansionEvaluation_2ndPrimaryCanalF17-19 + ask patches with [LandType = 3] ;; ask storage patch + [ + ;;good harvest expansion + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;there are F11-16 and expand to F17-19 + if [pcolor] of patch 38 3 = red + 2 + [ + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ +;;the 1st year + if NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 and NumberofHarvestFieldsF16 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_1year? True + ] + ] +;; the 2nd year + if F11-16WithGoodHarvestYearsProcedure_1year? = True + [ + set F11-16WithGoodHarvestYears 1 + set F11-16CountDownExpansion_1year (F11-16CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-16CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_2years? True + ] + [ + set F11-16WithGoodHarvestYearsProcedure_1year? False + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 3rd year + if F11-16WithGoodHarvestYearsProcedure_2years? = True + [ + set F11-16WithGoodHarvestYears 2 + set F11-16CountDownExpansion_2years (F11-16CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-16CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 and NumberofHarvestFieldsF16 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_3years? True + ] + [ + set F11-16WithGoodHarvestYearsProcedure_1year? False + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_2years? False + if F11-16WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;; the 4th year + if F11-16WithGoodHarvestYearsProcedure_3years? = True + [ + set F11-16WithGoodHarvestYears 3 + set F11-16CountDownExpansion_3years (F11-16CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-16CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 and NumberofHarvestFieldsF16 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_4years? True + ] + [ + set F11-16WithGoodHarvestYearsProcedure_1year? False + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_2years? False + if F11-16WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_3years? False + if F11-16WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 5th year + if F11-16WithGoodHarvestYearsProcedure_4years? = True + [ + set F11-16WithGoodHarvestYears 4 + set F11-16CountDownExpansion_4years (F11-16CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-16CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 and NumberofHarvestFieldsF16 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_5years? True + ] + [ + set F11-16WithGoodHarvestYearsProcedure_1year? False + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_2years? False + if F11-16WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_3years? False + if F11-16WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_4years? False + if F11-16WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] +;;the 6th year + if F11-16WithGoodHarvestYearsProcedure_5years? = True + [ + set F11-16WithGoodHarvestYears 5 + set F11-16CountDownExpansion_5years (F11-16CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-16CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF11 = 5 and NumberofHarvestFieldsF12 = 5 and NumberofHarvestFieldsF13 >= 4 and NumberofHarvestFieldsF14 >= 4 and NumberofHarvestFieldsF15 >= 3 and NumberofHarvestFieldsF16 >= 3 + [ + set F11-16WithGoodHarvestYearsProcedure_6years? True + ] + [ + set F11-16WithGoodHarvestYearsProcedure_1year? False + if F11-16WithGoodHarvestYearsProcedure_1year? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_2years? False + if F11-16WithGoodHarvestYearsProcedure_2years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_3years? False + if F11-16WithGoodHarvestYearsProcedure_3years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_4years? False + if F11-16WithGoodHarvestYearsProcedure_4years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-16WithGoodHarvestYearsProcedure_5years? False + if F11-16WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-16WithGoodHarvestYears 0 + set F11-16CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F11-16WithGoodHarvestYears = 5 + [ + PrimaryCanal_GoodExpansionF17-19 + set F11-16WithGoodHarvestYearsProcedure_5years? False + ] + if F11-16WithGoodHarvestYearsProcedure_5years? = False + [ + set F11-16WithGoodHarvestYears 0 + ] + ] + + ;;poor harvest expansion + ;;there are F11-13 with poor harvest and expand to F17-19 (using the same expansion fields setting as good harvest expansion) + if Year > F11FirstWithLand + 5 + [ + if [pcolor] of patch 38 9 = red + 2 and [pcolor] of patch 38 7 != red + 2 + [ + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + ;;the 1st year + if NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_1year? True + ] + ] + ;; the 2nd year + if F11-13WithpoorHarvestYearsProcedure_1year? = True + [ + set F11-13WithPoorHarvestYears 1 + set F11-13CountDownExpansion_1year (F11-13CountDownExpansion_1year - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_1year = 0 + [ + ifelse NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_2years? True + ] + [ + set F11-13WithpoorHarvestYearsProcedure_1year? False + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + ;; the 3rd year + if F11-13WithpoorHarvestYearsProcedure_2years? = True + [ + set F11-13WithPoorHarvestYears 2 + set F11-13CountDownExpansion_2years (F11-13CountDownExpansion_2years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_2years = 0 + [ + ifelse NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_3years? True + ] + [ + set F11-13WithpoorHarvestYearsProcedure_1year? False + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_2years? False + if F11-13WithpoorHarvestYearsProcedure_2years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + ;; the 4th year + if F11-13WithpoorHarvestYearsProcedure_3years? = True + [ + set F11-13WithPoorHarvestYears 3 + set F11-13CountDownExpansion_3years (F11-13CountDownExpansion_3years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_3years = 0 + [ + ifelse NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_4years? True + ] + [ + set F11-13WithpoorHarvestYearsProcedure_1year? False + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_2years? False + if F11-13WithpoorHarvestYearsProcedure_2years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_3years? False + if F11-13WithpoorHarvestYearsProcedure_3years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + ;;the 5th year + if F11-13WithpoorHarvestYearsProcedure_4years? = True + [ + set F11-13WithPoorHarvestYears 4 + set F11-13CountDownExpansion_4years (F11-13CountDownExpansion_4years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_4years = 0 + [ + ifelse NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_5years? True + ] + [ + set F11-13WithpoorHarvestYearsProcedure_1year? False + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_2years? False + if F11-13WithpoorHarvestYearsProcedure_2years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_3years? False + if F11-13WithpoorHarvestYearsProcedure_3years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_4years? False + if F11-13WithpoorHarvestYearsProcedure_4years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + ;;the 6th year + if F11-13WithpoorHarvestYearsProcedure_5years? = True + [ + set F11-13WithPoorHarvestYears 5 + set F11-13CountDownExpansion_5years (F11-13CountDownExpansion_5years - 1) ;; CountDownExpansion1 is 365, and it decreases till 0 and the ohter comparison between farmers happens + if F11-13CountDownExpansion_5years = 0 + [ + ifelse NumberofHarvestFieldsF11 < 3 and NumberofHarvestFieldsF12 < 3 and NumberofHarvestFieldsF13 < 3 + [ + set F11-13WithpoorHarvestYearsProcedure_6years? True + ] + [ + set F11-13WithpoorHarvestYearsProcedure_1year? False + if F11-13WithpoorHarvestYearsProcedure_1year? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_2years? False + if F11-13WithpoorHarvestYearsProcedure_2years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_3years? False + if F11-13WithpoorHarvestYearsProcedure_3years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_4years? False + if F11-13WithpoorHarvestYearsProcedure_4years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + ] + set F11-13WithpoorHarvestYearsProcedure_5years? False + if F11-13WithpoorHarvestYearsProcedure_5years? = False + [ + set F11-13WithPoorHarvestYears 0 + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ] + ] + ] + if F11-13WithPoorHarvestYears = 5 + [ + PrimaryCanal_PoorExpansionF17-19 + set F11-13WithpoorHarvestYearsProcedure_5years? False + ] + if F11-13WithpoorHarvestYearsProcedure_5years? = False + [ + set F11-13WithPoorHarvestYears 0 + ] + ] + ] + ] +end + + +to PrimaryCanal_GoodExpansionF17-19 +;;setup three new farmers, F17, F18, 19 + ;;Storage + ask patch 22 18;F17 + [ + set LandType 3 + set pcolor grey + set CompareOnceAYearF17-19 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-19 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-19 ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F17-19WithGoodHarvestYearsProcedure_6years? False + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 20 16;F18 + [ + set LandType 3 + set pcolor grey + set CompareOnceAYearF17-19 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-19 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-19 ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F17-19WithGoodHarvestYearsProcedure_6years? False + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 18 18;F19 + [ + set LandType 3 + set pcolor grey + set CompareOnceAYearF17-19 true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsF17-19 false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownF17-19 ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F17-19WithGoodHarvestYearsProcedure_6years? False + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;setup 2nd primary canal, according to the location of gate and canal patch + ask patch 24 17 ;; canal patch or the head gate patch + [ + set LandType -3 + set pcolor blue + ] + ask patch 23 17 + [ + set LandType -3 ;;canal patch + set pcolor blue + ] + ask patch 22 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 21 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 20 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 19 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 18 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 17 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 16 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 15 17 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;;setup farmlands + ;F17 + ask patch 23 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 23 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 22 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ;F18 + ask patch 21 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 20 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ;F19 + ask patch 19 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 18 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + +; if [pcolor] of patch 24 17 = blue +; [ +; set ContinuouslySameHarvestYear 0 +; ] +end + +to PrimaryCanal_PoorExpansionF17-19 + ;;for F11-13 (F8-10) + ;;setup storage patch + ask patch 37 13 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] + ask patch 39 11 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] + ask patch 37 9 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 38 16 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 15 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 14 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 13 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 12 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 11 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 10 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 9 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 8 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 7 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 38 6 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] +;;setup farmlands + ask patch 37 14 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 14 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 13 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 12 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 37 12 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 39 12 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 40 12 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 40 11 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 40 10 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 39 10 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 37 10 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 10 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 9 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 36 8 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 37 8 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + + ;; for F17-19 (F8-10) + ;; storage patch + ask patch 22 18 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F17-19WithGoodHarvestYearsProcedure_6years? False + set F17-19WithPoorHarvestYearsProcedure_1year? False + set F17-19WithPoorHarvestYearsProcedure_2years? False + set F17-19WithPoorHarvestYearsProcedure_3years? False + set F17-19WithPoorHarvestYearsProcedure_4years? False + set F17-19WithPoorHarvestYearsProcedure_5years? False + set F17-19WithPoorHarvestYearsProcedure_6years? False + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 20 16 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F17-19WithPoorHarvestYearsProcedure_1year? False + set F17-19WithPoorHarvestYearsProcedure_2years? False + set F17-19WithPoorHarvestYearsProcedure_3years? False + set F17-19WithPoorHarvestYearsProcedure_4years? False + set F17-19WithPoorHarvestYearsProcedure_5years? False + set F17-19WithPoorHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 18 18 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F17-19WithGoodHarvestYearsProcedure_1year? False + set F17-19WithGoodHarvestYearsProcedure_2years? False + set F17-19WithGoodHarvestYearsProcedure_3years? False + set F17-19WithGoodHarvestYearsProcedure_4years? False + set F17-19WithGoodHarvestYearsProcedure_5years? False + set F17-19WithGoodHarvestYearsProcedure_6years? False + set F17-19WithPoorHarvestYearsProcedure_1year? False + set F17-19WithPoorHarvestYearsProcedure_2years? False + set F17-19WithPoorHarvestYearsProcedure_3years? False + set F17-19WithPoorHarvestYearsProcedure_4years? False + set F17-19WithPoorHarvestYearsProcedure_5years? False + set F17-19WithPoorHarvestYearsProcedure_6years? False + set F17-19CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F17-19CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;setup 2nd primary canal, according to the location of gate and canal patch + ask patch 24 17 ;; canal patch or the head gate patch + [ + set LandType -3 + set pcolor blue + ] + ask patch 23 17 + [ + set LandType -3 ;;canal patch + set pcolor blue + ] + ask patch 22 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 21 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 20 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 19 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 18 17 + [ + set LandType -1 ;; gate patch + set pcolor red + set ReadyforGCDecisionF17-19 false + ] + ask patch 17 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 16 17 + [ + set LandType -3 ;; canal patch + set pcolor blue + ] + ask patch 15 17 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;;setup farmlands + ;F17 + ask patch 23 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 23 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 22 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ;F18 + ask patch 21 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 21 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 20 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 15 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 16 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ;F19 + ask patch 19 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 19 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 18 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 19 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 17 18 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end \ No newline at end of file diff --git a/FarmersHarvestEvaluation.nls b/FarmersHarvestEvaluation.nls new file mode 100644 index 0000000..6762421 --- /dev/null +++ b/FarmersHarvestEvaluation.nls @@ -0,0 +1,1420 @@ +;;;this is for GC variation +to FarmersHarvestEvaluation + ask patches with [LandType = 3] ;; ask the storage patch + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + set FarmersHarvestFieldsList (list NumberofHarvestFieldsF1 NumberofHarvestFieldsF2 NumberofHarvestFieldsF3 NumberofHarvestFieldsF4 NumberofHarvestFieldsF5 NumberofHarvestFieldsF6 NumberofHarvestFieldsF7 NumberofHarvestFieldsF8 NumberofHarvestFieldsF9 NumberofHarvestFieldsF10) + set UpstreamfarmersHarvestFieldsList (list NumberofHarvestFieldsF1 NumberofHarvestFieldsF2 NumberofHarvestFieldsF3) + set MiddlestreamfarmersHarvestFieldsList (list NumberofHarvestFieldsF4 NumberofHarvestFieldsF5 NumberofHarvestFieldsF6 NumberofHarvestFieldsF7 ) + set DownstreamfarmersHarvestFieldsList (list NumberofHarvestFieldsF8 NumberofHarvestFieldsF9 NumberofHarvestFieldsF10) + set FarmersBarleyYieldList (list BarleyYieldPerYearF1 BarleyYieldPerYearF2 BarleyYieldPerYearF3 BarleyYieldPerYearF4 BarleyYieldPerYearF5 BarleyYieldPerYearF6 BarleyYieldPerYearF7 BarleyYieldPerYearF8 BarleyYieldPerYearF9 BarleyYieldPerYearF10 ) ;; the list for F1-10's yields + set UpstreamFarmersBarleyYieldList (list BarleyYieldPerYearF1 BarleyYieldPerYearF2 BarleyYieldPerYearF3 ) ;; the yields list for upstream farmers: F1 F2 F3 + set MiddlestreamFarmersBarleyYieldList (list BarleyYieldPerYearF4 BarleyYieldPerYearF5 BarleyYieldPerYearF6 BarleyYieldPerYearF7 ) ;; the yields list for middle stream farmers: F4 F5 F6 F7 + set DownstreamFarmersBarleyYieldList (list BarleyYieldPerYearF8 BarleyYieldPerYearF9 BarleyYieldPerYearF10 ) ;; the yields list for downstream farmers: F8 F9 F10 + ifelse CompareOnceAYear = true + [ +;; the primary canal, harvest situation comparison + if pxcor > 25 and pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if NumberofHarvestFieldsF1 = NumberofHarvestFieldsF2 + [ + if NumberofHarvestFieldsF2 = NumberofHarvestFieldsF3 + [ + if NumberofHarvestFieldsF3 = NumberofHarvestFieldsF4 + [ + if NumberofHarvestFieldsF4 = NumberofHarvestFieldsF5 + [ + if NumberofHarvestFieldsF5 = NumberofHarvestFieldsF6 + [ + if NumberofHarvestFieldsF6 = NumberofHarvestFieldsF7 + [ + if NumberofHarvestFieldsF7 = NumberofHarvestFieldsF8 + [ + if NumberofHarvestFieldsF8 = NumberofHarvestFieldsF9 + [ + if NumberofHarvestFieldsF9 = NumberofHarvestFieldsF10 + [ + ;; compare the yields of each farmer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if BarleyYieldPerYearF1 = BarleyYieldPerYearF2 + [ + if BarleyYieldPerYearF2 = BarleyYieldPerYearF3 + [ + if BarleyYieldPerYearF3 = BarleyYieldPerYearF4 + [ + if BarleyYieldPerYearF4 = BarleyYieldPerYearF5 + [ + if BarleyYieldPerYearF5 = BarleyYieldPerYearF6 + [ + if BarleyYieldPerYearF6 = BarleyYieldPerYearF7 + [ + if BarleyYieldPerYearF7 = BarleyYieldPerYearF8 + [ + if BarleyYieldPerYearF8 = BarleyYieldPerYearF9 + [ + if BarleyYieldPerYearF9 = BarleyYieldPerYearF10 + [ + ;;nothing to change;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + set CompareOnceAYear true + set ContinuousPoorYearNumberPrimary 0 + ] + ] + ] + ] + ] + ] + ] + ] + ] + if one-of UpstreamFarmersBarleyYieldList > one-of MiddlestreamfarmersBarleyYieldList or one-of UpstreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList or one-of MiddlestreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList + [ + set CompareOnceAYear false + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberPrimary (ContinuousPoorYearNumberPrimary + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + if pxcor > 25 and pycor < 17 and pycor > 14 ;; lower side of the primary canal + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if NumberofHarvestFieldsF1 = NumberofHarvestFieldsF2 + [ + if NumberofHarvestFieldsF2 = NumberofHarvestFieldsF3 + [ + if NumberofHarvestFieldsF3 = NumberofHarvestFieldsF4 + [ + if NumberofHarvestFieldsF4 = NumberofHarvestFieldsF5 + [ + if NumberofHarvestFieldsF5 = NumberofHarvestFieldsF6 + [ + if NumberofHarvestFieldsF6 = NumberofHarvestFieldsF7 + [ + if NumberofHarvestFieldsF7 = NumberofHarvestFieldsF8 + [ + if NumberofHarvestFieldsF8 = NumberofHarvestFieldsF9 + [ + if NumberofHarvestFieldsF9 = NumberofHarvestFieldsF10 + [ + ;; compare the yields of each farmer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if BarleyYieldPerYearF1 = BarleyYieldPerYearF2 + [ + if BarleyYieldPerYearF2 = BarleyYieldPerYearF3 + [ + if BarleyYieldPerYearF3 = BarleyYieldPerYearF4 + [ + if BarleyYieldPerYearF4 = BarleyYieldPerYearF5 + [ + if BarleyYieldPerYearF5 = BarleyYieldPerYearF6 + [ + if BarleyYieldPerYearF6 = BarleyYieldPerYearF7 + [ + if BarleyYieldPerYearF7 = BarleyYieldPerYearF8 + [ + if BarleyYieldPerYearF8 = BarleyYieldPerYearF9 + [ + if BarleyYieldPerYearF9 = BarleyYieldPerYearF10 + [ + ;;nothing to change;;;;;;;;;;;;;;;;;;;;;;;;;; + set CompareOnceAYear true + set ContinuousPoorYearNumberPrimary 0 + ] + ] + ] + ] + ] + ] + ] + ] + ] + if one-of UpstreamFarmersBarleyYieldList > one-of MiddlestreamfarmersBarleyYieldList or one-of UpstreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList or one-of MiddlestreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList + [ + set CompareOnceAYear false + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberPrimary (ContinuousPoorYearNumberPrimary + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pxcor > 25 and pycor > 14 + [ + if one-of UpstreamfarmersHarvestFieldsList > one-of MiddlestreamfarmersHarvestFieldsList or one-of UpstreamfarmersHarvestFieldsList > one-of DownstreamfarmersHarvestFieldsList or one-of MiddlestreamfarmersHarvestFieldsList > one-of DownstreamfarmersHarvestFieldsList + [ + set CompareOnceAYear false ;; record the number of times when poor year appears + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberPrimary (ContinuousPoorYearNumberPrimary + 1) ;; record the number of times when poor year appears + ] + ] + +;;for the secondary canal, F11-13 + if pxcor > 25 and pycor < 15 + [ + if [pcolor] of patch 38 9 = red + 2 and [pcolor] of patch 38 7 != red + 2 + [ + ;; left side of the secondary canal + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + set CompareOnceAYear true + set ContinuousPoorYearNumberSecondary 0 + ] + ] + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondary (ContinuousPoorYearNumberSecondary + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ;; left side of the secondary canal + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + set CompareOnceAYear true + set ContinuousPoorYearNumberSecondary 0 + ] + ] + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondary (ContinuousPoorYearNumberSecondary + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 ;; compare the yields of each farmer + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberSecondary (ContinuousPoorYearNumberSecondary + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + [ + if CompareEveryTwoYearsPrimary = true + [ + set ComparisonCountDownPrimary (ComparisonCountDownPrimary - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReaction_PrimaryCanal + ] + if CompareEveryTwoYearsSecondary = true + [ + set ComparisonCountDownSecondary (ComparisonCountDownSecondary - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReaction_SecondaryCanal + ] + ] + + if ComparisonCountDownPrimary = 0 + [ + set ComparisonCountDownPrimary (ComparisonTime + 1) + ;; for primary canal + if pxcor > 25 and pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if NumberofHarvestFieldsF1 = NumberofHarvestFieldsF2 + [ + if NumberofHarvestFieldsF2 = NumberofHarvestFieldsF3 + [ + if NumberofHarvestFieldsF3 = NumberofHarvestFieldsF4 + [ + if NumberofHarvestFieldsF4 = NumberofHarvestFieldsF5 + [ + if NumberofHarvestFieldsF5 = NumberofHarvestFieldsF6 + [ + if NumberofHarvestFieldsF6 = NumberofHarvestFieldsF7 + [ + if NumberofHarvestFieldsF7 = NumberofHarvestFieldsF8 + [ + if NumberofHarvestFieldsF8 = NumberofHarvestFieldsF9 + [ + if NumberofHarvestFieldsF9 = NumberofHarvestFieldsF10 + [ + ;; compare the yields of each farmer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if BarleyYieldPerYearF1 = BarleyYieldPerYearF2 + [ + if BarleyYieldPerYearF2 = BarleyYieldPerYearF3 + [ + if BarleyYieldPerYearF3 = BarleyYieldPerYearF4 + [ + if BarleyYieldPerYearF4 = BarleyYieldPerYearF5 + [ + if BarleyYieldPerYearF5 = BarleyYieldPerYearF6 + [ + if BarleyYieldPerYearF6 = BarleyYieldPerYearF7 + [ + if BarleyYieldPerYearF7 = BarleyYieldPerYearF8 + [ + if BarleyYieldPerYearF8 = BarleyYieldPerYearF9 + [ + if BarleyYieldPerYearF9 = BarleyYieldPerYearF10 + [ + ;;nothing to change;;;;;;;;;;;;;;;;;;;;;;;;;; + set CompareOnceAYear true + set ContinuousPoorYearNumberPrimary 0 + ] + ] + ] + ] + ] + ] + ] + ] + ] + if one-of UpstreamFarmersBarleyYieldList > one-of MiddlestreamfarmersBarleyYieldList or one-of UpstreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList or one-of MiddlestreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList + [ + set CompareOnceAYear false + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + if pxcor > 25 and pycor < 17 and pycor > 14 ;; lower side of the primary canal + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if NumberofHarvestFieldsF1 = NumberofHarvestFieldsF2 + [ + if NumberofHarvestFieldsF2 = NumberofHarvestFieldsF3 + [ + if NumberofHarvestFieldsF3 = NumberofHarvestFieldsF4 + [ + if NumberofHarvestFieldsF4 = NumberofHarvestFieldsF5 + [ + if NumberofHarvestFieldsF5 = NumberofHarvestFieldsF6 + [ + if NumberofHarvestFieldsF6 = NumberofHarvestFieldsF7 + [ + if NumberofHarvestFieldsF7 = NumberofHarvestFieldsF8 + [ + if NumberofHarvestFieldsF8 = NumberofHarvestFieldsF9 + [ + if NumberofHarvestFieldsF9 = NumberofHarvestFieldsF10 + [ + ;; compare the yields of each farmer;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if BarleyYieldPerYearF1 = BarleyYieldPerYearF2 + [ + if BarleyYieldPerYearF2 = BarleyYieldPerYearF3 + [ + if BarleyYieldPerYearF3 = BarleyYieldPerYearF4 + [ + if BarleyYieldPerYearF4 = BarleyYieldPerYearF5 + [ + if BarleyYieldPerYearF5 = BarleyYieldPerYearF6 + [ + if BarleyYieldPerYearF6 = BarleyYieldPerYearF7 + [ + if BarleyYieldPerYearF7 = BarleyYieldPerYearF8 + [ + if BarleyYieldPerYearF8 = BarleyYieldPerYearF9 + [ + if BarleyYieldPerYearF9 = BarleyYieldPerYearF10 + [ + ;;nothing to change;;;;;;;;;;;;;;;;;;;;;;;;;; + set CompareOnceAYear true + set ContinuousPoorYearNumberPrimary 0 + ] + ] + ] + ] + ] + ] + ] + ] + ] + if one-of UpstreamFarmersBarleyYieldList > one-of MiddlestreamfarmersBarleyYieldList or one-of UpstreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList or one-of MiddlestreamfarmersBarleyYieldList > one-of DownstreamfarmersBarleyYieldList + [ + set CompareOnceAYear false + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + ] + if pxcor > 25 and pycor > 14 + [ + ;;farmers have the different number of harvested fieds;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if one-of UpstreamfarmersHarvestFieldsList > one-of MiddlestreamfarmersHarvestFieldsList or one-of UpstreamfarmersHarvestFieldsList > one-of DownstreamfarmersHarvestFieldsList or one-of MiddlestreamfarmersHarvestFieldsList > one-of DownstreamfarmersHarvestFieldsList + [ + ;; compare the yields of each farmer + set CompareOnceAYear false + set CompareEveryTwoYearsPrimary true ;; the procedure of comparing the harvest every two years + ] + ] + if CompareEveryTwoYearsPrimary = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownPrimary (ComparisonCountDownPrimary - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberPrimary (ContinuousPoorYearNumberPrimary + 1) ;; record the number of times when poor year appears + SystemsReaction_PrimaryCanal + ] + ] + + if ComparisonCountDownSecondary = 0 + [ + set ComparisonCountDownSecondary (ComparisonTime + 1) +;;for the secondary canal, F11-13 + if pxcor > 25 and pycor < 15 ;; left side of the secondary canal + [ + if [pcolor] of patch 38 9 = red + 2 and [pcolor] of patch 38 7 != red + 2 + [ + ;; left side of the canal + if pxcor < 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + set CompareOnceAYear true + set ContinuousPoorYearNumberSecondary 0 + ] + ] + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ;; right side of the secondary canal + if pxcor > 38 + [ + if ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true + [ + if NumberofHarvestFieldsF11 = NumberofHarvestFieldsF12 + [ + if NumberofHarvestFieldsF12 = NumberofHarvestFieldsF13 + [ + if BarleyYieldPerYearF11 = BarleyYieldPerYearF12 + [ + if BarleyYieldPerYearF12 = BarleyYieldPerYearF13 + [ + set CompareOnceAYear true + set ContinuousPoorYearNumberSecondary 0 + ] + ] + if BarleyYieldPerYearF11 > BarleyYieldPerYearF12 or BarleyYieldPerYearF12 > BarleyYieldPerYearF13 or BarleyYieldPerYearF11 > BarleyYieldPerYearF13 + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 or NumberofHarvestFieldsF12 > NumberofHarvestFieldsF13 or NumberofHarvestFieldsF11 > NumberofHarvestFieldsF12 ;; compare the yields of each farmer + [ + set CompareOnceAYear false + set CompareEveryTwoYearsSecondary true ;; the procedure of comparing the harvest every two years + ] + + if CompareEveryTwoYearsSecondary = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownSecondary (ComparisonCountDownSecondary - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberSecondary (ContinuousPoorYearNumberSecondary + 1) ;; record the number of times when poor year appears + SystemsReaction_SecondaryCanal + ] + ] + ] + ] + ] +end + +to FarmersHarvestEvaluationF17-19 ;; for GC variation + ask patches with [LandType = 3] ;;ask the storage patch + [ + ifelse CompareOnceAYearF17-19 = true + [ + if pxcor < 25 and pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + ;;nothing to change + set CompareOnceAYearF17-19 true + set ContinuousPoorYearNumberF17-19 0 + ] + ] + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF19 + [ + set CompareOnceAYearF17-19 false + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + if pxcor < 25 and pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + ;;nothing to change + set CompareOnceAYearF17-19 true + set ContinuousPoorYearNumberF17-19 0 + ] + ] + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF19 + [ + set CompareOnceAYearF17-19 false + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pxcor < 25 and pycor > 14 + [ + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 + [ + set CompareOnceAYearF17-19 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + ] + [ + if CompareEveryTwoYearsF17-19 = true + [ + set ComparisonCountDownF17-19 (ComparisonCountDownF17-19 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReactionF17-19 + ] + ] + + if ComparisonCountDownF17-19 = 0 + [ + set ComparisonCountDownF17-19 (ComparisonTime + 1) + ;; for F17-19 + if pxcor < 25 and pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + ;;nothing to change + set CompareOnceAYearF17-19 true + set ContinuousPoorYearNumberF17-19 0 + ] + ] + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF19 + [ + set CompareOnceAYearF17-19 false + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + if pxcor < 25 and pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + ;;nothing to change + set CompareOnceAYearF17-19 true + set ContinuousPoorYearNumberF17-19 0 + ] + ] + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF19 + [ + set CompareOnceAYearF17-19 false + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pxcor < 25 and pycor > 14 + [ + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 + [ + set CompareOnceAYearF17-19 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-19 true ;; the procedure of comparing the harvest every two years + ;set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + ] + ] + if CompareEveryTwoYearsF17-19 = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownF17-19 (ComparisonCountDownF17-19 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberF17-19 (ContinuousPoorYearNumberF17-19 + 1) ;; record the number of times when poor year appears + SystemsReactionF17-19 + ] + ] + ] +end + +to SystemsReactionF17-19 + if pxcor < 25 + [ + if any? neighbors with [pcolor = red] + [ + ask neighbors with [pcolor = red] + [ + set ReadyforGCDecisionF17-19 true + ] + ] + ] + +end + +to FarmersHarvestEvaluationF17-22 ;; for GC variation + ask patches with [LandType = 3] ;;ask the storage patch + [ + if pxcor < 25 + [ + ;;if there are F17-20 + if [pcolor] of patch 16 17 = red and [pcolor] of patch 14 17 != red + [ + ;;F17-UP; F18,19-MIDDLE; F20-DOWN + set MiddlestreamF18-19HarvestFieldsList (list NumberofHarvestFieldsF18 NumberofHarvestFieldsF19) + set MiddlestreamF18-19BarleyYieldList (list BarleyYieldPerYearF18 BarleyYieldPerYearF19) + ifelse CompareOnceAYearF17-20 = true + [ + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + ;;nothing to change + set CompareOnceAYearF17-20 true + set ContinuousPoorYearNumberF17-20 0 + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-19BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or one-of MiddlestreamF18-19BarleyYieldList > BarleyYieldPerYearF20 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 + [ + set CompareOnceAYearF17-20 false + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + ;;nothing to change + set CompareOnceAYearF17-20 true + set ContinuousPoorYearNumberF17-20 0 + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-19BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or one-of MiddlestreamF18-19BarleyYieldList > BarleyYieldPerYearF20 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 + [ + set CompareOnceAYearF17-20 false + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF17 > one-of MiddlestreamF18-19HarvestFieldsList or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or one-of MiddlestreamF18-19HarvestFieldsList > NumberofHarvestFieldsF20 + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 + [ + set CompareOnceAYearF17-20 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + ] + [ + if CompareEveryTwoYearsF17-20 = true + [ + set ComparisonCountDownF17-20 (ComparisonCountDownF17-20 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReactionF17-20 + ] + ] + + if ComparisonCountDownF17-20 = 0 + [ + set ComparisonCountDownF17-20 (ComparisonTime + 1) + ;; for F17-20 + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + ;;nothing to change + set CompareOnceAYearF17-20 true + set ContinuousPoorYearNumberF17-20 0 + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-19BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or one-of MiddlestreamF18-19BarleyYieldList > BarleyYieldPerYearF20 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 + [ + set CompareOnceAYearF17-20 false + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + ;;nothing to change + set CompareOnceAYearF17-20 true + set ContinuousPoorYearNumberF17-20 0 + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-19BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or one-of MiddlestreamF18-19BarleyYieldList > BarleyYieldPerYearF20 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 + [ + set CompareOnceAYearF17-20 false + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + ;if NumberofHarvestFieldsF17 > one-of MiddlestreamF18-19HarvestFieldsList or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or one-of MiddlestreamF18-19HarvestFieldsList > NumberofHarvestFieldsF20 + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 + [ + set CompareOnceAYearF17-20 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-20 true ;; the procedure of comparing the harvest every two years + ;set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + ] + if CompareEveryTwoYearsF17-20 = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownF17-20 (ComparisonCountDownF17-20 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberF17-20 (ContinuousPoorYearNumberF17-20 + 1) ;; record the number of times when poor year appears + SystemsReactionF17-20 + ] + ] + ] + ;;if there are F17-21 + ;;if there are F17-21 + ;;if there are F17-21 + if [pcolor] of patch 14 17 = red and [pcolor] of patch 12 17 != red + [ + ;;F17-UP; F18,19, 20-MIDDLE; F21-DOWN + set MiddlestreamF18-20BarleyYieldList (list BarleyYieldPerYearF18 BarleyYieldPerYearF19 BarleyYieldPerYearF20) + set MiddlestreamF18-20HarvestFieldsList (list NumberofHarvestFieldsF18 NumberofHarvestFieldsF19 NumberofHarvestFieldsF20) + ifelse CompareOnceAYearF17-21 = true + [ + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + ;;nothing to change + set CompareOnceAYearF17-21 true + set ContinuousPoorYearNumberF17-21 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-20BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or one-of MiddlestreamF18-20BarleyYieldList > BarleyYieldPerYearF21 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 + [ + set CompareOnceAYearF17-21 false + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + ;;nothing to change + set CompareOnceAYearF17-21 true + set ContinuousPoorYearNumberF17-21 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-20BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or one-of MiddlestreamF18-20BarleyYieldList > BarleyYieldPerYearF21 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 + [ + set CompareOnceAYearF17-21 false + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pycor > 14 + [ + ;if NumberofHarvestFieldsF17 > one-of MiddlestreamF18-20HarvestFieldsList or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or one-of MiddlestreamF18-20HarvestFieldsList > NumberofHarvestFieldsF21 + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF20 > NumberofHarvestFieldsF21 + [ + set CompareOnceAYearF17-21 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + ] + [ + if CompareEveryTwoYearsF17-21 = true + [ + set ComparisonCountDownF17-21 (ComparisonCountDownF17-21 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReactionF17-21 + ] + ] + + if ComparisonCountDownF17-21 = 0 + [ + set ComparisonCountDownF17-21 (ComparisonTime + 1) + ;; for F17-21 + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + ;;nothing to change + set CompareOnceAYearF17-21 true + set ContinuousPoorYearNumberF17-21 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-20BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or one-of MiddlestreamF18-20BarleyYieldList > BarleyYieldPerYearF21 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 + [ + set CompareOnceAYearF17-21 false + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + ;;nothing to change + set CompareOnceAYearF17-21 true + set ContinuousPoorYearNumberF17-21 0 + ] + ] + ] + ] + ;if BarleyYieldPerYearF17 > one-of MiddlestreamF18-20BarleyYieldList or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or one-of MiddlestreamF18-20BarleyYieldList > BarleyYieldPerYearF21 + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 + [ + set CompareOnceAYearF17-21 false + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pycor > 14 + [ + ;if NumberofHarvestFieldsF17 > one-of MiddlestreamF18-20HarvestFieldsList or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or one-of MiddlestreamF18-20HarvestFieldsList > NumberofHarvestFieldsF21 + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF21 or + NumberofHarvestFieldsF20 > NumberofHarvestFieldsF21 + [ + set CompareOnceAYearF17-21 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-21 true ;; the procedure of comparing the harvest every two years + ;set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + ] + ] + if CompareEveryTwoYearsF17-21 = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownF17-21 (ComparisonCountDownF17-21 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberF17-21 (ContinuousPoorYearNumberF17-21 + 1) ;; record the number of times when poor year appears + SystemsReactionF17-21 + ] + ] + ] + ;;if there are F17-22 + ;;if there are F17-22 + if [pcolor] of patch 12 17 = red and [pcolor] of patch 10 17 != red + [ + ;;F17,18-UP; F19,20-MIDDLE; F21,22-DOWN + set UpstreamF17-18BarleyYieldList (list BarleyYieldPerYearF17 BarleyYieldPerYearF18) + set UpstreamF17-18HarvestFieldsList (list NumberofHarvestFieldsF17 NumberofHarvestFieldsF18) + set MiddlestreamF19-20BarleyYieldList (list BarleyYieldPerYearF19 BarleyYieldPerYearF20) + set MiddlestreamF19-20HarvestFieldsList (list NumberofHarvestFieldsF19 NumberofHarvestFieldsF20) + set DownstreamF21-22BarleyYieldList (list BarleyYieldPerYearF21 BarleyYieldPerYearF22) + set DownstreamF21-22HarvestFieldsList (list NumberofHarvestFieldsF21 NumberofHarvestFieldsF22) + ifelse CompareOnceAYearF17-22 = true + [ + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + if NumberofHarvestFieldsF21 = NumberofHarvestFieldsF22 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + if BarleyYieldPerYearF21 = BarleyYieldPerYearF22 + [ + ;;nothing to change + set CompareOnceAYearF17-22 true + set ContinuousPoorYearNumberF17-22 0 + ] + ] + ] + ] + ] + ;if one-of UpstreamF17-18BarleyYieldList > one-of MiddlestreamF19-20BarleyYieldList or one-of UpstreamF17-18BarleyYieldList > one-of DownstreamF21-22BarleyYieldList or one-of MiddlestreamF19-20BarleyYieldList > one-of DownstreamF21-22BarleyYieldList + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or BarleyYieldPerYearF17 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or BarleyYieldPerYearF18 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or BarleyYieldPerYearF19 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 or BarleyYieldPerYearF20 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF21 > BarleyYieldPerYearF22 + [ + set CompareOnceAYearF17-22 false + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + if NumberofHarvestFieldsF21 = NumberofHarvestFieldsF22 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + if BarleyYieldPerYearF21 = BarleyYieldPerYearF22 + [ + ;;nothing to change + set CompareOnceAYearF17-22 true + set ContinuousPoorYearNumberF17-22 0 + ] + ] + ] + ] + ] + ;if one-of UpstreamF17-18BarleyYieldList > one-of MiddlestreamF19-20BarleyYieldList or one-of UpstreamF17-18BarleyYieldList > one-of DownstreamF21-22BarleyYieldList or one-of MiddlestreamF19-20BarleyYieldList > one-of DownstreamF21-22BarleyYieldList + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or BarleyYieldPerYearF17 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or BarleyYieldPerYearF18 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or BarleyYieldPerYearF19 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 or BarleyYieldPerYearF20 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF21 > BarleyYieldPerYearF22 + [ + set CompareOnceAYearF17-22 false + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every 2/3/4... years + set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pycor > 14 + [ + ;if one-of UpstreamF17-18HarvestFieldsList > one-of MiddlestreamF19-20HarvestFieldsList or one-of UpstreamF17-18HarvestFieldsList > one-of DownstreamF21-22HarvestFieldsList or one-of MiddlestreamF19-20HarvestFieldsList > one-of DownstreamF21-22HarvestFieldsList + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF20 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF20 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF21 > NumberofHarvestFieldsF22 + [ + set CompareOnceAYearF17-22 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every two years + set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + ] + [ + if CompareEveryTwoYearsF17-22 = true + [ + set ComparisonCountDownF17-22 (ComparisonCountDownF17-22 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + SystemsReactionF17-22 + ] + ] + + if ComparisonCountDownF17-22 = 0 + [ + set ComparisonCountDownF17-22 (ComparisonTime + 1) + ;; for F17-22 + if pycor > 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor + 1)) = true or ([ReadyForBarley] of patch pxcor (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor + 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + if NumberofHarvestFieldsF21 = NumberofHarvestFieldsF22 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + if BarleyYieldPerYearF21 = BarleyYieldPerYearF22 + [ + ;;nothing to change + set CompareOnceAYearF17-22 true + set ContinuousPoorYearNumberF17-22 0 + ] + ] + ] + ] + ] + ;if one-of UpstreamF17-18BarleyYieldList > one-of MiddlestreamF19-20BarleyYieldList or one-of UpstreamF17-18BarleyYieldList > one-of DownstreamF21-22BarleyYieldList or one-of MiddlestreamF19-20BarleyYieldList > one-of DownstreamF21-22BarleyYieldList + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or BarleyYieldPerYearF17 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or BarleyYieldPerYearF18 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or BarleyYieldPerYearF19 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 or BarleyYieldPerYearF20 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF21 > BarleyYieldPerYearF22 + [ + set CompareOnceAYearF17-22 false + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + if pycor < 17 + [ + if ([ReadyForBarley] of patch (pxcor - 1) pycor) = true or ([ReadyForBarley] of patch (pxcor - 1) (pycor - 1)) = true or ([ReadyForBarley] of patch pxcor (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) (pycor - 1)) = true or ([ReadyForBarley] of patch (pxcor + 1) pycor) = true + [ + ;;farmers have the same number of harvested fields + if NumberofHarvestFieldsF17 = NumberofHarvestFieldsF18 + [ + if NumberofHarvestFieldsF18 = NumberofHarvestFieldsF19 + [ + if NumberofHarvestFieldsF19 = NumberofHarvestFieldsF20 + [ + if NumberofHarvestFieldsF20 = NumberofHarvestFieldsF21 + [ + if NumberofHarvestFieldsF21 = NumberofHarvestFieldsF22 + [ + ;; compare the yields of each farmer + if BarleyYieldPerYearF17 = BarleyYieldPerYearF18 + [ + if BarleyYieldPerYearF18 = BarleyYieldPerYearF19 + [ + if BarleyYieldPerYearF19 = BarleyYieldPerYearF20 + [ + if BarleyYieldPerYearF20 = BarleyYieldPerYearF21 + [ + if BarleyYieldPerYearF21 = BarleyYieldPerYearF22 + [ + ;;nothing to change + set CompareOnceAYearF17-22 true + set ContinuousPoorYearNumberF17-22 0 + ] + ] + ] + ] + ] + ;if one-of UpstreamF17-18BarleyYieldList > one-of MiddlestreamF19-20BarleyYieldList or one-of UpstreamF17-18BarleyYieldList > one-of DownstreamF21-22BarleyYieldList or one-of MiddlestreamF19-20BarleyYieldList > one-of DownstreamF21-22BarleyYieldList + if BarleyYieldPerYearF17 > BarleyYieldPerYearF18 or BarleyYieldPerYearF17 > BarleyYieldPerYearF19 or BarleyYieldPerYearF17 > BarleyYieldPerYearF20 or BarleyYieldPerYearF17 > BarleyYieldPerYearF21 or BarleyYieldPerYearF17 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF18 > BarleyYieldPerYearF19 or BarleyYieldPerYearF18 > BarleyYieldPerYearF20 or BarleyYieldPerYearF18 > BarleyYieldPerYearF21 or BarleyYieldPerYearF18 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF19 > BarleyYieldPerYearF20 or BarleyYieldPerYearF19 > BarleyYieldPerYearF21 or BarleyYieldPerYearF19 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF20 > BarleyYieldPerYearF21 or BarleyYieldPerYearF20 > BarleyYieldPerYearF22 or + BarleyYieldPerYearF21 > BarleyYieldPerYearF22 + [ + set CompareOnceAYearF17-22 false + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every 2/3/4... years + ;set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + ] + ] + ] + ] + ] + ] + ;;farmers have the different number of harvested fieds + if pycor > 14 + [ + ;if one-of UpstreamF17-18HarvestFieldsList > one-of MiddlestreamF19-20HarvestFieldsList or one-of UpstreamF17-18HarvestFieldsList > one-of DownstreamF21-22HarvestFieldsList or one-of MiddlestreamF19-20HarvestFieldsList > one-of DownstreamF21-22HarvestFieldsList + if NumberofHarvestFieldsF17 > NumberofHarvestFieldsF18 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF17 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF18 > NumberofHarvestFieldsF19 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF18 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF19 > NumberofHarvestFieldsF20 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF19 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF20 > NumberofHarvestFieldsF21 or NumberofHarvestFieldsF20 > NumberofHarvestFieldsF22 or + NumberofHarvestFieldsF21 > NumberofHarvestFieldsF22 + [ + set CompareOnceAYearF17-22 false ;; record the number of times when poor year appears + set CompareEveryTwoYearsF17-22 true ;; the procedure of comparing the harvest every two years + ;set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + ] + ] + if CompareEveryTwoYearsF17-22 = true ;; the procedure of comparing the harvest every two years + [ + set ComparisonCountDownF17-22 (ComparisonCountDownF17-22 - 1) ;; count down for the next comparison, 1,2,3,4,..,n year + set ContinuousPoorYearNumberF17-22 (ContinuousPoorYearNumberF17-22 + 1) ;; record the number of times when poor year appears + SystemsReactionF17-22 + ] + ] + ] + ] + ] +end + +to SystemsReactionF17-20 + if any? neighbors with [pcolor = red] + [ + ask neighbors with [pcolor = red] + [ + set ReadyforGCDecisionF17-20 true + ] + ] +end + +to SystemsReactionF17-21 + if any? neighbors with [pcolor = red] + [ + ask neighbors with [pcolor = red] + [ + set ReadyforGCDecisionF17-21 true + ] + ] +end + +to SystemsReactionF17-22 + if any? neighbors with [pcolor = red] + [ + ask neighbors with [pcolor = red] + [ + set ReadyforGCDecisionF17-22 true + ] + ] +end \ No newline at end of file diff --git a/FieldStorage.nls b/FieldStorage.nls new file mode 100644 index 0000000..d5192ef --- /dev/null +++ b/FieldStorage.nls @@ -0,0 +1,93 @@ +to FieldStorage + ask patches with [pcolor = grey] ;; ask the storage fields at the right side of the river + [ + set CurrentStorage (CurrentStorage + count RiverVolumes-here) + sprout-StorageVolumes (count RiverVolumes-here) + ask StorageVolumes-here + [ + set color blue + set size 0.5 + set heading 0 + ] + if ticks > 365 * (Year - 1) and ticks < 365 * Year + [ + set Landed (Landed + count RiverVolumes-here) + set Landed_Year Landed + ] + + ask RiverVolumes-here [die] ;; ask the river volumes on the storage patch to die, since they have been replaced by storage volumes + ] + + ask patches with [pcolor = red] ;; set the current storage value of the gated canal stretch to the value of the storage patch, so that it can check in a new round if the gate should let water through in case the storage patch is not full + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pxcor = 28 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 32 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 36 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 41 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 45 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 49 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor + 1))) + ] + if pxcor = 30 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1))) + ] + if pxcor = 34 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1))) + ] + if pxcor = 43 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1))) + ] + if pxcor = 47 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch pxcor (pycor - 1))) + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patches with [pcolor = red + 2] ;; set the current storage value of the gated canal stretch to the value of the storage patch, so that it can check in a new round if the gate should let water through in case the storage patch is not full + [ + if pycor = 13 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor)) + ] + if pycor = 11 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor)) + ] + if pycor = 9 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor)) + ] + if pycor = 7 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor)) + ] + if pycor = 5 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor - 1) pycor)) + ] + if pycor = 3 + [ + set CurrentStorage ([count StorageVolumes-here] of (patch (pxcor + 1) pycor)) + ] + ] +end diff --git a/GateCapacity.nls b/GateCapacity.nls new file mode 100644 index 0000000..c1508fe --- /dev/null +++ b/GateCapacity.nls @@ -0,0 +1,979 @@ +to GateCapacity + +end + +to GateCapacity_F1-10 ;; set the capacity of head gate and farmer's gate along the primary canal F1-10 + ask patches with [pcolor = red] ;; gates at the right side of the river + [ + if pxcor > 25 + [ + ifelse ReadyforGCDecision_PrimaryCanal = false + [ + ifelse pxcor = 26 ;; head gate + [ + ifelse QHeadGateLimit? = false + [ + ifelse ticks > 50 + [ + set QHeadGateMax (([IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 1) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 2) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 3) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 3) (pycor + 1)) + + ([IrrigationDemand] of patch (pxcor + 3) (pycor - 1)) + ([IrrigationDemand] of patch (pxcor + 3) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 4) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 5) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 5) (pycor - 1)) + + ([IrrigationDemand] of patch (pxcor + 5) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 5) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 6) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 7) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 7) (pycor + 1)) + + ([IrrigationDemand] of patch (pxcor + 7) (pycor - 1)) + ([IrrigationDemand] of patch (pxcor + 7) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 8) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 9) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 9) (pycor - 1)) + + ([IrrigationDemand] of patch (pxcor + 9) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 9) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 10) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 11) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 11) (pycor + 1)) + + ([IrrigationDemand] of patch (pxcor + 14) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 14) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 15) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 16) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 16) (pycor + 1)) + + ([IrrigationDemand] of patch (pxcor + 16) (pycor - 1)) + ([IrrigationDemand] of patch (pxcor + 16) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 17) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 18) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 18) (pycor - 1)) + + ([IrrigationDemand] of patch (pxcor + 18) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 18) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 19) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 20) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 20) (pycor + 1)) + + ([IrrigationDemand] of patch (pxcor + 20) (pycor - 1)) + ([IrrigationDemand] of patch (pxcor + 20) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 21) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 22) (pycor - 2)) + ([IrrigationDemand] of patch (pxcor + 22) (pycor - 1)) + + ([IrrigationDemand] of patch (pxcor + 22) (pycor + 1)) + ([IrrigationDemand] of patch (pxcor + 22) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 23) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 24) (pycor + 2)) + ([IrrigationDemand] of patch (pxcor + 24) (pycor + 1))) ;; if the head gate without limitation, set the gate capacity is the sum of irrigation wanter used per fields used + ] + [ + set QHeadGateMax QHeadGateMaxFixed + ] + ] + [ + set QHeadGateMax QHeadGateMaxFixed ;; if the head gate capacity is limited,set the capacity is QhgateMaxFixed + ] + ] + [ + ifelse QgateLimit? = false ;; farmers' gates + [ + ifelse ticks > 50 + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pxcor = 28 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 32 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 36 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 41 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 45 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 49 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 30 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 34 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 43 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor + 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor + 2) + [IrrigationDemand] of patch pxcor (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor + 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + if pxcor = 47 and pycor = 17 + [ + set QGateMax ([IrrigationDemand] of patch (pxcor - 1) (pycor - 1) + [IrrigationDemand] of patch (pxcor - 1) (pycor - 2) +[IrrigationDemand] of patch pxcor (pycor - 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor - 2) + [IrrigationDemand] of patch (pxcor + 1) (pycor - 1)) ;; if the gate without limitation, set gate capacity is the irrigation water used per field + ] + + ] + [ + set QGateMax QGateMaxFixed + ] + ] + [ + set QGateMax QGateMaxFixed ;; if the gate capacity is limited, set the capacity is QgateMaxFixed + ] + ] + ] + [ ;; if poor harvest situation,decrease upstream and middle stream gates + ifelse QGateMaxFixed > 30 + [ + if pxcor = 28 and pycor = 17;; Farmer1 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 30 and pycor = 17 ;; Farmer2 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 32 and pycor = 17 ;; Farmer3 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - ([ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 34 and pycor = 17 ;; Farmer4 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 36 and pycor = 17 ;; Farmer5 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 41 and pycor = 17 ;; Farmer6 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 43 and pycor = 17 ;; Farmer7 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberPrimary] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 45 and pycor = 17 ;; Farmer8 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + if pxcor = 47 and pycor = 17 ;; Farmer9 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor - 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + if pxcor = 49 and pycor = 17 ;; Farmer10 + [ + if [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownPrimary] of patch pxcor (pycor + 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] +] +end + +to GateCapacity_F11-13 ;; set the capacity of farmer's gate along the secondary canal F11-13 + ask patches with [pcolor = red + 2] ;; gates at the right side of the river + [ + if pycor < 15 + [ + ;; if there are farmer 11, 12, 13 + if [pcolor] of patch 38 9 = red + 2 and [pcolor] of patch 38 7 != red + 2 + [ + ifelse ReadyforGCDecision_SecondaryCanal = false + [ + if QgateLimit? = true + [ + set QGateMax QGateMaxFixed + ] + ] + [ + ifelse QGateMaxFixed > 30 + [ + if pxcor = 38 and pycor = 13 ;; Farmer11 + [ + if [ComparisonCountDownSecondary] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondary] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse QGateMaxFixed - ([ContinuousPoorYearNumberSecondary] of patch (pxcor - 1) pycor + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - ([ContinuousPoorYearNumberSecondary] of patch (pxcor - 1) pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF11_F13 QGateMax ;; record the GC of F11 to use as the initial GC of F11 when there is F14 + ] + if pxcor = 38 and pycor = 11 ;; Farmer12 + [ + if [ComparisonCountDownSecondary] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondary] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberSecondary] of patch (pxcor + 1) pycor * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberSecondary] of patch (pxcor + 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF12_F13 QGateMax ;; record the GC of F12 to use as the initial GC of F12 when there is F14 + ] + if pxcor = 38 and pycor = 9 ;; Farmer13 + [ + if [ComparisonCountDownSecondary] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondary] of patch (pxcor - 1) pycor < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF13_F13 QGateMax ;; record the GC of F13 to use as the initial GC of F13 when there is F14 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F11-14 ;; set the capacity of farmer's gate along the secondary canal F11-14 + ask patches with [pcolor = red + 2] ;; gates at the right side of the river + [ + if pycor < 15 + [ + ;; if there are farmer 11, 12, 13, 14 + if [pcolor] of patch 38 7 = red + 2 and [pcolor] of patch 38 5 != red + 2 + [ + ifelse ReadyforGCDecision_SecondaryCanalF11-14 = false + [ + if QgateLimit? = true + [ + if pxcor = 38 and pycor = 13 + [ + set QGateMax GCF11_F13 + ] + if pxcor = 38 and pycor = 11 + [ + set QGateMax GCF12_F13 + ] + if pxcor = 38 and pycor = 9 + [ + set QGateMax GCF13_F13 + ] + ] + ] + [ + if pxcor = 38 and pycor = 13 ;; Farmer11-up + [ + if [ComparisonCountDownSecondaryF11-14] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-14] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF11_F13 - ([ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor - 1) pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF11_F13 - ([ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor - 1) pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF11_F14 QGateMax ;; record the GC of F11 to use as the initial GC of F11 when there is F15 + ] + if pxcor = 38 and pycor = 11 ;; Farmer12-middle + [ + if [ComparisonCountDownSecondaryF11-14] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-14] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse GCF12_F13 - [ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor + 1) pycor * 10 >= 30 + [ + set QGateMax (GCF12_F13 - [ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor + 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF12_F14 QGateMax ;; record the GC of F12 to use as the initial GC of F11 when there is F15 + ] + if pxcor = 38 and pycor = 9 ;; Farmer13-middle + [ + if [ComparisonCountDownSecondaryF11-14] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-14] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF13_F13 - [ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor - 1) pycor * 10 >= 30 + [ + set QGateMax (GCF13_F13 - [ContinuousPoorYearNumberSecondaryF11-14] of patch (pxcor - 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF13_F14 QGateMax ;; record the GC of F13 to use as the initial GC of F13 when there is F15 + ] + + ifelse QGateMaxFixed > 30 + [ + if pxcor = 38 and pycor = 7 ;; Farmer14-down + [ + if [ComparisonCountDownSecondaryF11-14] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-14] of patch (pxcor + 1) pycor < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF14_F14 QGateMax ;; record the GC of F14 to use as the initial GC of F14 when there is F15 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F11-15 ;; set the capacity of farmer's gate along the secondary canal F11-15 + ask patches with [pcolor = red + 2] ;; gates at the right side of the river + [ + if pycor < 15 + [ + ;; if there are farmer 11, 12, 13, 14, 15 + if [pcolor] of patch 38 5 = red + 2 and [pcolor] of patch 38 3 != red + 2 + [ + ifelse ReadyforGCDecision_SecondaryCanalF11-15 = false + [ + if QgateLimit? = true + [ + if pxcor = 38 and pycor = 13 + [ + set QGateMax GCF11_F14 + ] + if pxcor = 38 and pycor = 11 + [ + set QGateMax GCF12_F14 + ] + if pxcor = 38 and pycor = 9 + [ + set QGateMax GCF13_F14 + ] + if pxcor = 38 and pycor = 7 + [ + set QGateMax GCF14_F14 + ] + ] + ] + [ + if pxcor = 38 and pycor = 13 ;; Farmer11-up + [ + if [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF11_F14 - ([ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor - 1) pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF11_F14 - ([ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor - 1) pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF11_F15 QGateMax ;; record the GC of F11 to use as the initial GC of F11 when there is F16 + ] + if pxcor = 38 and pycor = 11 ;; Farmer12-middle + [ + if [ComparisonCountDownSecondaryF11-15] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-15] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse GCF12_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor + 1) pycor * 10 >= 30 + [ + set QGateMax (GCF12_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor + 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF12_F15 QGateMax ;; record the GC of F12 to use as the initial GC of F13 when there is F16 + ] + if pxcor = 38 and pycor = 9 ;; Farmer13-middle + [ + if [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF13_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor - 1) pycor * 10 >= 30 + [ + set QGateMax (GCF13_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor - 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF13_F15 QGateMax ;; record the GC of F13 to use as the initial GC of F13 when there is F16 + ] + if pxcor = 38 and pycor = 7 ;; Farmer14-middle + [ + if [ComparisonCountDownSecondaryF11-15] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-15] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse GCF14_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor + 1) pycor * 10 >= 30 + [ + set QGateMax (GCF14_F14 - [ContinuousPoorYearNumberSecondaryF11-15] of patch (pxcor + 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF14_F15 QGateMax ;; record the GC of F14 to use as the initial GC of F14 when there is F16 + ] + ifelse QGateMaxFixed > 30 + [ + if pxcor = 38 and pycor = 5 ;; Farmer15-down + [ + if [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-15] of patch (pxcor - 1) pycor < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF15_F15 QGateMax ;; record the GC of F15 to use as the initial GC of F15 when there is F16 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F11-16 ;; set the capacity of farmer's gate along the secondary canal F11-16 + ask patches with [pcolor = red + 2] ;; gates at the right side of the river + [ + if pycor < 15 + [ + ;; if there are farmer 11, 12, 13, 14, 15, 16 + if [pcolor] of patch 38 3 = red + 2 + [ + ifelse ReadyforGCDecision_SecondaryCanalF11-16 = false + [ + if QgateLimit? = true + [ + if pxcor = 38 and pycor = 13 + [ + set QGateMax GCF11_F15 + ] + if pxcor = 38 and pycor = 11 + [ + set QGateMax GCF12_F15 + ] + if pxcor = 38 and pycor = 9 + [ + set QGateMax GCF13_F15 + ] + if pxcor = 38 and pycor = 7 + [ + set QGateMax GCF14_F15 + ] + if pxcor = 38 and pycor = 5 + [ + set QGateMax GCF15_F15 + ] + ] + ] + [ + if pxcor = 38 and pycor = 13 ;; Farmer11-up + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF11_F15 - ([ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor - 1) pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF11_F15 - ([ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor - 1) pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 38 and pycor = 11 ;; Farmer12-up + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse GCF12_F15 - ([ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor + 1) pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF12_F15 - ([ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor + 1) pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 38 and pycor = 9 ;; Farmer13-middle + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor < ComparisonTime + [ + ifelse GCF13_F15 - [ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor - 1) pycor * 10 >= 30 + [ + set QGateMax (GCF13_F15 - [ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor - 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 38 and pycor = 7 ;; Farmer14-middle + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor < ComparisonTime + [ + ifelse GCF14_F15 - [ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor + 1) pycor * 10 >= 30 + [ + set QGateMax (GCF14_F15 - [ContinuousPoorYearNumberSecondaryF11-16] of patch (pxcor + 1) pycor * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + ifelse QGateMaxFixed > 30 + [ + if pxcor = 38 and pycor = 5 ;; Farmer15-down + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor - 1) pycor < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + if pxcor = 38 and pycor = 3 ;; Farmer16-down + [ + if [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor > 0 and [ComparisonCountDownSecondaryF11-16] of patch (pxcor + 1) pycor < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F17-19 ;; set the capacity of farmer's gate along the 2nd Primary Canal F17-19 + ask patches with [pcolor = red] ;; gates at the right side of the river + [ + if pxcor < 25 + [ + ;; if there are farmer 17, 18, 19 + if [pcolor] of patch 18 17 = red and [pcolor] of patch 16 17 != red + [ + ifelse ReadyforGCDecisionF17-19 = false + [ + if QgateLimit? = true + [ + if pxcor = 22 and pycor = 17 ;; Farmer17 + [ + set QGateMax QGateMaxFixed + set GCF17_F19 QGateMax + ] + if pxcor = 20 and pycor = 17 ;; Farmer18 + [ + set QGateMax QGateMaxFixed + set GCF18_F19 QGateMax + ] + if pxcor = 18 and pycor = 17 ;; Farmer19 + [ + set QGateMax QGateMaxFixed + set GCF19_F19 QGateMax + ] + ] + ] + [ + ifelse QGateMaxFixed > 30 + [ + if pxcor = 22 and pycor = 17 ;; Farmer17 + [ + if [ComparisonCountDownF17-19] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-19] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse QGateMaxFixed - ([ContinuousPoorYearNumberF17-19] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - ([ContinuousPoorYearNumberF17-19] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF17_F19 QGateMax ;; record the GC of F17 to use as the initial GC of F17 when there is F20 + ] + if pxcor = 20 and pycor = 17 ;; Farmer18 + [ + if [ComparisonCountDownF17-19] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-19] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse QGateMaxFixed - [ContinuousPoorYearNumberF17-19] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (QGateMaxFixed - [ContinuousPoorYearNumberF17-19] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF18_F19 QGateMax ;; record the GC of F18 to use as the initial GC of F18 when there is F20 + ] + if pxcor = 18 and pycor = 17 ;; Farmer19 + [ + if [ComparisonCountDownF17-19] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-19] of patch pxcor (pycor + 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF19_F19 QGateMax ;; record the GC of F19 to use as the initial GC of F19 when there is F20 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F17-20 ;; set the capacity of farmer's gate along the 2nd Primary canal F1 + ask patches with [pcolor = red] ;; gates at the right side of the river + [ + if pxcor < 25 + [ + ;; if there are F17-20 + if [pcolor] of patch 16 17 = red and [pcolor] of patch 14 17 != red + [ + ifelse ReadyforGCDecisionF17-20 = false + [ + if QgateLimit? = true + [ + if pxcor = 22 and pycor = 17 + [ + set QGateMax GCF17_F19 + ] + if pxcor = 20 and pycor = 17 + [ + set QGateMax GCF18_F19 + ] + if pxcor = 18 and pycor = 17 + [ + set QGateMax GCF19_F19 + ] + ] + ] + [ + if pxcor = 22 and pycor = 17 ;; Farmer17-up + [ + if [ComparisonCountDownF17-20] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-20] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF17_F19 - ([ContinuousPoorYearNumberF17-20] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (GCF17_F19 - ([ContinuousPoorYearNumberF17-20] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF17_F20 QGateMax ;; record the GC of F17 to use as the initial GC of F17 when there is F21 + ] + if pxcor = 20 and pycor = 17 ;; Farmer18-middle + [ + if [ComparisonCountDownF17-20] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-20] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse GCF18_F19 - [ContinuousPoorYearNumberF17-20] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (GCF18_F19 - [ContinuousPoorYearNumberF17-20] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF18_F20 QGateMax ;; record the GC of F18 to use as the initial GC of F18 when there is F21 + ] + if pxcor = 18 and pycor = 17 ;; Farmer19-middle + [ + if [ComparisonCountDownF17-20] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-20] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF19_F19 - [ContinuousPoorYearNumberF17-20] of patch pxcor (pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF19_F19 - [ContinuousPoorYearNumberF17-20] of patch pxcor (pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF19_F20 QGateMax ;; record the GC of F19 to use as the initial GC of F19 when there is F21 + ] + + ifelse QGateMaxFixed > 30 + [ + if pxcor = 16 and pycor = 17 ;; Farmer20-down + [ + if [ComparisonCountDownF17-20] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-20] of patch pxcor (pycor - 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF20_F20 QGateMax ;; record the GC of F20 to use as the initial GC of F20 when there is F21 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F17-21 + ask patches with [pcolor = red] ;; gates at the right side of the river + [ + if pxcor < 25 + [ + ;; if there are F17-21 + if [pcolor] of patch 14 17 = red and [pcolor] of patch 12 17 != red + [ + ifelse ReadyforGCDecisionF17-21 = false + [ + if QgateLimit? = true + [ + if pxcor = 22 and pycor = 17 + [ + set QGateMax GCF17_F20 + ] + if pxcor = 20 and pycor = 17 + [ + set QGateMax GCF18_F20 + ] + if pxcor = 18 and pycor = 17 + [ + set QGateMax GCF19_F20 + ] + if pxcor = 16 and pycor = 17 + [ + set QGateMax GCF20_F20 + ] + ] + ] + [ + if pxcor = 22 and pycor = 17 ;; Farmer17-up + [ + if [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF17_F20 - ([ContinuousPoorYearNumberF17-21] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (GCF17_F20 - ([ContinuousPoorYearNumberF17-21] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF17_F21 QGateMax ;; record the GC of F17 to use as the initial GC of F17 when there is F22 + ] + if pxcor = 20 and pycor = 17 ;; Farmer18-middle + [ + if [ComparisonCountDownF17-21] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-21] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse GCF18_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (GCF18_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF18_F21 QGateMax ;; record the GC of F18 to use as the initial GC of F18 when there is F22 + ] + if pxcor = 18 and pycor = 17 ;; Farmer19-middle + [ + if [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF19_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF19_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF19_F21 QGateMax ;; record the GC of F19 to use as the initial GC of F19 when there is F22 + ] + if pxcor = 16 and pycor = 17 ;; Farmer20-middle + [ + if [ComparisonCountDownF17-21] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-21] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse GCF20_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (GCF20_F20 - [ContinuousPoorYearNumberF17-21] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + set GCF20_F21 QGateMax ;; record the GC of F20 to use as the initial GC of F18 when there is F22 + ] + + ifelse QGateMaxFixed > 30 + [ + if pxcor = 14 and pycor = 17 ;; Farmer21-down + [ + if [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-21] of patch pxcor (pycor + 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + set GCF21_F21 QGateMax ;; record the GC of F21 to use as the initial GC of F20 when there is F22 + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end + +to GateCapacity_F17-22 + ask patches with [pcolor = red] ;; gates at the right side of the river + [ + if pxcor < 25 + [ + ;; if there are farmer 17, 18, 19, 20, 21, 22 + if [pcolor] of patch 12 17 = red + [ + ifelse ReadyforGCDecisionF17-22 = false + [ + if QgateLimit? = true + [ + if pxcor = 22 and pycor = 17 + [ + set QGateMax GCF17_F21 + ] + if pxcor = 20 and pycor = 17 + [ + set QGateMax GCF18_F21 + ] + if pxcor = 18 and pycor = 17 + [ + set QGateMax GCF19_F21 + ] + if pxcor = 16 and pycor = 17 + [ + set QGateMax GCF20_F21 + ] + if pxcor = 14 and pycor = 17 + [ + set QGateMax GCF21_F21 + ] + ] + ] + [ + if pxcor = 22 and pycor = 17 ;; Farmer17-up + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF17_F21 - ([ContinuousPoorYearNumberF17-22] of patch pxcor (pycor + 1) + 1) * 10 >= 30 + [ + set QGateMax (GCF17_F21 - ([ContinuousPoorYearNumberF17-22] of patch pxcor (pycor + 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 20 and pycor = 17 ;; Farmer18-up + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse GCF18_F21 - ([ContinuousPoorYearNumberF17-22] of patch pxcor (pycor - 1) + 1) * 10 >= 30 + [ + set QGateMax (GCF18_F21 - ([ContinuousPoorYearNumberF17-22] of patch pxcor (pycor - 1) + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 18 and pycor = 17 ;; Farmer19-middle + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) < ComparisonTime + [ + ifelse GCF19_F21 - [ContinuousPoorYearNumberF17-22] of patch pxcor (pycor + 1) * 10 >= 30 + [ + set QGateMax (GCF19_F21 - [ContinuousPoorYearNumberF17-22] of patch pxcor (pycor + 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + if pxcor = 16 and pycor = 17 ;; Farmer20-middle + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) < ComparisonTime + [ + ifelse GCF20_F21 - [ContinuousPoorYearNumberF17-22] of patch pxcor (pycor - 1) * 10 >= 30 + [ + set QGateMax (GCF20_F21 - [ContinuousPoorYearNumberF17-22] of patch pxcor (pycor - 1) * 10) + ] + [ + set QGateMax 30 + ] + ] + ] + ifelse QGateMaxFixed > 30 + [ + if pxcor = 14 and pycor = 17 ;; Farmer21-down + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor + 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + if pxcor = 12 and pycor = 17 ;; Farmer22-down + [ + if [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) > 0 and [ComparisonCountDownF17-22] of patch pxcor (pycor - 1) < ComparisonTime + [ + set QGateMax QGateMaxFixed + ] + ] + ] + [ + set QGateMax QGateMaxFixed + ] + ] + ] + ] + ] +end diff --git a/HarvestMemory.nls b/HarvestMemory.nls new file mode 100644 index 0000000..c3a1bda --- /dev/null +++ b/HarvestMemory.nls @@ -0,0 +1,5585 @@ +to HarvestMemory ;; set the barley harvest to each farmer + ask patches with [LandType = 1] ;; ask fallow pathces + [ + if FallowCountDown = 2 + [ + if pxcor > 25 and pycor > 14 ;; the primary canal + [ + if ticks > 365 * 0 and ticks <= 365 * 1 + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * 1 and ticks <= 365 * 2 + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * 2 and ticks <= 365 * 3 + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * 3 and ticks <= 365 * 4 + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * 4 and ticks <= 365 * 5 + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * 5 and ticks <= 365 * 6 + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * 6 and ticks <= 365 * 7 + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * 7 and ticks <= 365 * 8 + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * 8 and ticks <= 365 * 9 + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * 9 and ticks <= 365 * 10 + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 10 and ticks <= 365 * 11 + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 11 and ticks <= 365 * 12 + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 12 and ticks <= 365 * 13 + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 13 and ticks <= 365 * 14 + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 14 and ticks <= 365 * 15 + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 15 and ticks <= 365 * 16 + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 16 and ticks <= 365 * 17 + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 17 and ticks <= 365 * 18 + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 18 and ticks <= 365 * 19 + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 19 and ticks <= 365 * 20 + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 20 and ticks <= 365 * 21 + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 21 and ticks <= 365 * 22 + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 22 and ticks <= 365 * 23 + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 23 and ticks <= 365 * 24 + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 24 and ticks <= 365 * 25 + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 25 and ticks <= 365 * 26 + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 26 and ticks <= 365 * 27 + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 27 and ticks <= 365 * 28 + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 28 and ticks <= 365 * 29 + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 29 and ticks <= 365 * 30 + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 30 and ticks <= 365 * 31 + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 31 and ticks <= 365 * 32 + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 32 and ticks <= 365 * 33 + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 33 and ticks <= 365 * 34 + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 34 and ticks <= 365 * 35 + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 35 and ticks <= 365 * 36 + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 36 and ticks <= 365 * 37 + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 37 and ticks <= 365 * 38 + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 38 and ticks <= 365 * 39 + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 39 and ticks <= 365 * 40 + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 40 and ticks <= 365 * 41 + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 41 and ticks <= 365 * 42 + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 42 and ticks <= 365 * 43 + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 43 and ticks <= 365 * 44 + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 44 and ticks <= 365 * 45 + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 45 and ticks <= 365 * 46 + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 46 and ticks <= 365 * 47 + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 47 and ticks <= 365 * 48 + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 48 and ticks <= 365 * 49 + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 49 and ticks <= 365 * 50 + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 50 and ticks <= 365 * 51 + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 51 and ticks <= 365 * 52 + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 52 and ticks <= 365 * 53 + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 53 and ticks <= 365 * 54 + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 54 and ticks <= 365 * 55 + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 55 and ticks <= 365 * 56 + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 56 and ticks <= 365 * 57 + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 57 and ticks <= 365 * 58 + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 58 and ticks <= 365 * 59 + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 59 and ticks <= 365 * 60 + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 60 and ticks <= 365 * 61 + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 61 and ticks <= 365 * 62 + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 62 and ticks <= 365 * 63 + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 63 and ticks <= 365 * 64 + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 64 and ticks <= 365 * 65 + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 65 and ticks <= 365 * 66 + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 66 and ticks <= 365 * 67 + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 67 and ticks <= 365 * 68 + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 68 and ticks <= 365 * 69 + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 69 and ticks <= 365 * 70 + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 70 and ticks <= 365 * 71 + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 71 and ticks <= 365 * 72 + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 72 and ticks <= 365 * 73 + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 73 and ticks <= 365 * 74 + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 74 and ticks <= 365 * 75 + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 75 and ticks <= 365 * 76 + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 76 and ticks <= 365 * 77 + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 77 and ticks <= 365 * 78 + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 78 and ticks <= 365 * 79 + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 79 and ticks <= 365 * 80 + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 80 and ticks <= 365 * 81 + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 81 and ticks <= 365 * 82 + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 82 and ticks <= 365 * 83 + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 83 and ticks <= 365 * 84 + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 84 and ticks <= 365 * 85 + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 85 and ticks <= 365 * 86 + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 86 and ticks <= 365 * 87 + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 87 and ticks <= 365 * 88 + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 88 and ticks <= 365 * 89 + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 89 and ticks <= 365 * 90 + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 90 and ticks <= 365 * 91 + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 91 and ticks <= 365 * 92 + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 92 and ticks <= 365 * 93 + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 93 and ticks <= 365 * 94 + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 94 and ticks <= 365 * 95 + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 95 and ticks <= 365 * 96 + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 96 and ticks <= 365 * 97 + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 97 and ticks <= 365 * 98 + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 98 and ticks <= 365 * 99 + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * 99 and ticks <= 365 * 100 + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ] + ];;;FallowCountDown = 2 + + if pycor < 15 ;; the seconday canal, strat at the 21th year + [ + ;if [pcolor] of patch 38 7 != red + 1 + if [pcolor] of patch 38 7 != 4 + [ + if F11NeverWithBarley? = True + [ + if [LandType] of patch 37 13 != 4 + [ + set F11NeverWithBarley? False + ] + ] + if F11NeverWithBarley? = False + [ + set CountDownBarleyF11 (CountDownBarleyF11 - 1) + if CountDownBarleyF11 > 360 and CountDownBarleyF11 < 365 + [ + set TheFirstHarvestYearF11 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF11 + 0) and ticks <= 365 * (TheFirstHarvestYearF11 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 1) and ticks <= 365 * (TheFirstHarvestYearF11 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 2) and ticks <= 365 * (TheFirstHarvestYearF11 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 3) and ticks <= 365 * (TheFirstHarvestYearF11 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 4) and ticks <= 365 * (TheFirstHarvestYearF11 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 5) and ticks <= 365 * (TheFirstHarvestYearF11 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 6) and ticks <= 365 * (TheFirstHarvestYearF11 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 7) and ticks <= 365 * (TheFirstHarvestYearF11 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 8) and ticks <= 365 * (TheFirstHarvestYearF11 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 9) and ticks <= 365 * (TheFirstHarvestYearF11 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 10) and ticks <= 365 * (TheFirstHarvestYearF11 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 11) and ticks <= 365 * (TheFirstHarvestYearF11 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 12) and ticks <= 365 * (TheFirstHarvestYearF11 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 13) and ticks <= 365 * (TheFirstHarvestYearF11 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 14) and ticks <= 365 * (TheFirstHarvestYearF11 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 15) and ticks <= 365 * (TheFirstHarvestYearF11 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 16) and ticks <= 365 * (TheFirstHarvestYearF11 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 17) and ticks <= 365 * (TheFirstHarvestYearF11 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 18) and ticks <= 365 * (TheFirstHarvestYearF11 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 19) and ticks <= 365 * (TheFirstHarvestYearF11 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 20) and ticks <= 365 * (TheFirstHarvestYearF11 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 21) and ticks <= 365 * (TheFirstHarvestYearF11 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 22) and ticks <= 365 * (TheFirstHarvestYearF11 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 23) and ticks <= 365 * (TheFirstHarvestYearF11 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 24) and ticks <= 365 * (TheFirstHarvestYearF11 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 25) and ticks <= 365 * (TheFirstHarvestYearF11 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 26) and ticks <= 365 * (TheFirstHarvestYearF11 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 27) and ticks <= 365 * (TheFirstHarvestYearF11 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 28) and ticks <= 365 * (TheFirstHarvestYearF11 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 29) and ticks <= 365 * (TheFirstHarvestYearF11 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 30) and ticks <= 365 * (TheFirstHarvestYearF11 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 31) and ticks <= 365 * (TheFirstHarvestYearF11 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 32) and ticks <= 365 * (TheFirstHarvestYearF11 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 33) and ticks <= 365 * (TheFirstHarvestYearF11 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 34) and ticks <= 365 * (TheFirstHarvestYearF11 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 35) and ticks <= 365 * (TheFirstHarvestYearF11 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 36) and ticks <= 365 * (TheFirstHarvestYearF11 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 37) and ticks <= 365 * (TheFirstHarvestYearF11 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 38) and ticks <= 365 * (TheFirstHarvestYearF11 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 39) and ticks <= 365 * (TheFirstHarvestYearF11 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 40) and ticks <= 365 * (TheFirstHarvestYearF11 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 41) and ticks <= 365 * (TheFirstHarvestYearF11 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 42) and ticks <= 365 * (TheFirstHarvestYearF11 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 43) and ticks <= 365 * (TheFirstHarvestYearF11 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 44) and ticks <= 365 * (TheFirstHarvestYearF11 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 45) and ticks <= 365 * (TheFirstHarvestYearF11 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 46) and ticks <= 365 * (TheFirstHarvestYearF11 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 47) and ticks <= 365 * (TheFirstHarvestYearF11 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 48) and ticks <= 365 * (TheFirstHarvestYearF11 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 49) and ticks <= 365 * (TheFirstHarvestYearF11 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 50) and ticks <= 365 * (TheFirstHarvestYearF11 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 51) and ticks <= 365 * (TheFirstHarvestYearF11 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 52) and ticks <= 365 * (TheFirstHarvestYearF11 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 53) and ticks <= 365 * (TheFirstHarvestYearF11 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 54) and ticks <= 365 * (TheFirstHarvestYearF11 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 55) and ticks <= 365 * (TheFirstHarvestYearF11 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 56) and ticks <= 365 * (TheFirstHarvestYearF11 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 57) and ticks <= 365 * (TheFirstHarvestYearF11 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 58) and ticks <= 365 * (TheFirstHarvestYearF11 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 59) and ticks <= 365 * (TheFirstHarvestYearF11 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 60) and ticks <= 365 * (TheFirstHarvestYearF11 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 61) and ticks <= 365 * (TheFirstHarvestYearF11 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 62) and ticks <= 365 * (TheFirstHarvestYearF11 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 63) and ticks <= 365 * (TheFirstHarvestYearF11 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 64) and ticks <= 365 * (TheFirstHarvestYearF11 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 65) and ticks <= 365 * (TheFirstHarvestYearF11 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 66) and ticks <= 365 * (TheFirstHarvestYearF11 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 67) and ticks <= 365 * (TheFirstHarvestYearF11 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 68) and ticks <= 365 * (TheFirstHarvestYearF11 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 69) and ticks <= 365 * (TheFirstHarvestYearF11 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 70) and ticks <= 365 * (TheFirstHarvestYearF11 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 71) and ticks <= 365 * (TheFirstHarvestYearF11 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 72) and ticks <= 365 * (TheFirstHarvestYearF11 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 73) and ticks <= 365 * (TheFirstHarvestYearF11 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 74) and ticks <= 365 * (TheFirstHarvestYearF11 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 75) and ticks <= 365 * (TheFirstHarvestYearF11 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 76) and ticks <= 365 * (TheFirstHarvestYearF11 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 77) and ticks <= 365 * (TheFirstHarvestYearF11 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 78) and ticks <= 365 * (TheFirstHarvestYearF11 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 79) and ticks <= 365 * (TheFirstHarvestYearF11 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 80) and ticks <= 365 * (TheFirstHarvestYearF11 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 81) and ticks <= 365 * (TheFirstHarvestYearF11 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 82) and ticks <= 365 * (TheFirstHarvestYearF11 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 83) and ticks <= 365 * (TheFirstHarvestYearF11 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 4) and ticks <= 365 * (TheFirstHarvestYearF11 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 85) and ticks <= 365 * (TheFirstHarvestYearF11 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 86) and ticks <= 365 * (TheFirstHarvestYearF11 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 87) and ticks <= 365 * (TheFirstHarvestYearF11 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 88) and ticks <= 365 * (TheFirstHarvestYearF11 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 89) and ticks <= 365 * (TheFirstHarvestYearF11 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 90) and ticks <= 365 * (TheFirstHarvestYearF11 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 91) and ticks <= 365 * (TheFirstHarvestYearF11 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 92) and ticks <= 365 * (TheFirstHarvestYearF11 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 93) and ticks <= 365 * (TheFirstHarvestYearF11 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 94) and ticks <= 365 * (TheFirstHarvestYearF11 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 95) and ticks <= 365 * (TheFirstHarvestYearF11 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 96) and ticks <= 365 * (TheFirstHarvestYearF11 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 97) and ticks <= 365 * (TheFirstHarvestYearF11 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 98) and ticks <= 365 * (TheFirstHarvestYearF11 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF11 + 99) and ticks <= 365 * (TheFirstHarvestYearF11 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;;FallowCountDown = 2 + ] + ] +;;;;;F14 + if pxcor > 38 and pxcor < 41 and pycor > 5 and pycor < 9 + [ + if F14NeverWithBarley? = True + [ + if [LandType] of patch 38 7 != 4 ;;gate patch of F14 + [ + set F14NeverWithBarley? False + ] + ] + if F14NeverWithBarley? = False + [ + set CountDownBarleyF14 (CountDownBarleyF14 - 1) + if CountDownBarleyF14 > 360 and CountDownBarleyF14 < 365 + [ + set TheFirstHarvestYearF14 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF14 + 0) and ticks <= 365 * (TheFirstHarvestYearF14 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 1) and ticks <= 365 * (TheFirstHarvestYearF14 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 2) and ticks <= 365 * (TheFirstHarvestYearF14 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 3) and ticks <= 365 * (TheFirstHarvestYearF14 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 4) and ticks <= 365 * (TheFirstHarvestYearF14 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 5) and ticks <= 365 * (TheFirstHarvestYearF14 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 6) and ticks <= 365 * (TheFirstHarvestYearF14 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 7) and ticks <= 365 * (TheFirstHarvestYearF14 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 8) and ticks <= 365 * (TheFirstHarvestYearF14 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 9) and ticks <= 365 * (TheFirstHarvestYearF14 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 10) and ticks <= 365 * (TheFirstHarvestYearF14 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 11) and ticks <= 365 * (TheFirstHarvestYearF14 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 12) and ticks <= 365 * (TheFirstHarvestYearF14 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 13) and ticks <= 365 * (TheFirstHarvestYearF14 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 14) and ticks <= 365 * (TheFirstHarvestYearF14 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 15) and ticks <= 365 * (TheFirstHarvestYearF14 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 16) and ticks <= 365 * (TheFirstHarvestYearF14 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 17) and ticks <= 365 * (TheFirstHarvestYearF14 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 18) and ticks <= 365 * (TheFirstHarvestYearF14 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 19) and ticks <= 365 * (TheFirstHarvestYearF14 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 20) and ticks <= 365 * (TheFirstHarvestYearF14 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 21) and ticks <= 365 * (TheFirstHarvestYearF14 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 22) and ticks <= 365 * (TheFirstHarvestYearF14 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 23) and ticks <= 365 * (TheFirstHarvestYearF14 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 24) and ticks <= 365 * (TheFirstHarvestYearF14 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 25) and ticks <= 365 * (TheFirstHarvestYearF14 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 26) and ticks <= 365 * (TheFirstHarvestYearF14 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 27) and ticks <= 365 * (TheFirstHarvestYearF14 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 28) and ticks <= 365 * (TheFirstHarvestYearF14 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 29) and ticks <= 365 * (TheFirstHarvestYearF14 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 30) and ticks <= 365 * (TheFirstHarvestYearF14 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 31) and ticks <= 365 * (TheFirstHarvestYearF14 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 32) and ticks <= 365 * (TheFirstHarvestYearF14 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 33) and ticks <= 365 * (TheFirstHarvestYearF14 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 34) and ticks <= 365 * (TheFirstHarvestYearF14 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 35) and ticks <= 365 * (TheFirstHarvestYearF14 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 36) and ticks <= 365 * (TheFirstHarvestYearF14 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 37) and ticks <= 365 * (TheFirstHarvestYearF14 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 38) and ticks <= 365 * (TheFirstHarvestYearF14 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 39) and ticks <= 365 * (TheFirstHarvestYearF14 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 40) and ticks <= 365 * (TheFirstHarvestYearF14 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 41) and ticks <= 365 * (TheFirstHarvestYearF14 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 42) and ticks <= 365 * (TheFirstHarvestYearF14 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 43) and ticks <= 365 * (TheFirstHarvestYearF14 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 44) and ticks <= 365 * (TheFirstHarvestYearF14 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 45) and ticks <= 365 * (TheFirstHarvestYearF14 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 46) and ticks <= 365 * (TheFirstHarvestYearF14 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 47) and ticks <= 365 * (TheFirstHarvestYearF14 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 48) and ticks <= 365 * (TheFirstHarvestYearF14 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 49) and ticks <= 365 * (TheFirstHarvestYearF14 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 50) and ticks <= 365 * (TheFirstHarvestYearF14 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 51) and ticks <= 365 * (TheFirstHarvestYearF14 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 52) and ticks <= 365 * (TheFirstHarvestYearF14 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 53) and ticks <= 365 * (TheFirstHarvestYearF14 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 54) and ticks <= 365 * (TheFirstHarvestYearF14 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 55) and ticks <= 365 * (TheFirstHarvestYearF14 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 56) and ticks <= 365 * (TheFirstHarvestYearF14 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 57) and ticks <= 365 * (TheFirstHarvestYearF14 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 58) and ticks <= 365 * (TheFirstHarvestYearF14 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 59) and ticks <= 365 * (TheFirstHarvestYearF14 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 60) and ticks <= 365 * (TheFirstHarvestYearF14 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 61) and ticks <= 365 * (TheFirstHarvestYearF14 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 62) and ticks <= 365 * (TheFirstHarvestYearF14 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 63) and ticks <= 365 * (TheFirstHarvestYearF14 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 64) and ticks <= 365 * (TheFirstHarvestYearF14 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 65) and ticks <= 365 * (TheFirstHarvestYearF14 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 66) and ticks <= 365 * (TheFirstHarvestYearF14 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 67) and ticks <= 365 * (TheFirstHarvestYearF14 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 68) and ticks <= 365 * (TheFirstHarvestYearF14 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 69) and ticks <= 365 * (TheFirstHarvestYearF14 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 70) and ticks <= 365 * (TheFirstHarvestYearF14 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 71) and ticks <= 365 * (TheFirstHarvestYearF14 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 72) and ticks <= 365 * (TheFirstHarvestYearF14 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 73) and ticks <= 365 * (TheFirstHarvestYearF14 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 74) and ticks <= 365 * (TheFirstHarvestYearF14 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 75) and ticks <= 365 * (TheFirstHarvestYearF14 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 76) and ticks <= 365 * (TheFirstHarvestYearF14 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 77) and ticks <= 365 * (TheFirstHarvestYearF14 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 78) and ticks <= 365 * (TheFirstHarvestYearF14 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 79) and ticks <= 365 * (TheFirstHarvestYearF14 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 80) and ticks <= 365 * (TheFirstHarvestYearF14 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 81) and ticks <= 365 * (TheFirstHarvestYearF14 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 82) and ticks <= 365 * (TheFirstHarvestYearF14 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 83) and ticks <= 365 * (TheFirstHarvestYearF14 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 84) and ticks <= 365 * (TheFirstHarvestYearF14 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 85) and ticks <= 365 * (TheFirstHarvestYearF14 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 86) and ticks <= 365 * (TheFirstHarvestYearF14 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 87) and ticks <= 365 * (TheFirstHarvestYearF14 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 88) and ticks <= 365 * (TheFirstHarvestYearF14 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 89) and ticks <= 365 * (TheFirstHarvestYearF14 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 90) and ticks <= 365 * (TheFirstHarvestYearF14 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 91) and ticks <= 365 * (TheFirstHarvestYearF14 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 92) and ticks <= 365 * (TheFirstHarvestYearF14 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 93) and ticks <= 365 * (TheFirstHarvestYearF14 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 94) and ticks <= 365 * (TheFirstHarvestYearF14 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 95) and ticks <= 365 * (TheFirstHarvestYearF14 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 96) and ticks <= 365 * (TheFirstHarvestYearF14 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 97) and ticks <= 365 * (TheFirstHarvestYearF14 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 98) and ticks <= 365 * (TheFirstHarvestYearF14 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF14 + 99) and ticks <= 365 * (TheFirstHarvestYearF14 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if FallowCountDown = 2 + ] + ] +;;;;;F15 + if pxcor > 35 and pxcor < 38 and pycor > 3 and pycor < 7 + [ + if F15NeverWithBarley? = True + [ + if [LandType] of patch 38 5 != 4 + [ + set F15NeverWithBarley? False + ] + ] + if F15NeverWithBarley? = False + [ + set CountDownBarleyF15 (CountDownBarleyF15 - 1) + if CountDownBarleyF15 > 360 and CountDownBarleyF15 < 365 + [ + set TheFirstHarvestYearF15 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF15 + 0) and ticks <= 365 * (TheFirstHarvestYearF15 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 1) and ticks <= 365 * (TheFirstHarvestYearF15 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 2) and ticks <= 365 * (TheFirstHarvestYearF15 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 3) and ticks <= 365 * (TheFirstHarvestYearF15 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 4) and ticks <= 365 * (TheFirstHarvestYearF15 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 5) and ticks <= 365 * (TheFirstHarvestYearF15 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 6) and ticks <= 365 * (TheFirstHarvestYearF15 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 7) and ticks <= 365 * (TheFirstHarvestYearF15 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 8) and ticks <= 365 * (TheFirstHarvestYearF15 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 9) and ticks <= 365 * (TheFirstHarvestYearF15 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 10) and ticks <= 365 * (TheFirstHarvestYearF15 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 11) and ticks <= 365 * (TheFirstHarvestYearF15 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 12) and ticks <= 365 * (TheFirstHarvestYearF15 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 13) and ticks <= 365 * (TheFirstHarvestYearF15 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 14) and ticks <= 365 * (TheFirstHarvestYearF15 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 15) and ticks <= 365 * (TheFirstHarvestYearF15 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 16) and ticks <= 365 * (TheFirstHarvestYearF15 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 17) and ticks <= 365 * (TheFirstHarvestYearF15 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 18) and ticks <= 365 * (TheFirstHarvestYearF15 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 19) and ticks <= 365 * (TheFirstHarvestYearF15 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 20) and ticks <= 365 * (TheFirstHarvestYearF15 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 21) and ticks <= 365 * (TheFirstHarvestYearF15 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 22) and ticks <= 365 * (TheFirstHarvestYearF15 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 23) and ticks <= 365 * (TheFirstHarvestYearF15 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 24) and ticks <= 365 * (TheFirstHarvestYearF15 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 25) and ticks <= 365 * (TheFirstHarvestYearF15 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 26) and ticks <= 365 * (TheFirstHarvestYearF15 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 27) and ticks <= 365 * (TheFirstHarvestYearF15 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 28) and ticks <= 365 * (TheFirstHarvestYearF15 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 29) and ticks <= 365 * (TheFirstHarvestYearF15 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 30) and ticks <= 365 * (TheFirstHarvestYearF15 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 31) and ticks <= 365 * (TheFirstHarvestYearF15 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 32) and ticks <= 365 * (TheFirstHarvestYearF15 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 33) and ticks <= 365 * (TheFirstHarvestYearF15 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 34) and ticks <= 365 * (TheFirstHarvestYearF15 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 35) and ticks <= 365 * (TheFirstHarvestYearF15 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 36) and ticks <= 365 * (TheFirstHarvestYearF15 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 37) and ticks <= 365 * (TheFirstHarvestYearF15 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 38) and ticks <= 365 * (TheFirstHarvestYearF15 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 39) and ticks <= 365 * (TheFirstHarvestYearF15 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 40) and ticks <= 365 * (TheFirstHarvestYearF15 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 41) and ticks <= 365 * (TheFirstHarvestYearF15 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 42) and ticks <= 365 * (TheFirstHarvestYearF15 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 43) and ticks <= 365 * (TheFirstHarvestYearF15 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 44) and ticks <= 365 * (TheFirstHarvestYearF15 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 45) and ticks <= 365 * (TheFirstHarvestYearF15 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 46) and ticks <= 365 * (TheFirstHarvestYearF15 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 47) and ticks <= 365 * (TheFirstHarvestYearF15 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 48) and ticks <= 365 * (TheFirstHarvestYearF15 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 49) and ticks <= 365 * (TheFirstHarvestYearF15 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 50) and ticks <= 365 * (TheFirstHarvestYearF15 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 51) and ticks <= 365 * (TheFirstHarvestYearF15 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 52) and ticks <= 365 * (TheFirstHarvestYearF15 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 53) and ticks <= 365 * (TheFirstHarvestYearF15 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 54) and ticks <= 365 * (TheFirstHarvestYearF15 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 55) and ticks <= 365 * (TheFirstHarvestYearF15 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 56) and ticks <= 365 * (TheFirstHarvestYearF15 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 57) and ticks <= 365 * (TheFirstHarvestYearF15 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 58) and ticks <= 365 * (TheFirstHarvestYearF15 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 59) and ticks <= 365 * (TheFirstHarvestYearF15 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 60) and ticks <= 365 * (TheFirstHarvestYearF15 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 61) and ticks <= 365 * (TheFirstHarvestYearF15 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 62) and ticks <= 365 * (TheFirstHarvestYearF15 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 63) and ticks <= 365 * (TheFirstHarvestYearF15 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 64) and ticks <= 365 * (TheFirstHarvestYearF15 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 65) and ticks <= 365 * (TheFirstHarvestYearF15 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 66) and ticks <= 365 * (TheFirstHarvestYearF15 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 67) and ticks <= 365 * (TheFirstHarvestYearF15 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 68) and ticks <= 365 * (TheFirstHarvestYearF15 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 69) and ticks <= 365 * (TheFirstHarvestYearF15 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 70) and ticks <= 365 * (TheFirstHarvestYearF15 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 71) and ticks <= 365 * (TheFirstHarvestYearF15 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 72) and ticks <= 365 * (TheFirstHarvestYearF15 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 73) and ticks <= 365 * (TheFirstHarvestYearF15 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 74) and ticks <= 365 * (TheFirstHarvestYearF15 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 75) and ticks <= 365 * (TheFirstHarvestYearF15 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 76) and ticks <= 365 * (TheFirstHarvestYearF15 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 77) and ticks <= 365 * (TheFirstHarvestYearF15 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 78) and ticks <= 365 * (TheFirstHarvestYearF15 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 79) and ticks <= 365 * (TheFirstHarvestYearF15 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 80) and ticks <= 365 * (TheFirstHarvestYearF15 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 81) and ticks <= 365 * (TheFirstHarvestYearF15 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 82) and ticks <= 365 * (TheFirstHarvestYearF15 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 83) and ticks <= 365 * (TheFirstHarvestYearF15 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 4) and ticks <= 365 * (TheFirstHarvestYearF15 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 85) and ticks <= 365 * (TheFirstHarvestYearF15 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 86) and ticks <= 365 * (TheFirstHarvestYearF15 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 87) and ticks <= 365 * (TheFirstHarvestYearF15 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 88) and ticks <= 365 * (TheFirstHarvestYearF15 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 89) and ticks <= 365 * (TheFirstHarvestYearF15 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 90) and ticks <= 365 * (TheFirstHarvestYearF15 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 91) and ticks <= 365 * (TheFirstHarvestYearF15 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 92) and ticks <= 365 * (TheFirstHarvestYearF15 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 93) and ticks <= 365 * (TheFirstHarvestYearF15 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 94) and ticks <= 365 * (TheFirstHarvestYearF15 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 95) and ticks <= 365 * (TheFirstHarvestYearF15 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 96) and ticks <= 365 * (TheFirstHarvestYearF15 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 97) and ticks <= 365 * (TheFirstHarvestYearF15 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 98) and ticks <= 365 * (TheFirstHarvestYearF15 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF15 + 99) and ticks <= 365 * (TheFirstHarvestYearF15 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if FallowCountDown = 2 + ] + ] +;;;;;F16 + if pxcor > 38 and pxcor < 41 and pycor > 1 and pycor < 5 + [ + if F16NeverWithBarley? = True + [ + if [LandType] of patch 38 3 != 4 + [ + set F16NeverWithBarley? False + ] + ] + if F16NeverWithBarley? = False + [ + set CountDownBarleyF16 (CountDownBarleyF16 - 1) + if CountDownBarleyF16 > 360 and CountDownBarleyF16 < 365 + [ + set TheFirstHarvestYearF16 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF16 + 0) and ticks <= 365 * (TheFirstHarvestYearF16 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 1) and ticks <= 365 * (TheFirstHarvestYearF16 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 2) and ticks <= 365 * (TheFirstHarvestYearF16 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 3) and ticks <= 365 * (TheFirstHarvestYearF16 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 4) and ticks <= 365 * (TheFirstHarvestYearF16 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 5) and ticks <= 365 * (TheFirstHarvestYearF16 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 6) and ticks <= 365 * (TheFirstHarvestYearF16 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 7) and ticks <= 365 * (TheFirstHarvestYearF16 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 8) and ticks <= 365 * (TheFirstHarvestYearF16 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 9) and ticks <= 365 * (TheFirstHarvestYearF16 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 10) and ticks <= 365 * (TheFirstHarvestYearF16 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 11) and ticks <= 365 * (TheFirstHarvestYearF16 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 12) and ticks <= 365 * (TheFirstHarvestYearF16 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 13) and ticks <= 365 * (TheFirstHarvestYearF16 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 14) and ticks <= 365 * (TheFirstHarvestYearF16 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 15) and ticks <= 365 * (TheFirstHarvestYearF16 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 16) and ticks <= 365 * (TheFirstHarvestYearF16 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 17) and ticks <= 365 * (TheFirstHarvestYearF16 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 18) and ticks <= 365 * (TheFirstHarvestYearF16 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 19) and ticks <= 365 * (TheFirstHarvestYearF16 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 20) and ticks <= 365 * (TheFirstHarvestYearF16 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 21) and ticks <= 365 * (TheFirstHarvestYearF16 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 22) and ticks <= 365 * (TheFirstHarvestYearF16 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 23) and ticks <= 365 * (TheFirstHarvestYearF16 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 24) and ticks <= 365 * (TheFirstHarvestYearF16 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 25) and ticks <= 365 * (TheFirstHarvestYearF16 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 26) and ticks <= 365 * (TheFirstHarvestYearF16 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 27) and ticks <= 365 * (TheFirstHarvestYearF16 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 28) and ticks <= 365 * (TheFirstHarvestYearF16 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 29) and ticks <= 365 * (TheFirstHarvestYearF16 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 30) and ticks <= 365 * (TheFirstHarvestYearF16 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 31) and ticks <= 365 * (TheFirstHarvestYearF16 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 32) and ticks <= 365 * (TheFirstHarvestYearF16 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 33) and ticks <= 365 * (TheFirstHarvestYearF16 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 34) and ticks <= 365 * (TheFirstHarvestYearF16 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 35) and ticks <= 365 * (TheFirstHarvestYearF16 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 36) and ticks <= 365 * (TheFirstHarvestYearF16 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 37) and ticks <= 365 * (TheFirstHarvestYearF16 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 38) and ticks <= 365 * (TheFirstHarvestYearF16 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 39) and ticks <= 365 * (TheFirstHarvestYearF16 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 40) and ticks <= 365 * (TheFirstHarvestYearF16 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 41) and ticks <= 365 * (TheFirstHarvestYearF16 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 42) and ticks <= 365 * (TheFirstHarvestYearF16 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 43) and ticks <= 365 * (TheFirstHarvestYearF16 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 44) and ticks <= 365 * (TheFirstHarvestYearF16 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 45) and ticks <= 365 * (TheFirstHarvestYearF16 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 46) and ticks <= 365 * (TheFirstHarvestYearF16 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 47) and ticks <= 365 * (TheFirstHarvestYearF16 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 48) and ticks <= 365 * (TheFirstHarvestYearF16 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 49) and ticks <= 365 * (TheFirstHarvestYearF16 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 50) and ticks <= 365 * (TheFirstHarvestYearF16 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 51) and ticks <= 365 * (TheFirstHarvestYearF16 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 52) and ticks <= 365 * (TheFirstHarvestYearF16 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 53) and ticks <= 365 * (TheFirstHarvestYearF16 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 54) and ticks <= 365 * (TheFirstHarvestYearF16 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 55) and ticks <= 365 * (TheFirstHarvestYearF16 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 56) and ticks <= 365 * (TheFirstHarvestYearF16 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 57) and ticks <= 365 * (TheFirstHarvestYearF16 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 58) and ticks <= 365 * (TheFirstHarvestYearF16 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 59) and ticks <= 365 * (TheFirstHarvestYearF16 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 60) and ticks <= 365 * (TheFirstHarvestYearF16 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 61) and ticks <= 365 * (TheFirstHarvestYearF16 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 62) and ticks <= 365 * (TheFirstHarvestYearF16 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 63) and ticks <= 365 * (TheFirstHarvestYearF16 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 64) and ticks <= 365 * (TheFirstHarvestYearF16 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 65) and ticks <= 365 * (TheFirstHarvestYearF16 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 66) and ticks <= 365 * (TheFirstHarvestYearF16 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 67) and ticks <= 365 * (TheFirstHarvestYearF16 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 68) and ticks <= 365 * (TheFirstHarvestYearF16 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 69) and ticks <= 365 * (TheFirstHarvestYearF16 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 70) and ticks <= 365 * (TheFirstHarvestYearF16 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 71) and ticks <= 365 * (TheFirstHarvestYearF16 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 72) and ticks <= 365 * (TheFirstHarvestYearF16 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 73) and ticks <= 365 * (TheFirstHarvestYearF16 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 74) and ticks <= 365 * (TheFirstHarvestYearF16 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 75) and ticks <= 365 * (TheFirstHarvestYearF16 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 76) and ticks <= 365 * (TheFirstHarvestYearF16 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 77) and ticks <= 365 * (TheFirstHarvestYearF16 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 78) and ticks <= 365 * (TheFirstHarvestYearF16 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 79) and ticks <= 365 * (TheFirstHarvestYearF16 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 80) and ticks <= 365 * (TheFirstHarvestYearF16 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 81) and ticks <= 365 * (TheFirstHarvestYearF16 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 82) and ticks <= 365 * (TheFirstHarvestYearF16 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 83) and ticks <= 365 * (TheFirstHarvestYearF16 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 4) and ticks <= 365 * (TheFirstHarvestYearF16 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 85) and ticks <= 365 * (TheFirstHarvestYearF16 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 86) and ticks <= 365 * (TheFirstHarvestYearF16 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 87) and ticks <= 365 * (TheFirstHarvestYearF16 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 88) and ticks <= 365 * (TheFirstHarvestYearF16 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 89) and ticks <= 365 * (TheFirstHarvestYearF16 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 90) and ticks <= 365 * (TheFirstHarvestYearF16 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 91) and ticks <= 365 * (TheFirstHarvestYearF16 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 92) and ticks <= 365 * (TheFirstHarvestYearF16 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 93) and ticks <= 365 * (TheFirstHarvestYearF16 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 94) and ticks <= 365 * (TheFirstHarvestYearF16 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 95) and ticks <= 365 * (TheFirstHarvestYearF16 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 96) and ticks <= 365 * (TheFirstHarvestYearF16 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 97) and ticks <= 365 * (TheFirstHarvestYearF16 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 98) and ticks <= 365 * (TheFirstHarvestYearF16 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF16 + 99) and ticks <= 365 * (TheFirstHarvestYearF16 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;FallowCountDown = 2 + ] + ] + ] +;;F17-19 + if pxcor < 25 and pycor > 14 ;; the seconday canal, strat at the 21th year + [ + if [pcolor] of patch 16 17 != 4 + [ + if F17NeverWithBarley? = True + [ + if [LandType] of patch 24 17 != 4 + [ + set F17NeverWithBarley? False + ] + ] + if F17NeverWithBarley? = False + [ + set CountDownBarleyF17 (CountDownBarleyF17 - 1) + if CountDownBarleyF17 > 360 and CountDownBarleyF17 < 365 + [ + set TheFirstHarvestYearF17 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF17 + 0) and ticks <= 365 * (TheFirstHarvestYearF17 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 1) and ticks <= 365 * (TheFirstHarvestYearF17 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 2) and ticks <= 365 * (TheFirstHarvestYearF17 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 3) and ticks <= 365 * (TheFirstHarvestYearF17 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 4) and ticks <= 365 * (TheFirstHarvestYearF17 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 5) and ticks <= 365 * (TheFirstHarvestYearF17 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 6) and ticks <= 365 * (TheFirstHarvestYearF17 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 7) and ticks <= 365 * (TheFirstHarvestYearF17 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 8) and ticks <= 365 * (TheFirstHarvestYearF17 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 9) and ticks <= 365 * (TheFirstHarvestYearF17 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 10) and ticks <= 365 * (TheFirstHarvestYearF17 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 11) and ticks <= 365 * (TheFirstHarvestYearF17 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 12) and ticks <= 365 * (TheFirstHarvestYearF17 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 13) and ticks <= 365 * (TheFirstHarvestYearF17 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 14) and ticks <= 365 * (TheFirstHarvestYearF17 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 15) and ticks <= 365 * (TheFirstHarvestYearF17 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 16) and ticks <= 365 * (TheFirstHarvestYearF17 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 17) and ticks <= 365 * (TheFirstHarvestYearF17 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 18) and ticks <= 365 * (TheFirstHarvestYearF17 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 19) and ticks <= 365 * (TheFirstHarvestYearF17 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 20) and ticks <= 365 * (TheFirstHarvestYearF17 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 21) and ticks <= 365 * (TheFirstHarvestYearF17 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 22) and ticks <= 365 * (TheFirstHarvestYearF17 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 23) and ticks <= 365 * (TheFirstHarvestYearF17 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 24) and ticks <= 365 * (TheFirstHarvestYearF17 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 25) and ticks <= 365 * (TheFirstHarvestYearF17 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 26) and ticks <= 365 * (TheFirstHarvestYearF17 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 27) and ticks <= 365 * (TheFirstHarvestYearF17 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 28) and ticks <= 365 * (TheFirstHarvestYearF17 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 29) and ticks <= 365 * (TheFirstHarvestYearF17 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 30) and ticks <= 365 * (TheFirstHarvestYearF17 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 31) and ticks <= 365 * (TheFirstHarvestYearF17 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 32) and ticks <= 365 * (TheFirstHarvestYearF17 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 33) and ticks <= 365 * (TheFirstHarvestYearF17 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 34) and ticks <= 365 * (TheFirstHarvestYearF17 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 35) and ticks <= 365 * (TheFirstHarvestYearF17 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 36) and ticks <= 365 * (TheFirstHarvestYearF17 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 37) and ticks <= 365 * (TheFirstHarvestYearF17 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 38) and ticks <= 365 * (TheFirstHarvestYearF17 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 39) and ticks <= 365 * (TheFirstHarvestYearF17 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 40) and ticks <= 365 * (TheFirstHarvestYearF17 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 41) and ticks <= 365 * (TheFirstHarvestYearF17 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 42) and ticks <= 365 * (TheFirstHarvestYearF17 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 43) and ticks <= 365 * (TheFirstHarvestYearF17 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 44) and ticks <= 365 * (TheFirstHarvestYearF17 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 45) and ticks <= 365 * (TheFirstHarvestYearF17 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 46) and ticks <= 365 * (TheFirstHarvestYearF17 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 47) and ticks <= 365 * (TheFirstHarvestYearF17 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 48) and ticks <= 365 * (TheFirstHarvestYearF17 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 49) and ticks <= 365 * (TheFirstHarvestYearF17 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 50) and ticks <= 365 * (TheFirstHarvestYearF17 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 51) and ticks <= 365 * (TheFirstHarvestYearF17 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 52) and ticks <= 365 * (TheFirstHarvestYearF17 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 53) and ticks <= 365 * (TheFirstHarvestYearF17 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 54) and ticks <= 365 * (TheFirstHarvestYearF17 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 55) and ticks <= 365 * (TheFirstHarvestYearF17 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 56) and ticks <= 365 * (TheFirstHarvestYearF17 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 57) and ticks <= 365 * (TheFirstHarvestYearF17 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 58) and ticks <= 365 * (TheFirstHarvestYearF17 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 59) and ticks <= 365 * (TheFirstHarvestYearF17 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 60) and ticks <= 365 * (TheFirstHarvestYearF17 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 61) and ticks <= 365 * (TheFirstHarvestYearF17 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 62) and ticks <= 365 * (TheFirstHarvestYearF17 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 63) and ticks <= 365 * (TheFirstHarvestYearF17 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 64) and ticks <= 365 * (TheFirstHarvestYearF17 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 65) and ticks <= 365 * (TheFirstHarvestYearF17 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 66) and ticks <= 365 * (TheFirstHarvestYearF17 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 67) and ticks <= 365 * (TheFirstHarvestYearF17 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 68) and ticks <= 365 * (TheFirstHarvestYearF17 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 69) and ticks <= 365 * (TheFirstHarvestYearF17 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 70) and ticks <= 365 * (TheFirstHarvestYearF17 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 71) and ticks <= 365 * (TheFirstHarvestYearF17 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 72) and ticks <= 365 * (TheFirstHarvestYearF17 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 73) and ticks <= 365 * (TheFirstHarvestYearF17 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 74) and ticks <= 365 * (TheFirstHarvestYearF17 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 75) and ticks <= 365 * (TheFirstHarvestYearF17 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 76) and ticks <= 365 * (TheFirstHarvestYearF17 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 77) and ticks <= 365 * (TheFirstHarvestYearF17 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 78) and ticks <= 365 * (TheFirstHarvestYearF17 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 79) and ticks <= 365 * (TheFirstHarvestYearF17 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 80) and ticks <= 365 * (TheFirstHarvestYearF17 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 81) and ticks <= 365 * (TheFirstHarvestYearF17 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 82) and ticks <= 365 * (TheFirstHarvestYearF17 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 83) and ticks <= 365 * (TheFirstHarvestYearF17 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 4) and ticks <= 365 * (TheFirstHarvestYearF17 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 85) and ticks <= 365 * (TheFirstHarvestYearF17 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 86) and ticks <= 365 * (TheFirstHarvestYearF17 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 87) and ticks <= 365 * (TheFirstHarvestYearF17 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 88) and ticks <= 365 * (TheFirstHarvestYearF17 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 89) and ticks <= 365 * (TheFirstHarvestYearF17 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 90) and ticks <= 365 * (TheFirstHarvestYearF17 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 91) and ticks <= 365 * (TheFirstHarvestYearF17 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 92) and ticks <= 365 * (TheFirstHarvestYearF17 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 93) and ticks <= 365 * (TheFirstHarvestYearF17 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 94) and ticks <= 365 * (TheFirstHarvestYearF17 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 95) and ticks <= 365 * (TheFirstHarvestYearF17 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 96) and ticks <= 365 * (TheFirstHarvestYearF17 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 97) and ticks <= 365 * (TheFirstHarvestYearF17 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 98) and ticks <= 365 * (TheFirstHarvestYearF17 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF17 + 99) and ticks <= 365 * (TheFirstHarvestYearF17 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;;FallowCountDown = 2 + ] + ] +;;;;;F20 + if pxcor > 14 and pxcor < 18 and pycor > 14 and pycor < 17 + [ + if F20NeverWithBarley? = True + [ + if [LandType] of patch 16 17 != 4 ;;gate patch of F20 + [ + set F20NeverWithBarley? False + ] + ] + if F20NeverWithBarley? = False + [ + set CountDownBarleyF20 (CountDownBarleyF20 - 1) + if CountDownBarleyF20 > 360 and CountDownBarleyF20 < 365 + [ + set TheFirstHarvestYearF20 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF20 + 0) and ticks <= 365 * (TheFirstHarvestYearF20 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 1) and ticks <= 365 * (TheFirstHarvestYearF20 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 2) and ticks <= 365 * (TheFirstHarvestYearF20 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 3) and ticks <= 365 * (TheFirstHarvestYearF20 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 4) and ticks <= 365 * (TheFirstHarvestYearF20 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 5) and ticks <= 365 * (TheFirstHarvestYearF20 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 6) and ticks <= 365 * (TheFirstHarvestYearF20 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 7) and ticks <= 365 * (TheFirstHarvestYearF20 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 8) and ticks <= 365 * (TheFirstHarvestYearF20 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 9) and ticks <= 365 * (TheFirstHarvestYearF20 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 10) and ticks <= 365 * (TheFirstHarvestYearF20 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 11) and ticks <= 365 * (TheFirstHarvestYearF20 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 12) and ticks <= 365 * (TheFirstHarvestYearF20 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 13) and ticks <= 365 * (TheFirstHarvestYearF20 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 14) and ticks <= 365 * (TheFirstHarvestYearF20 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 15) and ticks <= 365 * (TheFirstHarvestYearF20 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 16) and ticks <= 365 * (TheFirstHarvestYearF20 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 17) and ticks <= 365 * (TheFirstHarvestYearF20 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 18) and ticks <= 365 * (TheFirstHarvestYearF20 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 19) and ticks <= 365 * (TheFirstHarvestYearF20 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 20) and ticks <= 365 * (TheFirstHarvestYearF20 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 21) and ticks <= 365 * (TheFirstHarvestYearF20 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 22) and ticks <= 365 * (TheFirstHarvestYearF20 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 23) and ticks <= 365 * (TheFirstHarvestYearF20 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 24) and ticks <= 365 * (TheFirstHarvestYearF20 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 25) and ticks <= 365 * (TheFirstHarvestYearF20 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 26) and ticks <= 365 * (TheFirstHarvestYearF20 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 27) and ticks <= 365 * (TheFirstHarvestYearF20 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 28) and ticks <= 365 * (TheFirstHarvestYearF20 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 29) and ticks <= 365 * (TheFirstHarvestYearF20 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 30) and ticks <= 365 * (TheFirstHarvestYearF20 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 31) and ticks <= 365 * (TheFirstHarvestYearF20 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 32) and ticks <= 365 * (TheFirstHarvestYearF20 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 33) and ticks <= 365 * (TheFirstHarvestYearF20 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 34) and ticks <= 365 * (TheFirstHarvestYearF20 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 35) and ticks <= 365 * (TheFirstHarvestYearF20 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 36) and ticks <= 365 * (TheFirstHarvestYearF20 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 37) and ticks <= 365 * (TheFirstHarvestYearF20 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 38) and ticks <= 365 * (TheFirstHarvestYearF20 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 39) and ticks <= 365 * (TheFirstHarvestYearF20 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 40) and ticks <= 365 * (TheFirstHarvestYearF20 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 41) and ticks <= 365 * (TheFirstHarvestYearF20 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 42) and ticks <= 365 * (TheFirstHarvestYearF20 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 43) and ticks <= 365 * (TheFirstHarvestYearF20 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 44) and ticks <= 365 * (TheFirstHarvestYearF20 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 45) and ticks <= 365 * (TheFirstHarvestYearF20 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 46) and ticks <= 365 * (TheFirstHarvestYearF20 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 47) and ticks <= 365 * (TheFirstHarvestYearF20 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 48) and ticks <= 365 * (TheFirstHarvestYearF20 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 49) and ticks <= 365 * (TheFirstHarvestYearF20 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 50) and ticks <= 365 * (TheFirstHarvestYearF20 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 51) and ticks <= 365 * (TheFirstHarvestYearF20 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 52) and ticks <= 365 * (TheFirstHarvestYearF20 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 53) and ticks <= 365 * (TheFirstHarvestYearF20 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 54) and ticks <= 365 * (TheFirstHarvestYearF20 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 55) and ticks <= 365 * (TheFirstHarvestYearF20 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 56) and ticks <= 365 * (TheFirstHarvestYearF20 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 57) and ticks <= 365 * (TheFirstHarvestYearF20 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 58) and ticks <= 365 * (TheFirstHarvestYearF20 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 59) and ticks <= 365 * (TheFirstHarvestYearF20 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 60) and ticks <= 365 * (TheFirstHarvestYearF20 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 61) and ticks <= 365 * (TheFirstHarvestYearF20 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 62) and ticks <= 365 * (TheFirstHarvestYearF20 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 63) and ticks <= 365 * (TheFirstHarvestYearF20 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 64) and ticks <= 365 * (TheFirstHarvestYearF20 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 65) and ticks <= 365 * (TheFirstHarvestYearF20 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 66) and ticks <= 365 * (TheFirstHarvestYearF20 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 67) and ticks <= 365 * (TheFirstHarvestYearF20 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 68) and ticks <= 365 * (TheFirstHarvestYearF20 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 69) and ticks <= 365 * (TheFirstHarvestYearF20 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 70) and ticks <= 365 * (TheFirstHarvestYearF20 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 71) and ticks <= 365 * (TheFirstHarvestYearF20 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 72) and ticks <= 365 * (TheFirstHarvestYearF20 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 73) and ticks <= 365 * (TheFirstHarvestYearF20 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 74) and ticks <= 365 * (TheFirstHarvestYearF20 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 75) and ticks <= 365 * (TheFirstHarvestYearF20 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 76) and ticks <= 365 * (TheFirstHarvestYearF20 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 77) and ticks <= 365 * (TheFirstHarvestYearF20 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 78) and ticks <= 365 * (TheFirstHarvestYearF20 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 79) and ticks <= 365 * (TheFirstHarvestYearF20 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 80) and ticks <= 365 * (TheFirstHarvestYearF20 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 81) and ticks <= 365 * (TheFirstHarvestYearF20 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 82) and ticks <= 365 * (TheFirstHarvestYearF20 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 83) and ticks <= 365 * (TheFirstHarvestYearF20 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 84) and ticks <= 365 * (TheFirstHarvestYearF20 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 85) and ticks <= 365 * (TheFirstHarvestYearF20 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 86) and ticks <= 365 * (TheFirstHarvestYearF20 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 87) and ticks <= 365 * (TheFirstHarvestYearF20 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 88) and ticks <= 365 * (TheFirstHarvestYearF20 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 89) and ticks <= 365 * (TheFirstHarvestYearF20 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 90) and ticks <= 365 * (TheFirstHarvestYearF20 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 91) and ticks <= 365 * (TheFirstHarvestYearF20 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 92) and ticks <= 365 * (TheFirstHarvestYearF20 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 93) and ticks <= 365 * (TheFirstHarvestYearF20 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 94) and ticks <= 365 * (TheFirstHarvestYearF20 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 95) and ticks <= 365 * (TheFirstHarvestYearF20 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 96) and ticks <= 365 * (TheFirstHarvestYearF20 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 97) and ticks <= 365 * (TheFirstHarvestYearF20 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 98) and ticks <= 365 * (TheFirstHarvestYearF20 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF20 + 99) and ticks <= 365 * (TheFirstHarvestYearF20 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if FallowCountDown = 2 + ] + ] +;;;;;F21 + if pxcor > 12 and pxcor < 16 and pycor > 17 and pycor < 20 + [ + if F21NeverWithBarley? = True + [ + if [LandType] of patch 14 17 != 4 + [ + set F21NeverWithBarley? False + ] + ] + if F21NeverWithBarley? = False + [ + set CountDownBarleyF21 (CountDownBarleyF21 - 1) + if CountDownBarleyF21 > 360 and CountDownBarleyF21 < 365 + [ + set TheFirstHarvestYearF21 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF21 + 0) and ticks <= 365 * (TheFirstHarvestYearF21 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 1) and ticks <= 365 * (TheFirstHarvestYearF21 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 2) and ticks <= 365 * (TheFirstHarvestYearF21 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 3) and ticks <= 365 * (TheFirstHarvestYearF21 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 4) and ticks <= 365 * (TheFirstHarvestYearF21 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 5) and ticks <= 365 * (TheFirstHarvestYearF21 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 6) and ticks <= 365 * (TheFirstHarvestYearF21 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 7) and ticks <= 365 * (TheFirstHarvestYearF21 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 8) and ticks <= 365 * (TheFirstHarvestYearF21 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 9) and ticks <= 365 * (TheFirstHarvestYearF21 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 10) and ticks <= 365 * (TheFirstHarvestYearF21 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 11) and ticks <= 365 * (TheFirstHarvestYearF21 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 12) and ticks <= 365 * (TheFirstHarvestYearF21 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 13) and ticks <= 365 * (TheFirstHarvestYearF21 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 14) and ticks <= 365 * (TheFirstHarvestYearF21 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 15) and ticks <= 365 * (TheFirstHarvestYearF21 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 16) and ticks <= 365 * (TheFirstHarvestYearF21 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 17) and ticks <= 365 * (TheFirstHarvestYearF21 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 18) and ticks <= 365 * (TheFirstHarvestYearF21 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 19) and ticks <= 365 * (TheFirstHarvestYearF21 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 20) and ticks <= 365 * (TheFirstHarvestYearF21 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 21) and ticks <= 365 * (TheFirstHarvestYearF21 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 22) and ticks <= 365 * (TheFirstHarvestYearF21 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 23) and ticks <= 365 * (TheFirstHarvestYearF21 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 24) and ticks <= 365 * (TheFirstHarvestYearF21 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 25) and ticks <= 365 * (TheFirstHarvestYearF21 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 26) and ticks <= 365 * (TheFirstHarvestYearF21 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 27) and ticks <= 365 * (TheFirstHarvestYearF21 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 28) and ticks <= 365 * (TheFirstHarvestYearF21 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 29) and ticks <= 365 * (TheFirstHarvestYearF21 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 30) and ticks <= 365 * (TheFirstHarvestYearF21 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 31) and ticks <= 365 * (TheFirstHarvestYearF21 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 32) and ticks <= 365 * (TheFirstHarvestYearF21 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 33) and ticks <= 365 * (TheFirstHarvestYearF21 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 34) and ticks <= 365 * (TheFirstHarvestYearF21 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 35) and ticks <= 365 * (TheFirstHarvestYearF21 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 36) and ticks <= 365 * (TheFirstHarvestYearF21 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 37) and ticks <= 365 * (TheFirstHarvestYearF21 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 38) and ticks <= 365 * (TheFirstHarvestYearF21 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 39) and ticks <= 365 * (TheFirstHarvestYearF21 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 40) and ticks <= 365 * (TheFirstHarvestYearF21 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 41) and ticks <= 365 * (TheFirstHarvestYearF21 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 42) and ticks <= 365 * (TheFirstHarvestYearF21 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 43) and ticks <= 365 * (TheFirstHarvestYearF21 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 44) and ticks <= 365 * (TheFirstHarvestYearF21 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 45) and ticks <= 365 * (TheFirstHarvestYearF21 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 46) and ticks <= 365 * (TheFirstHarvestYearF21 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 47) and ticks <= 365 * (TheFirstHarvestYearF21 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 48) and ticks <= 365 * (TheFirstHarvestYearF21 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 49) and ticks <= 365 * (TheFirstHarvestYearF21 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 50) and ticks <= 365 * (TheFirstHarvestYearF21 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 51) and ticks <= 365 * (TheFirstHarvestYearF21 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 52) and ticks <= 365 * (TheFirstHarvestYearF21 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 53) and ticks <= 365 * (TheFirstHarvestYearF21 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 54) and ticks <= 365 * (TheFirstHarvestYearF21 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 55) and ticks <= 365 * (TheFirstHarvestYearF21 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 56) and ticks <= 365 * (TheFirstHarvestYearF21 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 57) and ticks <= 365 * (TheFirstHarvestYearF21 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 58) and ticks <= 365 * (TheFirstHarvestYearF21 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 59) and ticks <= 365 * (TheFirstHarvestYearF21 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 60) and ticks <= 365 * (TheFirstHarvestYearF21 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 61) and ticks <= 365 * (TheFirstHarvestYearF21 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 62) and ticks <= 365 * (TheFirstHarvestYearF21 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 63) and ticks <= 365 * (TheFirstHarvestYearF21 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 64) and ticks <= 365 * (TheFirstHarvestYearF21 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 65) and ticks <= 365 * (TheFirstHarvestYearF21 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 66) and ticks <= 365 * (TheFirstHarvestYearF21 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 67) and ticks <= 365 * (TheFirstHarvestYearF21 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 68) and ticks <= 365 * (TheFirstHarvestYearF21 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 69) and ticks <= 365 * (TheFirstHarvestYearF21 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 70) and ticks <= 365 * (TheFirstHarvestYearF21 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 71) and ticks <= 365 * (TheFirstHarvestYearF21 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 72) and ticks <= 365 * (TheFirstHarvestYearF21 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 73) and ticks <= 365 * (TheFirstHarvestYearF21 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 74) and ticks <= 365 * (TheFirstHarvestYearF21 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 75) and ticks <= 365 * (TheFirstHarvestYearF21 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 76) and ticks <= 365 * (TheFirstHarvestYearF21 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 77) and ticks <= 365 * (TheFirstHarvestYearF21 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 78) and ticks <= 365 * (TheFirstHarvestYearF21 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 79) and ticks <= 365 * (TheFirstHarvestYearF21 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 80) and ticks <= 365 * (TheFirstHarvestYearF21 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 81) and ticks <= 365 * (TheFirstHarvestYearF21 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 82) and ticks <= 365 * (TheFirstHarvestYearF21 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 83) and ticks <= 365 * (TheFirstHarvestYearF21 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 4) and ticks <= 365 * (TheFirstHarvestYearF21 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 85) and ticks <= 365 * (TheFirstHarvestYearF21 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 86) and ticks <= 365 * (TheFirstHarvestYearF21 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 87) and ticks <= 365 * (TheFirstHarvestYearF21 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 88) and ticks <= 365 * (TheFirstHarvestYearF21 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 89) and ticks <= 365 * (TheFirstHarvestYearF21 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 90) and ticks <= 365 * (TheFirstHarvestYearF21 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 91) and ticks <= 365 * (TheFirstHarvestYearF21 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 92) and ticks <= 365 * (TheFirstHarvestYearF21 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 93) and ticks <= 365 * (TheFirstHarvestYearF21 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 94) and ticks <= 365 * (TheFirstHarvestYearF21 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 95) and ticks <= 365 * (TheFirstHarvestYearF21 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 96) and ticks <= 365 * (TheFirstHarvestYearF21 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 97) and ticks <= 365 * (TheFirstHarvestYearF21 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 98) and ticks <= 365 * (TheFirstHarvestYearF21 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF21 + 99) and ticks <= 365 * (TheFirstHarvestYearF21 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;if FallowCountDown = 2 + ] + ] +;;;;;F22 + if pxcor > 10 and pxcor < 14 and pycor > 14 and pycor < 17 + [ + if F22NeverWithBarley? = True + [ + if [LandType] of patch 12 17 != 4 + [ + set F22NeverWithBarley? False + ] + ] + if F22NeverWithBarley? = False + [ + set CountDownBarleyF22 (CountDownBarleyF22 - 1) + if CountDownBarleyF22 > 360 and CountDownBarleyF22 < 365 + [ + set TheFirstHarvestYearF22 Year + ] + if FallowCountDown = 2 + [ + if ticks > 365 * (TheFirstHarvestYearF22 + 0) and ticks <= 365 * (TheFirstHarvestYearF22 + 1) + [ + set HarvestBarleyY1 BarleyYield + set AverageHarvestBarley HarvestBarleyY1 + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 1) and ticks <= 365 * (TheFirstHarvestYearF22 + 2) + [ + set HarvestBarleyY2 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 2) and ticks <= 365 * (TheFirstHarvestYearF22 + 3) + [ + set HarvestBarleyY3 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 3) and ticks <= 365 * (TheFirstHarvestYearF22 + 4) + [ + set HarvestBarleyY4 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 4) and ticks <= 365 * (TheFirstHarvestYearF22 + 5) + [ + set HarvestBarleyY5 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 5) and ticks <= 365 * (TheFirstHarvestYearF22 + 6) + [ + set HarvestBarleyY6 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 6) and ticks <= 365 * (TheFirstHarvestYearF22 + 7) + [ + set HarvestBarleyY7 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 7) and ticks <= 365 * (TheFirstHarvestYearF22 + 8) + [ + set HarvestBarleyY8 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 8) and ticks <= 365 * (TheFirstHarvestYearF22 + 9) + [ + set HarvestBarleyY9 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 9) and ticks <= 365 * (TheFirstHarvestYearF22 + 10) + [ + set HarvestBarleyY10 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY10 * 10 + HarvestBarleyY9 * 9 + HarvestBarleyY8 * 8 + HarvestBarleyY7 * 7 + HarvestBarleyY6 * 6 + HarvestBarleyY5 * 5 + HarvestBarleyY4 * 4 + HarvestBarleyY3 * 3 + HarvestBarleyY2 * 2 + HarvestBarleyY1 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 10) and ticks <= 365 * (TheFirstHarvestYearF22 + 11) + [ + set HarvestBarleyY11 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY11 * 10 + HarvestBarleyY10 * 9 + HarvestBarleyY9 * 8 + HarvestBarleyY8 * 7 + HarvestBarleyY7 * 6 + HarvestBarleyY6 * 5 + HarvestBarleyY5 * 4 + HarvestBarleyY4 * 3 + HarvestBarleyY3 * 2 + HarvestBarleyY2 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 11) and ticks <= 365 * (TheFirstHarvestYearF22 + 12) + [ + set HarvestBarleyY12 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY12 * 10 + HarvestBarleyY11 * 9 + HarvestBarleyY10 * 8 + HarvestBarleyY9 * 7 + HarvestBarleyY8 * 6 + HarvestBarleyY7 * 5 + HarvestBarleyY6 * 4 + HarvestBarleyY5 * 3 + HarvestBarleyY4 * 2 + HarvestBarleyY3 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 12) and ticks <= 365 * (TheFirstHarvestYearF22 + 13) + [ + set HarvestBarleyY13 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY13 * 10 + HarvestBarleyY12 * 9 + HarvestBarleyY11 * 8 + HarvestBarleyY10 * 7 + HarvestBarleyY9 * 6 + HarvestBarleyY8 * 5 + HarvestBarleyY7 * 4 + HarvestBarleyY6 * 3 + HarvestBarleyY5 * 2 + HarvestBarleyY4 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 13) and ticks <= 365 * (TheFirstHarvestYearF22 + 14) + [ + set HarvestBarleyY14 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY14 * 10 + HarvestBarleyY13 * 9 + HarvestBarleyY12 * 8 + HarvestBarleyY11 * 7 + HarvestBarleyY10 * 6 + HarvestBarleyY9 * 5 + HarvestBarleyY8 * 4 + HarvestBarleyY7 * 3 + HarvestBarleyY6 * 2 + HarvestBarleyY5 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 14) and ticks <= 365 * (TheFirstHarvestYearF22 + 15) + [ + set HarvestBarleyY15 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY15 * 10 + HarvestBarleyY14 * 9 + HarvestBarleyY13 * 8 + HarvestBarleyY12 * 7 + HarvestBarleyY11 * 6 + HarvestBarleyY10 * 5 + HarvestBarleyY9 * 4 + HarvestBarleyY8 * 3 + HarvestBarleyY7 * 2 + HarvestBarleyY6 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 15) and ticks <= 365 * (TheFirstHarvestYearF22 + 16) + [ + set HarvestBarleyY16 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY16 * 10 + HarvestBarleyY15 * 9 + HarvestBarleyY14 * 8 + HarvestBarleyY13 * 7 + HarvestBarleyY12 * 6 + HarvestBarleyY11 * 5 + HarvestBarleyY10 * 4 + HarvestBarleyY9 * 3 + HarvestBarleyY8 * 2 + HarvestBarleyY7 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 16) and ticks <= 365 * (TheFirstHarvestYearF22 + 17) + [ + set HarvestBarleyY17 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY17 * 10 + HarvestBarleyY16 * 9 + HarvestBarleyY15 * 8 + HarvestBarleyY14 * 7 + HarvestBarleyY13 * 6 + HarvestBarleyY12 * 5 + HarvestBarleyY11 * 4 + HarvestBarleyY10 * 3 + HarvestBarleyY9 * 2 + HarvestBarleyY8 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 17) and ticks <= 365 * (TheFirstHarvestYearF22 + 18) + [ + set HarvestBarleyY18 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY18 * 10 + HarvestBarleyY17 * 9 + HarvestBarleyY16 * 8 + HarvestBarleyY15 * 7 + HarvestBarleyY14 * 6 + HarvestBarleyY13 * 5 + HarvestBarleyY12 * 4 + HarvestBarleyY11 * 3 + HarvestBarleyY10 * 2 + HarvestBarleyY9 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 18) and ticks <= 365 * (TheFirstHarvestYearF22 + 19) + [ + set HarvestBarleyY19 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY19 * 10 + HarvestBarleyY18 * 9 + HarvestBarleyY17 * 8 + HarvestBarleyY16 * 7 + HarvestBarleyY15 * 6 + HarvestBarleyY14 * 5 + HarvestBarleyY13 * 4 + HarvestBarleyY12 * 3 + HarvestBarleyY11 * 2 + HarvestBarleyY10 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 19) and ticks <= 365 * (TheFirstHarvestYearF22 + 20) + [ + set HarvestBarleyY20 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY20 * 10 + HarvestBarleyY19 * 9 + HarvestBarleyY18 * 8 + HarvestBarleyY17 * 7 + HarvestBarleyY16 * 6 + HarvestBarleyY15 * 5 + HarvestBarleyY14 * 4 + HarvestBarleyY13 * 3 + HarvestBarleyY12 * 2 + HarvestBarleyY11 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 20) and ticks <= 365 * (TheFirstHarvestYearF22 + 21) + [ + set HarvestBarleyY21 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY21 * 10 + HarvestBarleyY20 * 9 + HarvestBarleyY19 * 8 + HarvestBarleyY18 * 7 + HarvestBarleyY17 * 6 + HarvestBarleyY16 * 5 + HarvestBarleyY15 * 4 + HarvestBarleyY14 * 3 + HarvestBarleyY13 * 2 + HarvestBarleyY12 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 21) and ticks <= 365 * (TheFirstHarvestYearF22 + 22) + [ + set HarvestBarleyY22 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY22 * 10 + HarvestBarleyY21 * 9 + HarvestBarleyY20 * 8 + HarvestBarleyY19 * 7 + HarvestBarleyY18 * 6 + HarvestBarleyY17 * 5 + HarvestBarleyY16 * 4 + HarvestBarleyY15 * 3 + HarvestBarleyY14 * 2 + HarvestBarleyY13 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 22) and ticks <= 365 * (TheFirstHarvestYearF22 + 23) + [ + set HarvestBarleyY23 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY23 * 10 + HarvestBarleyY22 * 9 + HarvestBarleyY21 * 8 + HarvestBarleyY20 * 7 + HarvestBarleyY19 * 6 + HarvestBarleyY18 * 5 + HarvestBarleyY17 * 4 + HarvestBarleyY16 * 3 + HarvestBarleyY15 * 2 + HarvestBarleyY14 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 23) and ticks <= 365 * (TheFirstHarvestYearF22 + 24) + [ + set HarvestBarleyY24 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY24 * 10 + HarvestBarleyY23 * 9 + HarvestBarleyY22 * 8 + HarvestBarleyY21 * 7 + HarvestBarleyY20 * 6 + HarvestBarleyY19 * 5 + HarvestBarleyY18 * 4 + HarvestBarleyY17 * 3 + HarvestBarleyY16 * 2 + HarvestBarleyY15 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 24) and ticks <= 365 * (TheFirstHarvestYearF22 + 25) + [ + set HarvestBarleyY25 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY25 * 10 + HarvestBarleyY24 * 9 + HarvestBarleyY23 * 8 + HarvestBarleyY22 * 7 + HarvestBarleyY21 * 6 + HarvestBarleyY20 * 5 + HarvestBarleyY19 * 4 + HarvestBarleyY18 * 3 + HarvestBarleyY17 * 2 + HarvestBarleyY16 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 25) and ticks <= 365 * (TheFirstHarvestYearF22 + 26) + [ + set HarvestBarleyY26 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY26 * 10 + HarvestBarleyY25 * 9 + HarvestBarleyY24 * 8 + HarvestBarleyY23 * 7 + HarvestBarleyY22 * 6 + HarvestBarleyY21 * 5 + HarvestBarleyY20 * 4 + HarvestBarleyY19 * 3 + HarvestBarleyY18 * 2 + HarvestBarleyY17 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 26) and ticks <= 365 * (TheFirstHarvestYearF22 + 27) + [ + set HarvestBarleyY27 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY27 * 10 + HarvestBarleyY26 * 9 + HarvestBarleyY25 * 8 + HarvestBarleyY24 * 7 + HarvestBarleyY23 * 6 + HarvestBarleyY22 * 5 + HarvestBarleyY21 * 4 + HarvestBarleyY20 * 3 + HarvestBarleyY19 * 2 + HarvestBarleyY18 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 27) and ticks <= 365 * (TheFirstHarvestYearF22 + 28) + [ + set HarvestBarleyY28 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY28 * 10 + HarvestBarleyY27 * 9 + HarvestBarleyY26 * 8 + HarvestBarleyY25 * 7 + HarvestBarleyY24 * 6 + HarvestBarleyY23 * 5 + HarvestBarleyY22 * 4 + HarvestBarleyY21 * 3 + HarvestBarleyY20 * 2 + HarvestBarleyY19 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 28) and ticks <= 365 * (TheFirstHarvestYearF22 + 29) + [ + set HarvestBarleyY29 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY29 * 10 + HarvestBarleyY28 * 9 + HarvestBarleyY27 * 8 + HarvestBarleyY26 * 7 + HarvestBarleyY25 * 6 + HarvestBarleyY24 * 5 + HarvestBarleyY23 * 4 + HarvestBarleyY22 * 3 + HarvestBarleyY21 * 2 + HarvestBarleyY20 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 29) and ticks <= 365 * (TheFirstHarvestYearF22 + 30) + [ + set HarvestBarleyY30 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY30 * 10 + HarvestBarleyY29 * 9 + HarvestBarleyY28 * 8 + HarvestBarleyY27 * 7 + HarvestBarleyY26 * 6 + HarvestBarleyY25 * 5 + HarvestBarleyY24 * 4 + HarvestBarleyY23 * 3 + HarvestBarleyY22 * 2 + HarvestBarleyY21 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 30) and ticks <= 365 * (TheFirstHarvestYearF22 + 31) + [ + set HarvestBarleyY31 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY31 * 10 + HarvestBarleyY30 * 9 + HarvestBarleyY29 * 8 + HarvestBarleyY28 * 7 + HarvestBarleyY27 * 6 + HarvestBarleyY26 * 5 + HarvestBarleyY25 * 4 + HarvestBarleyY24 * 3 + HarvestBarleyY23 * 2 + HarvestBarleyY22 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 31) and ticks <= 365 * (TheFirstHarvestYearF22 + 32) + [ + set HarvestBarleyY32 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY32 * 10 + HarvestBarleyY31 * 9 + HarvestBarleyY30 * 8 + HarvestBarleyY29 * 7 + HarvestBarleyY28 * 6 + HarvestBarleyY27 * 5 + HarvestBarleyY26 * 4 + HarvestBarleyY25 * 3 + HarvestBarleyY24 * 2 + HarvestBarleyY23 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 32) and ticks <= 365 * (TheFirstHarvestYearF22 + 33) + [ + set HarvestBarleyY33 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY33 * 10 + HarvestBarleyY32 * 9 + HarvestBarleyY31 * 8 + HarvestBarleyY30 * 7 + HarvestBarleyY29 * 6 + HarvestBarleyY28 * 5 + HarvestBarleyY27 * 4 + HarvestBarleyY26 * 3 + HarvestBarleyY25 * 2 + HarvestBarleyY24 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 33) and ticks <= 365 * (TheFirstHarvestYearF22 + 34) + [ + set HarvestBarleyY34 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY34 * 10 + HarvestBarleyY33 * 9 + HarvestBarleyY32 * 8 + HarvestBarleyY31 * 7 + HarvestBarleyY30 * 6 + HarvestBarleyY29 * 5 + HarvestBarleyY28 * 4 + HarvestBarleyY27 * 3 + HarvestBarleyY26 * 2 + HarvestBarleyY25 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 34) and ticks <= 365 * (TheFirstHarvestYearF22 + 35) + [ + set HarvestBarleyY35 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY35 * 10 + HarvestBarleyY34 * 9 + HarvestBarleyY33 * 8 + HarvestBarleyY32 * 7 + HarvestBarleyY31 * 6 + HarvestBarleyY30 * 5 + HarvestBarleyY29 * 4 + HarvestBarleyY28 * 3 + HarvestBarleyY27 * 2 + HarvestBarleyY26 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 35) and ticks <= 365 * (TheFirstHarvestYearF22 + 36) + [ + set HarvestBarleyY36 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY36 * 10 + HarvestBarleyY35 * 9 + HarvestBarleyY34 * 8 + HarvestBarleyY33 * 7 + HarvestBarleyY32 * 6 + HarvestBarleyY31 * 5 + HarvestBarleyY30 * 4 + HarvestBarleyY29 * 3 + HarvestBarleyY28 * 2 + HarvestBarleyY27 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 36) and ticks <= 365 * (TheFirstHarvestYearF22 + 37) + [ + set HarvestBarleyY37 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY37 * 10 + HarvestBarleyY36 * 9 + HarvestBarleyY35 * 8 + HarvestBarleyY34 * 7 + HarvestBarleyY33 * 6 + HarvestBarleyY32 * 5 + HarvestBarleyY31 * 4 + HarvestBarleyY30 * 3 + HarvestBarleyY29 * 2 + HarvestBarleyY28 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 37) and ticks <= 365 * (TheFirstHarvestYearF22 + 38) + [ + set HarvestBarleyY38 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY38 * 10 + HarvestBarleyY37 * 9 + HarvestBarleyY36 * 8 + HarvestBarleyY35 * 7 + HarvestBarleyY34 * 6 + HarvestBarleyY33 * 5 + HarvestBarleyY32 * 4 + HarvestBarleyY31 * 3 + HarvestBarleyY30 * 2 + HarvestBarleyY29 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 38) and ticks <= 365 * (TheFirstHarvestYearF22 + 39) + [ + set HarvestBarleyY39 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY39 * 10 + HarvestBarleyY38 * 9 + HarvestBarleyY37 * 8 + HarvestBarleyY36 * 7 + HarvestBarleyY35 * 6 + HarvestBarleyY34 * 5 + HarvestBarleyY33 * 4 + HarvestBarleyY32 * 3 + HarvestBarleyY31 * 2 + HarvestBarleyY30 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 39) and ticks <= 365 * (TheFirstHarvestYearF22 + 40) + [ + set HarvestBarleyY40 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY40 * 10 + HarvestBarleyY39 * 9 + HarvestBarleyY38 * 8 + HarvestBarleyY37 * 7 + HarvestBarleyY36 * 6 + HarvestBarleyY35 * 5 + HarvestBarleyY34 * 4 + HarvestBarleyY33 * 3 + HarvestBarleyY32 * 2 + HarvestBarleyY31 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 40) and ticks <= 365 * (TheFirstHarvestYearF22 + 41) + [ + set HarvestBarleyY41 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY41 * 10 + HarvestBarleyY40 * 9 + HarvestBarleyY39 * 8 + HarvestBarleyY38 * 7 + HarvestBarleyY37 * 6 + HarvestBarleyY36 * 5 + HarvestBarleyY35 * 4 + HarvestBarleyY34 * 3 + HarvestBarleyY33 * 2 + HarvestBarleyY32 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 41) and ticks <= 365 * (TheFirstHarvestYearF22 + 42) + [ + set HarvestBarleyY42 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY42 * 10 + HarvestBarleyY41 * 9 + HarvestBarleyY40 * 8 + HarvestBarleyY39 * 7 + HarvestBarleyY38 * 6 + HarvestBarleyY37 * 5 + HarvestBarleyY36 * 4 + HarvestBarleyY35 * 3 + HarvestBarleyY34 * 2 + HarvestBarleyY33 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 42) and ticks <= 365 * (TheFirstHarvestYearF22 + 43) + [ + set HarvestBarleyY43 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY43 * 10 + HarvestBarleyY42 * 9 + HarvestBarleyY41 * 8 + HarvestBarleyY40 * 7 + HarvestBarleyY39 * 6 + HarvestBarleyY38 * 5 + HarvestBarleyY37 * 4 + HarvestBarleyY36 * 3 + HarvestBarleyY35 * 2 + HarvestBarleyY34 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 43) and ticks <= 365 * (TheFirstHarvestYearF22 + 44) + [ + set HarvestBarleyY44 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY44 * 10 + HarvestBarleyY43 * 9 + HarvestBarleyY42 * 8 + HarvestBarleyY41 * 7 + HarvestBarleyY40 * 6 + HarvestBarleyY39 * 5 + HarvestBarleyY38 * 4 + HarvestBarleyY37 * 3 + HarvestBarleyY36 * 2 + HarvestBarleyY35 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 44) and ticks <= 365 * (TheFirstHarvestYearF22 + 45) + [ + set HarvestBarleyY45 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY45 * 10 + HarvestBarleyY44 * 9 + HarvestBarleyY43 * 8 + HarvestBarleyY42 * 7 + HarvestBarleyY41 * 6 + HarvestBarleyY40 * 5 + HarvestBarleyY39 * 4 + HarvestBarleyY38 * 3 + HarvestBarleyY37 * 2 + HarvestBarleyY36 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 45) and ticks <= 365 * (TheFirstHarvestYearF22 + 46) + [ + set HarvestBarleyY46 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY46 * 10 + HarvestBarleyY45 * 9 + HarvestBarleyY44 * 8 + HarvestBarleyY43 * 7 + HarvestBarleyY42 * 6 + HarvestBarleyY41 * 5 + HarvestBarleyY40 * 4 + HarvestBarleyY39 * 3 + HarvestBarleyY38 * 2 + HarvestBarleyY37 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 46) and ticks <= 365 * (TheFirstHarvestYearF22 + 47) + [ + set HarvestBarleyY47 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY47 * 10 + HarvestBarleyY46 * 9 + HarvestBarleyY45 * 8 + HarvestBarleyY44 * 7 + HarvestBarleyY43 * 6 + HarvestBarleyY42 * 5 + HarvestBarleyY41 * 4 + HarvestBarleyY40 * 3 + HarvestBarleyY39 * 2 + HarvestBarleyY38 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 47) and ticks <= 365 * (TheFirstHarvestYearF22 + 48) + [ + set HarvestBarleyY48 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY48 * 10 + HarvestBarleyY47 * 9 + HarvestBarleyY46 * 8 + HarvestBarleyY45 * 7 + HarvestBarleyY44 * 6 + HarvestBarleyY43 * 5 + HarvestBarleyY42 * 4 + HarvestBarleyY41 * 3 + HarvestBarleyY40 * 2 + HarvestBarleyY39 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 48) and ticks <= 365 * (TheFirstHarvestYearF22 + 49) + [ + set HarvestBarleyY49 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY49 * 10 + HarvestBarleyY48 * 9 + HarvestBarleyY47 * 8 + HarvestBarleyY46 * 7 + HarvestBarleyY45 * 6 + HarvestBarleyY44 * 5 + HarvestBarleyY43 * 4 + HarvestBarleyY42 * 3 + HarvestBarleyY41 * 2 + HarvestBarleyY40 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 49) and ticks <= 365 * (TheFirstHarvestYearF22 + 50) + [ + set HarvestBarleyY50 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY50 * 10 + HarvestBarleyY49 * 9 + HarvestBarleyY48 * 8 + HarvestBarleyY47 * 7 + HarvestBarleyY46 * 6 + HarvestBarleyY45 * 5 + HarvestBarleyY44 * 4 + HarvestBarleyY43 * 3 + HarvestBarleyY42 * 2 + HarvestBarleyY41 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 50) and ticks <= 365 * (TheFirstHarvestYearF22 + 51) + [ + set HarvestBarleyY51 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY51 * 10 + HarvestBarleyY50 * 9 + HarvestBarleyY49 * 8 + HarvestBarleyY48 * 7 + HarvestBarleyY47 * 6 + HarvestBarleyY46 * 5 + HarvestBarleyY45 * 4 + HarvestBarleyY44 * 3 + HarvestBarleyY43 * 2 + HarvestBarleyY42 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 51) and ticks <= 365 * (TheFirstHarvestYearF22 + 52) + [ + set HarvestBarleyY52 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY52 * 10 + HarvestBarleyY51 * 9 + HarvestBarleyY50 * 8 + HarvestBarleyY49 * 7 + HarvestBarleyY48 * 6 + HarvestBarleyY47 * 5 + HarvestBarleyY46 * 4 + HarvestBarleyY45 * 3 + HarvestBarleyY44 * 2 + HarvestBarleyY43 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 52) and ticks <= 365 * (TheFirstHarvestYearF22 + 53) + [ + set HarvestBarleyY53 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY53 * 10 + HarvestBarleyY52 * 9 + HarvestBarleyY51 * 8 + HarvestBarleyY50 * 7 + HarvestBarleyY49 * 6 + HarvestBarleyY48 * 5 + HarvestBarleyY47 * 4 + HarvestBarleyY46 * 3 + HarvestBarleyY45 * 2 + HarvestBarleyY44 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 53) and ticks <= 365 * (TheFirstHarvestYearF22 + 54) + [ + set HarvestBarleyY54 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY54 * 10 + HarvestBarleyY53 * 9 + HarvestBarleyY52 * 8 + HarvestBarleyY51 * 7 + HarvestBarleyY50 * 6 + HarvestBarleyY49 * 5 + HarvestBarleyY48 * 4 + HarvestBarleyY47 * 3 + HarvestBarleyY46 * 2 + HarvestBarleyY45 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 54) and ticks <= 365 * (TheFirstHarvestYearF22 + 55) + [ + set HarvestBarleyY55 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY55 * 10 + HarvestBarleyY54 * 9 + HarvestBarleyY53 * 8 + HarvestBarleyY52 * 7 + HarvestBarleyY51 * 6 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 4 + HarvestBarleyY48 * 3 + HarvestBarleyY47 * 2 + HarvestBarleyY46 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 55) and ticks <= 365 * (TheFirstHarvestYearF22 + 56) + [ + set HarvestBarleyY56 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY56 * 10 + HarvestBarleyY55 * 9 + HarvestBarleyY54 * 8 + HarvestBarleyY53 * 7 + HarvestBarleyY52 * 6 + HarvestBarleyY51 * 5 + HarvestBarleyY50 * 5 + HarvestBarleyY49 * 3 + HarvestBarleyY48 * 2 + HarvestBarleyY47 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 56) and ticks <= 365 * (TheFirstHarvestYearF22 + 57) + [ + set HarvestBarleyY57 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY57 * 10 + HarvestBarleyY56 * 9 + HarvestBarleyY55 * 8 + HarvestBarleyY54 * 7 + HarvestBarleyY53 * 6 + HarvestBarleyY52 * 5 + HarvestBarleyY51 * 4 + HarvestBarleyY50 * 3 + HarvestBarleyY49 * 2 + HarvestBarleyY48 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 57) and ticks <= 365 * (TheFirstHarvestYearF22 + 58) + [ + set HarvestBarleyY58 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY58 * 10 + HarvestBarleyY57 * 9 + HarvestBarleyY56 * 8 + HarvestBarleyY55 * 7 + HarvestBarleyY54 * 6 + HarvestBarleyY53 * 5 + HarvestBarleyY52 * 4 + HarvestBarleyY51 * 3 + HarvestBarleyY50 * 2 + HarvestBarleyY49 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 58) and ticks <= 365 * (TheFirstHarvestYearF22 + 59) + [ + set HarvestBarleyY59 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY59 * 10 + HarvestBarleyY58 * 9 + HarvestBarleyY57 * 8 + HarvestBarleyY56 * 7 + HarvestBarleyY55 * 6 + HarvestBarleyY54 * 5 + HarvestBarleyY53 * 4 + HarvestBarleyY52 * 3 + HarvestBarleyY51 * 2 + HarvestBarleyY50 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 59) and ticks <= 365 * (TheFirstHarvestYearF22 + 60) + [ + set HarvestBarleyY60 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY60 * 10 + HarvestBarleyY59 * 9 + HarvestBarleyY58 * 8 + HarvestBarleyY57 * 7 + HarvestBarleyY56 * 6 + HarvestBarleyY55 * 5 + HarvestBarleyY54 * 4 + HarvestBarleyY53 * 3 + HarvestBarleyY52 * 2 + HarvestBarleyY51 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 60) and ticks <= 365 * (TheFirstHarvestYearF22 + 61) + [ + set HarvestBarleyY61 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY61 * 10 + HarvestBarleyY60 * 9 + HarvestBarleyY59 * 8 + HarvestBarleyY58 * 7 + HarvestBarleyY57 * 6 + HarvestBarleyY56 * 5 + HarvestBarleyY55 * 4 + HarvestBarleyY54 * 3 + HarvestBarleyY53 * 2 + HarvestBarleyY52 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 61) and ticks <= 365 * (TheFirstHarvestYearF22 + 62) + [ + set HarvestBarleyY62 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY62 * 10 + HarvestBarleyY61 * 9 + HarvestBarleyY60 * 8 + HarvestBarleyY59 * 7 + HarvestBarleyY58 * 6 + HarvestBarleyY57 * 5 + HarvestBarleyY56 * 4 + HarvestBarleyY55 * 3 + HarvestBarleyY54 * 2 + HarvestBarleyY53 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 62) and ticks <= 365 * (TheFirstHarvestYearF22 + 63) + [ + set HarvestBarleyY63 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY63 * 10 + HarvestBarleyY62 * 9 + HarvestBarleyY61 * 8 + HarvestBarleyY60 * 7 + HarvestBarleyY59 * 6 + HarvestBarleyY58 * 5 + HarvestBarleyY57 * 4 + HarvestBarleyY56 * 3 + HarvestBarleyY55 * 2 + HarvestBarleyY54 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 63) and ticks <= 365 * (TheFirstHarvestYearF22 + 64) + [ + set HarvestBarleyY64 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY64 * 10 + HarvestBarleyY63 * 9 + HarvestBarleyY62 * 8 + HarvestBarleyY61 * 7 + HarvestBarleyY60 * 6 + HarvestBarleyY59 * 5 + HarvestBarleyY58 * 4 + HarvestBarleyY57 * 3 + HarvestBarleyY56 * 2 + HarvestBarleyY55 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 64) and ticks <= 365 * (TheFirstHarvestYearF22 + 65) + [ + set HarvestBarleyY65 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY65 * 10 + HarvestBarleyY64 * 9 + HarvestBarleyY63 * 8 + HarvestBarleyY62 * 7 + HarvestBarleyY61 * 6 + HarvestBarleyY60 * 5 + HarvestBarleyY59 * 4 + HarvestBarleyY58 * 3 + HarvestBarleyY57 * 2 + HarvestBarleyY56 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 65) and ticks <= 365 * (TheFirstHarvestYearF22 + 66) + [ + set HarvestBarleyY66 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY66 * 10 + HarvestBarleyY65 * 9 + HarvestBarleyY64 * 8 + HarvestBarleyY63 * 7 + HarvestBarleyY62 * 6 + HarvestBarleyY61 * 5 + HarvestBarleyY60 * 4 + HarvestBarleyY59 * 3 + HarvestBarleyY58 * 2 + HarvestBarleyY57 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 66) and ticks <= 365 * (TheFirstHarvestYearF22 + 67) + [ + set HarvestBarleyY67 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY67 * 10 + HarvestBarleyY66 * 9 + HarvestBarleyY65 * 8 + HarvestBarleyY64 * 7 + HarvestBarleyY63 * 6 + HarvestBarleyY62 * 5 + HarvestBarleyY61 * 4 + HarvestBarleyY60 * 3 + HarvestBarleyY59 * 2 + HarvestBarleyY58 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 67) and ticks <= 365 * (TheFirstHarvestYearF22 + 68) + [ + set HarvestBarleyY68 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY68 * 10 + HarvestBarleyY67 * 9 + HarvestBarleyY66 * 8 + HarvestBarleyY65 * 7 + HarvestBarleyY64 * 6 + HarvestBarleyY63 * 5 + HarvestBarleyY62 * 4 + HarvestBarleyY61 * 3 + HarvestBarleyY60 * 2 + HarvestBarleyY59 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 68) and ticks <= 365 * (TheFirstHarvestYearF22 + 69) + [ + set HarvestBarleyY69 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY69 * 10 + HarvestBarleyY68 * 9 + HarvestBarleyY67 * 8 + HarvestBarleyY66 * 7 + HarvestBarleyY65 * 6 + HarvestBarleyY64 * 5 + HarvestBarleyY63 * 4 + HarvestBarleyY62 * 3 + HarvestBarleyY61 * 2 + HarvestBarleyY60 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 69) and ticks <= 365 * (TheFirstHarvestYearF22 + 70) + [ + set HarvestBarleyY70 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY70 * 10 + HarvestBarleyY69 * 9 + HarvestBarleyY68 * 8 + HarvestBarleyY67 * 7 + HarvestBarleyY66 * 6 + HarvestBarleyY65 * 5 + HarvestBarleyY64 * 4 + HarvestBarleyY63 * 3 + HarvestBarleyY62 * 2 + HarvestBarleyY61 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 70) and ticks <= 365 * (TheFirstHarvestYearF22 + 71) + [ + set HarvestBarleyY71 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY71 * 10 + HarvestBarleyY70 * 9 + HarvestBarleyY69 * 8 + HarvestBarleyY68 * 7 + HarvestBarleyY67 * 6 + HarvestBarleyY66 * 5 + HarvestBarleyY65 * 4 + HarvestBarleyY64 * 3 + HarvestBarleyY63 * 2 + HarvestBarleyY62 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 71) and ticks <= 365 * (TheFirstHarvestYearF22 + 72) + [ + set HarvestBarleyY72 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY72 * 10 + HarvestBarleyY71 * 9 + HarvestBarleyY70 * 8 + HarvestBarleyY69 * 7 + HarvestBarleyY68 * 6 + HarvestBarleyY67 * 5 + HarvestBarleyY66 * 4 + HarvestBarleyY65 * 3 + HarvestBarleyY64 * 2 + HarvestBarleyY63 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 72) and ticks <= 365 * (TheFirstHarvestYearF22 + 73) + [ + set HarvestBarleyY73 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY73 * 10 + HarvestBarleyY72 * 9 + HarvestBarleyY71 * 8 + HarvestBarleyY70 * 7 + HarvestBarleyY69 * 6 + HarvestBarleyY68 * 5 + HarvestBarleyY67 * 4 + HarvestBarleyY66 * 3 + HarvestBarleyY65 * 2 + HarvestBarleyY64 * 1)/ + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 73) and ticks <= 365 * (TheFirstHarvestYearF22 + 74) + [ + set HarvestBarleyY74 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY74 * 10 + HarvestBarleyY73 * 9 + HarvestBarleyY72 * 8 + HarvestBarleyY71 * 7 + HarvestBarleyY70 * 6 + HarvestBarleyY69 * 5 + HarvestBarleyY68 * 4 + HarvestBarleyY67 * 3 + HarvestBarleyY66 * 2 + HarvestBarleyY65 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 74) and ticks <= 365 * (TheFirstHarvestYearF22 + 75) + [ + set HarvestBarleyY75 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY75 * 10 + HarvestBarleyY74 * 9 + HarvestBarleyY73 * 8 + HarvestBarleyY72 * 7 + HarvestBarleyY71 * 6 + HarvestBarleyY70 * 5 + HarvestBarleyY69 * 4 + HarvestBarleyY68 * 3 + HarvestBarleyY67 * 2 + HarvestBarleyY66 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 75) and ticks <= 365 * (TheFirstHarvestYearF22 + 76) + [ + set HarvestBarleyY76 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY76 * 10 + HarvestBarleyY75 * 9 + HarvestBarleyY74 * 8 + HarvestBarleyY73 * 7 + HarvestBarleyY72 * 6 + HarvestBarleyY71 * 5 + HarvestBarleyY70 * 4 + HarvestBarleyY69 * 3 + HarvestBarleyY68 * 2 + HarvestBarleyY67 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 76) and ticks <= 365 * (TheFirstHarvestYearF22 + 77) + [ + set HarvestBarleyY77 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY77 * 10 + HarvestBarleyY76 * 9 + HarvestBarleyY75 * 8 + HarvestBarleyY74 * 7 + HarvestBarleyY73 * 6 + HarvestBarleyY72 * 5 + HarvestBarleyY71 * 4 + HarvestBarleyY70 * 3 + HarvestBarleyY69 * 2 + HarvestBarleyY68 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 77) and ticks <= 365 * (TheFirstHarvestYearF22 + 78) + [ + set HarvestBarleyY78 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY78 * 10 + HarvestBarleyY77 * 9 + HarvestBarleyY76 * 8 + HarvestBarleyY75 * 7 + HarvestBarleyY74 * 6 + HarvestBarleyY73 * 5 + HarvestBarleyY72 * 4 + HarvestBarleyY71 * 3 + HarvestBarleyY70 * 2 + HarvestBarleyY69 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 78) and ticks <= 365 * (TheFirstHarvestYearF22 + 79) + [ + set HarvestBarleyY79 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY79 * 10 + HarvestBarleyY78 * 9 + HarvestBarleyY77 * 8 + HarvestBarleyY76 * 7 + HarvestBarleyY75 * 6 + HarvestBarleyY74 * 5 + HarvestBarleyY73 * 4 + HarvestBarleyY72 * 3 + HarvestBarleyY71 * 2 + HarvestBarleyY70 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 79) and ticks <= 365 * (TheFirstHarvestYearF22 + 80) + [ + set HarvestBarleyY80 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY80 * 10 + HarvestBarleyY79 * 9 + HarvestBarleyY78 * 8 + HarvestBarleyY77 * 7 + HarvestBarleyY76 * 6 + HarvestBarleyY75 * 5 + HarvestBarleyY74 * 4 + HarvestBarleyY73 * 3 + HarvestBarleyY72 * 2 + HarvestBarleyY71 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 80) and ticks <= 365 * (TheFirstHarvestYearF22 + 81) + [ + set HarvestBarleyY81 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY81 * 10 + HarvestBarleyY80 * 9 + HarvestBarleyY79 * 8 + HarvestBarleyY78 * 7 + HarvestBarleyY77 * 6 + HarvestBarleyY76 * 5 + HarvestBarleyY75 * 4 + HarvestBarleyY74 * 3 + HarvestBarleyY73 * 2 + HarvestBarleyY72 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 81) and ticks <= 365 * (TheFirstHarvestYearF22 + 82) + [ + set HarvestBarleyY82 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY82 * 10 + HarvestBarleyY81 * 9 + HarvestBarleyY80 * 8 + HarvestBarleyY79 * 7 + HarvestBarleyY78 * 6 + HarvestBarleyY77 * 5 + HarvestBarleyY76 * 4 + HarvestBarleyY75 * 3 + HarvestBarleyY74 * 2 + HarvestBarleyY73 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 82) and ticks <= 365 * (TheFirstHarvestYearF22 + 83) + [ + set HarvestBarleyY83 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY83 * 10 + HarvestBarleyY82 * 9 + HarvestBarleyY81 * 8 + HarvestBarleyY80 * 7 + HarvestBarleyY79 * 6 + HarvestBarleyY78 * 5 + HarvestBarleyY77 * 4 + HarvestBarleyY76 * 3 + HarvestBarleyY75 * 2 + HarvestBarleyY74 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 83) and ticks <= 365 * (TheFirstHarvestYearF22 + 84) + [ + set HarvestBarleyY84 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY84 * 10 + HarvestBarleyY83 * 9 + HarvestBarleyY82 * 8 + HarvestBarleyY81 * 7 + HarvestBarleyY80 * 6 + HarvestBarleyY79 * 5 + HarvestBarleyY78 * 4 + HarvestBarleyY77 * 3 + HarvestBarleyY76 * 2 + HarvestBarleyY75 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 4) and ticks <= 365 * (TheFirstHarvestYearF22 + 85) + [ + set HarvestBarleyY85 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY85 * 10 + HarvestBarleyY84 * 9 + HarvestBarleyY83 * 8 + HarvestBarleyY82 * 7 + HarvestBarleyY81 * 6 + HarvestBarleyY80 * 5 + HarvestBarleyY79 * 4 + HarvestBarleyY78 * 3 + HarvestBarleyY77 * 2 + HarvestBarleyY76 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 85) and ticks <= 365 * (TheFirstHarvestYearF22 + 86) + [ + set HarvestBarleyY86 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY86 * 10 + HarvestBarleyY85 * 9 + HarvestBarleyY84 * 8 + HarvestBarleyY83 * 7 + HarvestBarleyY82 * 6 + HarvestBarleyY81 * 5 + HarvestBarleyY80 * 4 + HarvestBarleyY79 * 3 + HarvestBarleyY78 * 2 + HarvestBarleyY77 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 86) and ticks <= 365 * (TheFirstHarvestYearF22 + 87) + [ + set HarvestBarleyY87 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY87 * 10 + HarvestBarleyY86 * 9 + HarvestBarleyY85 * 8 + HarvestBarleyY84 * 7 + HarvestBarleyY83 * 6 + HarvestBarleyY82 * 5 + HarvestBarleyY81 * 4 + HarvestBarleyY80 * 3 + HarvestBarleyY79 * 2 + HarvestBarleyY78 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 87) and ticks <= 365 * (TheFirstHarvestYearF22 + 88) + [ + set HarvestBarleyY88 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY88 * 10 + HarvestBarleyY87 * 9 + HarvestBarleyY86 * 8 + HarvestBarleyY85 * 7 + HarvestBarleyY84 * 6 + HarvestBarleyY83 * 5 + HarvestBarleyY82 * 4 + HarvestBarleyY81 * 3 + HarvestBarleyY80 * 2 + HarvestBarleyY79 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 88) and ticks <= 365 * (TheFirstHarvestYearF22 + 89) + [ + set HarvestBarleyY89 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY89 * 10 + HarvestBarleyY88 * 9 + HarvestBarleyY87 * 8 + HarvestBarleyY86 * 7 + HarvestBarleyY85 * 6 + HarvestBarleyY84 * 5 + HarvestBarleyY83 * 4 + HarvestBarleyY82 * 3 + HarvestBarleyY81 * 2 + HarvestBarleyY80 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 89) and ticks <= 365 * (TheFirstHarvestYearF22 + 90) + [ + set HarvestBarleyY90 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY90 * 10 + HarvestBarleyY89 * 9 + HarvestBarleyY88 * 8 + HarvestBarleyY87 * 7 + HarvestBarleyY86 * 6 + HarvestBarleyY85 * 5 + HarvestBarleyY84 * 4 + HarvestBarleyY83 * 3 + HarvestBarleyY82 * 2 + HarvestBarleyY81 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 90) and ticks <= 365 * (TheFirstHarvestYearF22 + 91) + [ + set HarvestBarleyY91 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY91 * 10 + HarvestBarleyY90 * 9 + HarvestBarleyY89 * 8 + HarvestBarleyY88 * 7 + HarvestBarleyY87 * 6 + HarvestBarleyY86 * 5 + HarvestBarleyY85 * 4 + HarvestBarleyY84 * 3 + HarvestBarleyY83 * 2 + HarvestBarleyY82 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 91) and ticks <= 365 * (TheFirstHarvestYearF22 + 92) + [ + set HarvestBarleyY92 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY92 * 10 + HarvestBarleyY91 * 9 + HarvestBarleyY90 * 8 + HarvestBarleyY89 * 7 + HarvestBarleyY88 * 6 + HarvestBarleyY87 * 5 + HarvestBarleyY86 * 4 + HarvestBarleyY85 * 3 + HarvestBarleyY84 * 2 + HarvestBarleyY83 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 92) and ticks <= 365 * (TheFirstHarvestYearF22 + 93) + [ + set HarvestBarleyY93 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY93 * 10 + HarvestBarleyY92 * 9 + HarvestBarleyY91 * 8 + HarvestBarleyY90 * 7 + HarvestBarleyY89 * 6 + HarvestBarleyY88 * 5 + HarvestBarleyY87 * 4 + HarvestBarleyY86 * 3 + HarvestBarleyY85 * 2 + HarvestBarleyY84 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 93) and ticks <= 365 * (TheFirstHarvestYearF22 + 94) + [ + set HarvestBarleyY94 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY94 * 10 + HarvestBarleyY93 * 9 + HarvestBarleyY92 * 8 + HarvestBarleyY91 * 7 + HarvestBarleyY90 * 6 + HarvestBarleyY89 * 5 + HarvestBarleyY88 * 4 + HarvestBarleyY87 * 3 + HarvestBarleyY86 * 2 + HarvestBarleyY85 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 94) and ticks <= 365 * (TheFirstHarvestYearF22 + 95) + [ + set HarvestBarleyY95 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY95 * 10 + HarvestBarleyY94 * 9 + HarvestBarleyY93 * 8 + HarvestBarleyY92 * 7 + HarvestBarleyY91 * 6 + HarvestBarleyY90 * 5 + HarvestBarleyY89 * 4 + HarvestBarleyY88 * 3 + HarvestBarleyY87 * 2 + HarvestBarleyY86 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 95) and ticks <= 365 * (TheFirstHarvestYearF22 + 96) + [ + set HarvestBarleyY96 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY96 * 10 + HarvestBarleyY95 * 9 + HarvestBarleyY94 * 8 + HarvestBarleyY93 * 7 + HarvestBarleyY92 * 6 + HarvestBarleyY91 * 5 + HarvestBarleyY90 * 4 + HarvestBarleyY89 * 3 + HarvestBarleyY88 * 2 + HarvestBarleyY87 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 96) and ticks <= 365 * (TheFirstHarvestYearF22 + 97) + [ + set HarvestBarleyY97 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY97 * 10 + HarvestBarleyY96 * 9 + HarvestBarleyY95 * 8 + HarvestBarleyY94 * 7 + HarvestBarleyY93 * 6 + HarvestBarleyY92 * 5 + HarvestBarleyY91 * 4 + HarvestBarleyY90 * 3 + HarvestBarleyY89 * 2 + HarvestBarleyY88 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 97) and ticks <= 365 * (TheFirstHarvestYearF22 + 98) + [ + set HarvestBarleyY98 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY98 * 10 + HarvestBarleyY97 * 9 + HarvestBarleyY96 * 8 + HarvestBarleyY95 * 7 + HarvestBarleyY94 * 6 + HarvestBarleyY93 * 5 + HarvestBarleyY92 * 4 + HarvestBarleyY91 * 3 + HarvestBarleyY90 * 2 + HarvestBarleyY89 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 98) and ticks <= 365 * (TheFirstHarvestYearF22 + 99) + [ + set HarvestBarleyY99 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY99 * 10 + HarvestBarleyY98 * 9 + HarvestBarleyY97 * 8 + HarvestBarleyY96 * 7 + HarvestBarleyY95 * 6 + HarvestBarleyY94 * 5 + HarvestBarleyY93 * 4 + HarvestBarleyY92 * 3 + HarvestBarleyY91 * 2 + HarvestBarleyY90 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + if ticks > 365 * (TheFirstHarvestYearF22 + 99) and ticks <= 365 * (TheFirstHarvestYearF22 + 100) + [ + set HarvestBarleyY100 BarleyYield + set AverageHarvestBarley ((HarvestBarleyY100 * 10 + HarvestBarleyY99 * 9 + HarvestBarleyY98 * 8 + HarvestBarleyY97 * 7 + HarvestBarleyY96 * 6 + HarvestBarleyY95 * 5 + HarvestBarleyY94 * 4 + HarvestBarleyY93 * 3 + HarvestBarleyY92 * 2 + HarvestBarleyY91 * 1) / + (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10)) + ] + ];;;FallowCountDown = 2 + ] + ] + ] + ] +end diff --git a/InitialLayout.txt b/InitialLayout.txt new file mode 100644 index 0000000..bac0586 --- /dev/null +++ b/InitialLayout.txt @@ -0,0 +1,23 @@ +[ +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 1 1 1 4 1 1 1 4 1 1 1 4 4 1 1 1 4 1 1 1 4 1 1 1 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 1 3 1 4 1 3 1 4 1 3 1 4 4 1 3 1 4 1 3 1 4 1 3 1 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 -2 -2 -2 -1 -2 -1 -2 -1 -2 -1 -2 -1 -2 5 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 1 3 1 4 1 3 1 4 4 4 4 4 4 1 3 1 4 1 3 1 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 1 1 1 4 1 1 1 4 4 4 4 4 4 1 1 1 4 1 1 1 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 0 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 +] diff --git a/main.nlogo b/main.nlogo new file mode 100644 index 0000000..0956fa3 --- /dev/null +++ b/main.nlogo @@ -0,0 +1,14906 @@ +__includes ["parameters.nls""FieldStorage.nls""ExpansionEvaluation.nls""ExpansionWithinSecondaryCanal.nls""HarvestMemory.nls""AvailableWaterSupply.nls""GateCapacity.nls""FarmersHarvestEvaluation.nls""ExpansionWithin2ndPrimaryCanal.nls"] + +to setup + clear-all + random-seed 290949 + print (word "current run = " (behaviorspace-run-number)) + show date-and-time ;; shows the current number of the run + file-open "InitialLayout.txt" ;; opens the txt file that contains land type classification and with the start of empty fields + set InitialLandscape file-read ;; sets the land type according to the file + file-close ;; closes the file, since we are done with + + ( foreach sort patches InitialLandscape ;; procedure that sorts patches on their land type + [ + [?1 ?2] -> ask ?1 + [ + set LandType ?2 ;; set the land type of this patch to the corresponding land type that is specified in the file + ] + ] + ) + + set-default-shape IrrigationVolumes "Irrigation" ;; represents 1 unit of irrigation volume with a shape of a Irrigation + set-default-shape RiverVolumes "River" ;; represents 1 unit of river water volume with a shape of river + set-default-shape StorageVolumes "Storage" ;; represents 1 unit of storage water volume with a shape of a square + set Q_randomizer 0 ;; set the deviation value of Qin_average is 0 + setuppatches ;; define the features of each patch ;; create list to store running output + reset-ticks ;; resets the time to zero +end + +to setuppatches + ask patches + [ + if LandType = -3 [set pcolor blue + 2] ;; secondary canal + if LandType = -2 [set pcolor blue ] ;; primary canal + if LandType = -1 + [ + set pcolor red + if pycor > 14 + [ + set ReadyforGCDecision_PrimaryCanal false ;; ready for GC change (boolean) + ] + ] ;; gate + if LandType = 0 [set pcolor blue - 1] ;; river + if LandType = 1 ;; fellow fields + [ + set pcolor brown + set IrrigationDemand 0 + ] + if LandType = 2 ;; barley fields + [ + set pcolor green + set IrrigationDemand BarleyIrrigationDemand ;; set irrigation demand to barley irrigation demand + set BarleyQuality 4 ;; set quality of barley to 3, since it starts healty + set HarvestCycle BarleyHarvestCycle ;; set the harvest cycle to barley + ] + if LandType = 3 ;; water storage + [ + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsPrimary false ;; the procedure of comparing the harvest every two years along the primary canal + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownPrimary ComparisonTime + set ComparisonCountDownSecondary ComparisonTime +;;;;;;these for meet good harvest first + set ContinuouslySameHarvestYearProcedure_1year_1st? False ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_1year_2nd? False ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_1year_3rd? False ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_1year_4th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_1year_5th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_1year_6th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + set ContinuouslySameHarvestYearProcedure_1year_7th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + set ContinuouslySameHarvestYearProcedure_1year_8th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + set ContinuouslySameHarvestYearProcedure_1year_9th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + set ContinuouslySameHarvestYearProcedure_1year_10th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + set ContinuouslySameHarvestYearProcedure_1year_11th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + set ContinuouslySameHarvestYearProcedure_1year_12th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + set ContinuouslySameHarvestYearProcedure_1year_13th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + set ContinuouslySameHarvestYearProcedure_1year_14th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + set ContinuouslySameHarvestYearProcedure_1year_15th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + set ContinuouslySameHarvestYearProcedure_1year_16th? False ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + set ContinuouslySameHarvestYearProcedure_2years_1st? False ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_2years_2nd? False ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_2years_3rd? False ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_2years_4th? False ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_2years_5th? False ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_2years_6th? False ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + set ContinuouslySameHarvestYearProcedure_2years_7th? False ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + set ContinuouslySameHarvestYearProcedure_2years_8th? False ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + set ContinuouslySameHarvestYearProcedure_3years_1st? False ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_3years_2nd? False ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_3years_3rd? False ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_3years_4th? False ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_3years_5th? False ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_3years_6th? False ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_4years_1st? False ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_4years_2nd? False ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_4years_3rd? False ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_4years_4th? False ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_4years_5th? False ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_4years_6th? False ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_5years_1st? False ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_5years_2nd? False ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_5years_3rd? False ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_5years_4th? False ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_5years_5th? False ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_5years_6th? False ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_6years_1st? False ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_6years_2nd? False ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_6years_3rd? False ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_6years_4th? False ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_6years_5th? False ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_6years_6th? False ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_1year_1st? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_1year_2nd? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_1year_3rd? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_1year_4th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_1year_5th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_1year_6th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + set ContinuouslyPoorHarvestYearProcedure_1year_7th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + set ContinuouslyPoorHarvestYearProcedure_1year_8th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + set ContinuouslyPoorHarvestYearProcedure_1year_9th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + set ContinuouslyPoorHarvestYearProcedure_1year_10th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + set ContinuouslyPoorHarvestYearProcedure_1year_11th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + set ContinuouslyPoorHarvestYearProcedure_1year_12th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + set ContinuouslyPoorHarvestYearProcedure_1year_13th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + set ContinuouslyPoorHarvestYearProcedure_1year_14th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + set ContinuouslyPoorHarvestYearProcedure_1year_15th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + set ContinuouslyPoorHarvestYearProcedure_1year_16th? False ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + set ContinuouslyPoorHarvestYearProcedure_2years_1st? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_2years_2nd? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_2years_3rd? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_2years_4th? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_2years_5th? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_2years_6th? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + set ContinuouslyPoorHarvestYearProcedure_2years_7th? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + set ContinuouslyPoorHarvestYearProcedure_2years_8th? False ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + set ContinuouslyPoorHarvestYearProcedure_3years_1st? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_3years_2nd? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_3years_3rd? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_3years_4th? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_3years_5th? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_3years_6th? False ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_4years_1st? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_4years_2nd? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_4years_3rd? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_4years_4th? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_4years_5th? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_4years_6th? False ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_5years_1st? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_5years_2nd? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_5years_3rd? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_5years_4th? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_5years_5th? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_5years_6th? False ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_6years_1st? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_6years_2nd? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_6years_3rd? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_6years_4th? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_6years_5th? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_6years_6th? False ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + set CountDownExpansion1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + set CountDownExpansion1_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + set CountDownExpansion1_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + set CountDownExpansion1_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + set CountDownExpansion1_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + set CountDownExpansion1_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + set CountDownExpansion1_7 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + set CountDownExpansion1_8 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + set CountDownExpansion1_9 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + set CountDownExpansion1_10 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + set CountDownExpansion1_11 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + set CountDownExpansion1_12 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + set CountDownExpansion1_13 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + set CountDownExpansion1_14 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + set CountDownExpansion1_15 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + set CountDownExpansion1_16 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + set CountDownExpansion2_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + set CountDownExpansion2_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + set CountDownExpansion2_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + set CountDownExpansion2_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + set CountDownExpansion2_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + set CountDownExpansion2_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + set CountDownExpansion2_7 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + set CountDownExpansion2_8 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + set CountDownExpansion3_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + set CountDownExpansion3_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + set CountDownExpansion3_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + set CountDownExpansion3_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + set CountDownExpansion3_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + set CountDownExpansion3_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + set CountDownExpansion4_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + set CountDownExpansion4_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + set CountDownExpansion4_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + set CountDownExpansion4_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + set CountDownExpansion4_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + set CountDownExpansion4_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + set CountDownExpansion5_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + set CountDownExpansion5_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + set CountDownExpansion5_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + set CountDownExpansion5_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + set CountDownExpansion5_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + set CountDownExpansion5_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + set CountDownExpansion6_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + set CountDownExpansion6_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + set CountDownExpansion6_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + set CountDownExpansion6_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + set CountDownExpansion6_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + set CountDownExpansion6_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + set CountDownMovement1_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + set CountDownMovement1_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + set CountDownMovement1_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + set CountDownMovement1_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + set CountDownMovement1_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + set CountDownMovement1_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + set CountDownMovement1_7 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + set CountDownMovement1_8 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + set CountDownMovement1_9 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + set CountDownMovement1_10 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + set CountDownMovement1_11 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + set CountDownMovement1_12 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + set CountDownMovement1_13 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + set CountDownMovement1_14 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + set CountDownMovement1_15 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + set CountDownMovement1_16 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + set CountDownMovement2_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + set CountDownMovement2_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + set CountDownMovement2_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + set CountDownMovement2_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + set CountDownMovement2_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + set CountDownMovement2_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + set CountDownMovement2_7 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + set CountDownMovement2_8 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + set CountDownMovement3_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + set CountDownMovement3_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + set CountDownMovement3_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + set CountDownMovement3_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + set CountDownMovement3_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + set CountDownMovement3_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + set CountDownMovement4_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + set CountDownMovement4_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + set CountDownMovement4_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + set CountDownMovement4_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + set CountDownMovement4_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + set CountDownMovement4_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + set CountDownMovement5_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + set CountDownMovement5_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + set CountDownMovement5_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + set CountDownMovement5_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + set CountDownMovement5_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + set CountDownMovement5_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + set CountDownMovement6_1 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + set CountDownMovement6_2 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + set CountDownMovement6_3 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + set CountDownMovement6_4 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + set CountDownMovement6_5 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + set CountDownMovement6_6 (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time + +;;;;;;these for meet poor harvest first + set ContinuouslySameHarvestYearProcedure_1year_1st?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_1year_2nd?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_1year_3rd?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_1year_4th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_1year_5th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_1year_6th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + set ContinuouslySameHarvestYearProcedure_1year_7th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + set ContinuouslySameHarvestYearProcedure_1year_8th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + set ContinuouslySameHarvestYearProcedure_1year_9th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + set ContinuouslySameHarvestYearProcedure_1year_10th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + set ContinuouslySameHarvestYearProcedure_1year_11th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + set ContinuouslySameHarvestYearProcedure_1year_12th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + set ContinuouslySameHarvestYearProcedure_1year_13th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + set ContinuouslySameHarvestYearProcedure_1year_14th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + set ContinuouslySameHarvestYearProcedure_1year_15th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + set ContinuouslySameHarvestYearProcedure_1year_16th?p False ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + set ContinuouslySameHarvestYearProcedure_2years_1st?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_2years_2nd?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_2years_3rd?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_2years_4th?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_2years_5th?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_2years_6th?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + set ContinuouslySameHarvestYearProcedure_2years_7th?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + set ContinuouslySameHarvestYearProcedure_2years_8th?p False ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + set ContinuouslySameHarvestYearProcedure_3years_1st?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_3years_2nd?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_3years_3rd?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_3years_4th?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_3years_5th?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_3years_6th?p False ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_4years_1st?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_4years_2nd?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_4years_3rd?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_4years_4th?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_4years_5th?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_4years_6th?p False ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_5years_1st?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_5years_2nd?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_5years_3rd?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_5years_4th?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_5years_5th?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_5years_6th?p False ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + set ContinuouslySameHarvestYearProcedure_6years_1st?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + set ContinuouslySameHarvestYearProcedure_6years_2nd?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + set ContinuouslySameHarvestYearProcedure_6years_3rd?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + set ContinuouslySameHarvestYearProcedure_6years_4th?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + set ContinuouslySameHarvestYearProcedure_6years_5th?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + set ContinuouslySameHarvestYearProcedure_6years_6th?p False ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_1year_1st?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_1year_2nd?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_1year_3rd?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_1year_4th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_1year_5th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_1year_6th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + set ContinuouslyPoorHarvestYearProcedure_1year_7th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + set ContinuouslyPoorHarvestYearProcedure_1year_8th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + set ContinuouslyPoorHarvestYearProcedure_1year_9th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + set ContinuouslyPoorHarvestYearProcedure_1year_10th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + set ContinuouslyPoorHarvestYearProcedure_1year_11th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + set ContinuouslyPoorHarvestYearProcedure_1year_12th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + set ContinuouslyPoorHarvestYearProcedure_1year_13th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + set ContinuouslyPoorHarvestYearProcedure_1year_14th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + set ContinuouslyPoorHarvestYearProcedure_1year_15th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + set ContinuouslyPoorHarvestYearProcedure_1year_16th?p False ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + set ContinuouslyPoorHarvestYearProcedure_2years_1st?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_2years_2nd?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_2years_3rd?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_2years_4th?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_2years_5th?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_2years_6th?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + set ContinuouslyPoorHarvestYearProcedure_2years_7th?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + set ContinuouslyPoorHarvestYearProcedure_2years_8th?p False ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + set ContinuouslyPoorHarvestYearProcedure_3years_1st?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_3years_2nd?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_3years_3rd?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_3years_4th?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_3years_5th?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_3years_6th?p False ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_4years_1st?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_4years_2nd?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_4years_3rd?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_4years_4th?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_4years_5th?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_4years_6th?p False ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_5years_1st?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_5years_2nd?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_5years_3rd?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_5years_4th?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_5years_5th?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_5years_6th?p False ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + set ContinuouslyPoorHarvestYearProcedure_6years_1st?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + set ContinuouslyPoorHarvestYearProcedure_6years_2nd?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + set ContinuouslyPoorHarvestYearProcedure_6years_3rd?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + set ContinuouslyPoorHarvestYearProcedure_6years_4th?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + set ContinuouslyPoorHarvestYearProcedure_6years_5th?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + set ContinuouslyPoorHarvestYearProcedure_6years_6th?p False ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + set CountDownExpansion1_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + set CountDownExpansion1_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + set CountDownExpansion1_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + set CountDownExpansion1_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + set CountDownExpansion1_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + set CountDownExpansion1_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + set CountDownExpansion1_7p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + set CountDownExpansion1_8p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + set CountDownExpansion1_9p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + set CountDownExpansion1_10p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + set CountDownExpansion1_11p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + set CountDownExpansion1_12p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + set CountDownExpansion1_13p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + set CountDownExpansion1_14p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + set CountDownExpansion1_15p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + set CountDownExpansion1_16p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + set CountDownExpansion2_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + set CountDownExpansion2_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + set CountDownExpansion2_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + set CountDownExpansion2_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + set CountDownExpansion2_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + set CountDownExpansion2_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + set CountDownExpansion2_7p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + set CountDownExpansion2_8p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + set CountDownExpansion3_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + set CountDownExpansion3_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + set CountDownExpansion3_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + set CountDownExpansion3_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + set CountDownExpansion3_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + set CountDownExpansion3_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + set CountDownExpansion4_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + set CountDownExpansion4_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + set CountDownExpansion4_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + set CountDownExpansion4_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + set CountDownExpansion4_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + set CountDownExpansion4_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + set CountDownExpansion5_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + set CountDownExpansion5_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + set CountDownExpansion5_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + set CountDownExpansion5_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + set CountDownExpansion5_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + set CountDownExpansion5_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + set CountDownExpansion6_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + set CountDownExpansion6_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + set CountDownExpansion6_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + set CountDownExpansion6_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + set CountDownExpansion6_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + set CountDownExpansion6_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + set CountDownMovement1_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + set CountDownMovement1_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + set CountDownMovement1_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + set CountDownMovement1_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + set CountDownMovement1_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + set CountDownMovement1_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + set CountDownMovement1_7p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + set CountDownMovement1_8p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + set CountDownMovement1_9p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + set CountDownMovement1_10p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + set CountDownMovement1_11p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + set CountDownMovement1_12p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + set CountDownMovement1_13p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + set CountDownMovement1_14p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + set CountDownMovement1_15p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + set CountDownMovement1_16p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + set CountDownMovement2_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + set CountDownMovement2_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + set CountDownMovement2_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + set CountDownMovement2_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + set CountDownMovement2_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + set CountDownMovement2_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + set CountDownMovement2_7p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + set CountDownMovement2_8p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + set CountDownMovement3_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + set CountDownMovement3_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + set CountDownMovement3_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + set CountDownMovement3_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + set CountDownMovement3_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + set CountDownMovement3_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + set CountDownMovement4_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + set CountDownMovement4_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + set CountDownMovement4_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + set CountDownMovement4_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + set CountDownMovement4_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + set CountDownMovement4_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + set CountDownMovement5_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + set CountDownMovement5_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + set CountDownMovement5_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + set CountDownMovement5_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + set CountDownMovement5_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + set CountDownMovement5_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + set CountDownMovement6_1p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + set CountDownMovement6_2p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + set CountDownMovement6_3p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + set CountDownMovement6_4p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + set CountDownMovement6_5p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + set CountDownMovement6_6p (ComparisonCountDownForCanalExpansion + 1) ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time + ] + if LandType = 4 [set pcolor green + 2] ;; none watercourse or fields + if LandType = 5 [set pcolor black] ;; edge of the world, without function + if LandType = 6 ;; fields when at preirrigation stagee + [ + set pcolor sky + ;set IrrigationDemand Pre-IrrigationDemand + ] + set ReadyForBarley false ;; fields can not be cultivated straight away from the start + set AlreadyWithBarley false ;; all fields without barley in he begainning + + set F11NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF11 CountDownForHarvestMemory + set F11NeverWithLand? True + set CountDownLandF11 CountDownForWaterAvailability + + set F14NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF14 CountDownForHarvestMemory + set F14NeverWithLand? True + set CountDownLandF14 CountDownForWaterAvailability + + set F15NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF15 CountDownForHarvestMemory + set F15NeverWithLand? True + set CountDownLandF15 CountDownForWaterAvailability + + set F16NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF16 CountDownForHarvestMemory + set F16NeverWithLand? True + set CountDownLandF16 CountDownForWaterAvailability + + set F17NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF17 CountDownForHarvestMemory + set F17NeverWithLand? True + set CountDownLandF17 CountDownForWaterAvailability + + set F20NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF20 CountDownForHarvestMemory + set F20NeverWithLand? True + set CountDownLandF20 CountDownForWaterAvailability + + set F21NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF21 CountDownForHarvestMemory + set F21NeverWithLand? True + set CountDownLandF21 CountDownForWaterAvailability + + set F22NeverWithBarley? true ;; use to record the farmer has the first harvest or not + set CountDownBarleyF22 CountDownForHarvestMemory + set F22NeverWithLand? True + set CountDownLandF22 CountDownForWaterAvailability + ] +end + +to go + set Year floor (ticks / 365) + 1 + set day ticks ;; time scale: daily + RiverInflow ;; runs the procedure of RiverFlow + + if ticks >= 3 and ticks <= 36500;21900;18250;10950;7300;3650 ;; the first sowing year + [ + with-local-randomness + [ + Flow-to-Primary-canal ;; initial setting includes one canal, let river volume moves to the primary canal first + Flow-to-Secondary-canal ;; dig a secondary canal + GateCapacity ;; set the capacity of head gate and farmer's gate + GateCapacity_F1-10 ;; set the capacity of head gate and farmer's gate along the primary canal F1-10 + GateCapacity_F11-13 ;; set the capacity of farmer's gate along the secondary canal F11-13 + GateCapacity_F11-14 ;; set the capacity of farmer's gate along the secondary canal F11-14 + GateCapacity_F11-15 ;; set the capacity of farmer's gate along the secondary canal F11-15 + GateCapacity_F11-16 ;; set the capacity of farmer's gate along the secondary canal F11-16 + GateCapacity_F17-19 ;; set the capacity of farmer's gate along the 2nd primary canal F17-19 + GateCapacity_F17-20 ;; set the capacity of farmer's gate along the 2nd primary canal F17-20 + GateCapacity_F17-21 ;; set the capacity of farmer's gate along the 2nd primary canal F17-21 + GateCapacity_F17-22 ;; set the capacity of farmer's gate along the 2nd primary canal F17-22 + GateFlow ;; water volume turns head at the gate and set the volume + FieldStorage ;; set the current storage of the storage patches + FieldStorageOverFlow ;; set the capacity of the storage patches + FirstSowChoice + FieldPreparation1 + InitialSow ;; create the situation in the first year + Irrigation ;; set irrigation actions + TrackFieldsReceivedWater ;; record the amount of received water of each field + WaterStress ;; set different levels of water stress to barley + Harvest ;; set the harvest actions + FarmersToTalBarley ;; caculate the total barley of each farmer + FarmersHarvestSituationPerYear ;; record the number of harvest fields and barley yields of each farmer in each year + FallowFields ;; set the fields after harvest + FarmersHarvestEvaluation ;; for GC variation, farmers evaluation for expanding canal from the 1st primary canal to the 1st secondary canal + HarvestMemory ;; set the barley harvest to each farmer (set as a seperate file) + AvailableWaterSupply ;; set the available suppy water to each farmer (set as a seperate file) + BarleySowSelection ;; set the barley sowing selection actions, farmers need to make decision based on the harvest and available water + FieldPreparation2 + FieldPreparation2-sub + FieldPreparation3 + FieldPreparation4 + FieldPreparation5 + ExpansionEvaluation ;; at the end of 20th year, evaluate farmers' harvest and to decide to expand or movement + FarmersHarvestEvaluation_SecondayCanal ;; for GC variation, farmers evaluation for expanding farmers along the secondary canal + FarmersExpansionEvaluation_SecondayCanal ;; evaluate farmers' harvest situation and then decide to expand more farmers along the secondary canal or not + FarmersExpansionEvaluation_2ndPrimaryCanalF17-19 ;; the procedure shows the expansion from the secondary canal to the 2nd primary canal + FarmersExpansionEvaluation_2ndPrimaryCanal ;; the procedure shows the expansion within the 2nd primary canal from F17-19 to F20,, 21, 22. + FarmersHarvestEvaluationF17-22 ;; the procedure used to evaluate GC variation for F17-22 + Outflow ;; set the outflow of the river and canals + set-label ;; runs the procedure set-label + ] + ] + + if ticks = 36500 ;; run the model with 10;20;30;50 years + [ + print (word "This Run (" (behaviorspace-run-number) ") is done!") ;; displays that the run is done + stop + ] + + tick +end + +to RiverInflow + ask RiverVolumes [fd 1] + + let rand random 3 ;; local variable to randomize the inflow, 3 possibilities: average, lower than average, higher than average + + if rand = 0 + [ ;; inflow lower than average + ifelse Qin_randomizer > 0 + [ + set Q_randomizer ( (random Qin_randomizer ) + 1 ) ;; local variable that determines the downwards deviation from the average + ] + [ + set Q_randomizer 0 ;; ifelse the randomizer should be 0 + ] + + let number-of-RiverVolumes (Qin_average - Q_randomizer) ;; generate inflow of sum (average - randomizer) + + create-RiverVolumes number-of-RiverVolumes + [ + setxy 25 19 + set color blue + 2 ;; set color of turtle to dark blue + set size 0.5 ;; set size of turtle to 0.5 + set heading 180 + ] + ] + + if rand = 1 + [ ;; inflow is average + let number-of-RiverVolumes Qin_average + create-RiverVolumes number-of-RiverVolumes ;; generate inflow of Qin_average + [ + setxy 25 19 + set color blue + 2 ;; set color of turtle to dark blue + set size 0.5 ;; set size of turtle to 0.5 + set heading 180 + ] + ] + + if rand = 2 + [ ;; inflow is higher than average + ifelse Qin_randomizer > 0 + [ + set Q_randomizer ( ( random Qin_randomizer ) + 1 ) ;; local variable that determines the downwards deviation from the average + ] + [ + set Q_randomizer 0 ;; ifelse the randomizer should be 0 + ] + + let number-of-RiverVolumes ( Qin_average + Q_randomizer ) + + create-RiverVolumes number-of-RiverVolumes ;; generate inflow of sum (average + randomizer) + [ + setxy 25 19 + set color blue + 2 ;; set color of turtle to dark blue + set size 0.5 ;; set size of turtle to 0.5 + set heading 180 + ] + ] +end + +to Flow-to-Primary-canal + ask patches with [pcolor = blue - 1] + [ + if pxcor = 25 and pycor = 17 + [ + ifelse [pcolor] of patch (pxcor - 1) pycor != blue + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ] + [ + ifelse [LandType] of patch 44 18 != 4 + [ + ;; F17-19 + ifelse [pcolor] of patch (pxcor - 9) pycor != red + [ + ask n-of (round ((count RiverVolumes-here) * (16 / 19))) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ;;the rest moves to the 2nd primary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + [ + ;; F17-20 + ifelse [pcolor] of patch (pxcor - 11) pycor != red + [ + ask n-of (round ((count RiverVolumes-here) * (16 / 20))) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ;;the rest moves to the 2nd primary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + [ + ;; F17-21 + ifelse [pcolor] of patch (pxcor - 13) pycor != red + [ + ask n-of (round ((count RiverVolumes-here) * (16 / 21))) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ;;the rest moves to the 2nd primary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + [ + ;; F17-22 + ask n-of (round ((count RiverVolumes-here) * (16 / 22))) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ;;the rest moves to the 2nd primary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + ] + ] + ] + [ + ;;poor harvest and expanded + ;; F17-19 + if [pcolor] of patch (pxcor - 9) pycor != red + [ + ask n-of (round ((count RiverVolumes-here) * (7 / 10))) RiverVolumes-here + [ + lt 90 + fd 1 + ] + ;;the rest moves to the 2nd primary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + ] + ] + ] + ] +end + +to Flow-to-Secondary-canal + ask patches with [pcolor = blue] + [ + if pxcor = 38 and pycor = 17 + [ + if [pcolor] of patch pxcor (pycor - 1) = blue + 2 + [ + ;;canal expansion because of good harvest + if [pcolor] of patch (pxcor + 7) (pycor + 2) != green + 2 ;; expansion + [ + ;; F11-13 + ifelse [pcolor] of patch pxcor (pycor - 10) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (6 / 8))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;; F11-14 + ifelse [pcolor] of patch pxcor (pycor - 12) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (5 / 9))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;;F11-15 + ifelse [pcolor] of patch pxcor (pycor - 14) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (1 / 2))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;; F11-16 + ask n-of (round ((count RiverVolumes-here) * (5 / 11))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + ] + ] + ] + + ;;canal expansion because of poor harvest + if [pcolor] of patch (pxcor + 7) (pycor + 2) = green + 2 ;; movement + [ + ;; F11-13 + ifelse [pcolor] of patch pxcor (pycor - 10) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (2 / 5))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;; F11-14 + ifelse [pcolor] of patch pxcor (pycor - 12) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (2 / 6))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;;F11-15 + ifelse [pcolor] of patch pxcor (pycor - 14) != red + 2 + [ + ask n-of (round ((count RiverVolumes-here) * (2 / 7))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + [ + ;; F11-16 + ask n-of (round ((count RiverVolumes-here) * (2 / 8))) RiverVolumes-here ;; stay in the primary canal + [ + fd 1 + ] + ] + ] + ] + ] + + ;;the rest moves to the secondary canal + ask n-of (count RiverVolumes-here) RiverVolumes-here ;; flow to the secondary canal + [ + rt 90 + fd 1 + ] + ] + ] + ] +end + +to GateFlow + ;;for gates along the primary canal + ask patches with [pcolor = red and pycor = 17] ;; ask gates at the right side of the river + [ + ;; for F1-10 + if pxcor = 28 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 32 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 36 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 41 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 45 and [pcolor] of patch pxcor (pycor + 1) = grey + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 49 and [pcolor] of patch pxcor (pycor + 1) = grey + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 30 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 34 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 43 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 47 and [pcolor] of patch pxcor (pycor - 1) = grey + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + ;; for F17-22 + if pxcor = 22 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 20 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 18 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 16 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + if pxcor = 14 + [ + ifelse [CurrentStorage] of patch pxcor (pycor + 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + if pxcor = 12 + [ + ifelse [CurrentStorage] of patch pxcor (pycor - 1) < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] +] + ;;for gates along the secondary canal, F11-16 + ask patches with [pcolor = red + 2 and pxcor = 38] ;; ask gates at the right side of the river + [ + ;F11 + if pycor = 13 + [ + ifelse [CurrentStorage] of patch (pxcor - 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + ;F12 + if pycor = 11 + [ + ifelse [CurrentStorage] of patch (pxcor + 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + ;F13 + if pycor = 9 + [ + ifelse [CurrentStorage] of patch (pxcor - 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + ;F14 + if pycor = 7 + [ + ifelse [CurrentStorage] of patch (pxcor + 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + ;F15 + if pycor = 5 + [ + ifelse [CurrentStorage] of patch (pxcor - 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [rt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [rt 90] + ] + ] + [ + ] + ] + ;F16 + if pycor = 3 + [ + ifelse [CurrentStorage] of patch (pxcor + 1) pycor < MaximunStorageOfStoragePatch + [ + ifelse (count RiverVolumes-here - QGateMax) > 0 ;; if the river volumes here more than te gate capacity + [ + ask n-of QGateMax RiverVolumes-here [lt 90] + ] + [ + ask n-of (count RiverVolumes-here) RiverVolumes-here [lt 90] + ] + ] + [ + ] + ] + ] +end + + +to FieldStorageOverFlow + ask patches with [pcolor = grey] ;; ask the fields which used to store the irrigation water + [ + if CurrentStorage > MaximunStorageOfStoragePatch ;; if the current storage exceeds the maximum storage + [ + ask n-of (CurrentStorage - MaximunStorageOfStoragePatch) StorageVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set CurrentStorage MaximunStorageOfStoragePatch ;; set current storage to the FirsIrrigationDemand + ] + ] +end + +to FirstSowChoice + ask patches with [LandType = 1] ;; ask fallow fields + [ + if ReadyForBarley = true + [ + if pxcor > 25 + [ + ;;for gates along the 1st primary canal + if pycor > 14 + [ + if ([CurrentStorage] of patch (pxcor + 1) pycor) > 0 ;;field1 + [ + if count HarvestBarleyRecords-here = 0 + [ + set LandType 6 + set pcolor sky + ] + ] + ] + ;;for gates along the secondary canal + if pycor < 15 + [ + ifelse pxcor > 35 and pxcor < 41 and pycor > 8 and pycor < 16 + [ + if ([CurrentStorage] of patch pxcor (pycor - 1)) > 0 ;;field1 + [ + if count HarvestBarleyRecords-here = 0 + [ + set LandType 6 + set pcolor sky + ] + ] + ] + [ + if ([CurrentStorage] of patch pxcor (pycor - 1)) > 0 ;;field1 + [ + if count HarvestBarleyRecords-here = 0 + [ + set LandType 6 + set pcolor sky + ] + ] + ] + ] + ] + if pxcor < 25 + [ + if ([CurrentStorage] of patch (pxcor + 1) pycor) > 0 ;;field1 + [ + if count HarvestBarleyRecords-here = 0 + [ + set LandType 6 + set pcolor sky + ] + ] + ] + ] + ] +end + +to FieldPreparation1 + ask patches with [LandType = 6] ;; ask fields that need pre irrigation, always means field1 in the first sowing year + [ + set IrrigationDemand Pre-IrrigationDemand +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pycor > 14 + [ + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;for gates along the secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pycor < 15 + [ + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater1 IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater1 Counter + set plabel Counter + ] + show word "ReceivedWater1:" ReceivedWater1 + ] + + if ReceivedWater1 >= 82 ;; if farmers start barley > 0 and there is storage volume in the storage patch + [ + set LandType 2 ;; sowing barley + set pcolor green + set HarvestCycle (BarleyHarvestCycle + 1) ;; set the harvest cycle, add one because at the end of this procedure, 1 day will already be substracted even when reset + set IrrigationMemory (BarleyIrrigationMemory + 1) + if pycor > 14 + [ + ask HarvestBarleyRecords [die] + ] + if pycor < 15 + [ + ask HarvestBarleyRecords-here [die] + ] + ] + ] +end + +to InitialSow + ask patches with [LandType = 2] ;; barley field + [ + set BarleyQuality 4 + set IrrigationDemand BarleyIrrigationDemand + BarleyGrowth + ] +end + +to BarleyGrowth ;; create barley + if (count BarleyPlants-here) < 1 + [ + sprout-BarleyPlants 1 + [ + set shape "plant" + set size 0.1 + set color black + ] + ] +end + +to Irrigation + ask patches with [LandType = 2] ;; ask fields with barley + [ + set IrrigationMemory (IrrigationMemory - 1) ;; for each tick the irrigation memory is reduced by 1, means minus one day + + if IrrigationMemory < 1 ;; fields need to be irrigated + [ + IrrigationBehaviour1 ;; run irrigation action + if Field-IrrigationVolume1 > 0 ;; if there is a irrigation volume in the barley field1 + [ + set IrrigationMemory (IrrigationMemory + BarleyIrrigationMemory) ;; reset the irrigation memory of barley + ] + ] + if IrrigationMemory < 1 ;; fields need to be irrigated + [ ;; run irrigation action + IrrigationBehaviour2 + if Field-IrrigationVolume2 > 0 ;; if there is a irrigation volume in the barley field2 + [ + set IrrigationMemory (IrrigationMemory + BarleyIrrigationMemory) ;; reset the irrigation memory of barley + ] + ] + if IrrigationMemory < 1 ;; fields need to be irrigated + [ + IrrigationBehaviour3 + if Field-IrrigationVolume3 > 0 ;; if there is a irrigation volume in the barley field2 + [ + set IrrigationMemory (IrrigationMemory + BarleyIrrigationMemory) ;; reset the irrigation memory of barley + ] + ] + if IrrigationMemory < 1 ;; fields need to be irrigated + [ + IrrigationBehaviour4 + if Field-IrrigationVolume4 > 0 ;; if there is a irrigation volume in the barley field2 + [ + set IrrigationMemory (IrrigationMemory + BarleyIrrigationMemory) ;; reset the irrigation memory of barley + ] + ] + if IrrigationMemory < 1 ;; fields need to be irrigated + [ + IrrigationBehaviour5 + if Field-IrrigationVolume5 > 0 ;; if there is a irrigation volume in the barley field2 + [ + set IrrigationMemory (IrrigationMemory + BarleyIrrigationMemory) ;; reset the irrigation memory of barley + ] + ] + ] +end +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;if expand a new field, the irrigation priority is satisfy the previous field when received water is lower than the irrigation demand;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;here, head gate capacity, storage capacity and river inflow, downstream farmers' welling should be considered;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +to IrrigationBehaviour1 + if pycor > 17 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + + if pycor < 17 ;; irrigation of the primary canal and the secondary canal should be separately + [ + ;;if field1 needs irrigation + ;;the primary canal + if pycor > 14 + [ + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ;;the second canal + if pycor < 15 + [ + if pxcor < 38 ;; left side of the secondary canal + [ + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pxcor > 38 ;; right side of the secondary canal + [ + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse any? BarleyPlants-here + [ + ifelse Counter >= IrrigationDemand + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] + set ReceivedWater IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater Counter + set plabel Counter + ] + ] + [ + set ReceivedWater 0 + set plabel 0 + ] + show word "ReceivedWater:" ReceivedWater + ] +end + +to IrrigationBehaviour2 + if pycor > 17 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + + if pycor < 17 + [ + ;;the primary canal + if pycor > 14 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ;;the secondary canal + if pycor < 15 + [ + if pxcor < 38 ;; left side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pxcor > 38 ;; right side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse any? BarleyPlants-here + [ + ifelse Counter >= IrrigationDemand + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] + set ReceivedWater IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater Counter + set plabel Counter + ] + ] + [ + set ReceivedWater 0 + set plabel 0 + ] + show word "ReceivedWater:" ReceivedWater + ] +end + +to IrrigationBehaviour3 + if pycor > 17 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor - 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + + if pycor < 17 + [ + ;;the primary canal + if pycor > 14 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ;;the secondary canal + if pycor < 15 + [ + if pxcor < 38 ;; left side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pxcor > 38 ;; right side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor - 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse any? BarleyPlants-here + [ + ifelse Counter >= IrrigationDemand + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] + set ReceivedWater IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater Counter + set plabel Counter + ] + ] + [ + set ReceivedWater 0 + set plabel 0 + ] + show word "ReceivedWater:" ReceivedWater + ] +end + +to IrrigationBehaviour4 + if pycor > 17 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor - 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + + if pycor < 17 + [ + ;;the primary canal + if pycor > 14 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ;;the secondary canal + if pycor < 15 + [ + if pxcor < 38 ;; left side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pxcor > 38 ;; right side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor - 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse any? BarleyPlants-here + [ + ifelse Counter >= IrrigationDemand + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] + set ReceivedWater IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater Counter + set plabel Counter + ] + ] + [ + set ReceivedWater 0 + set plabel 0 + ] + show word "ReceivedWater:" ReceivedWater + ] +end + +to IrrigationBehaviour5 + if pycor > 17 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [die] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor - 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, field4, and field5 need irrigation + if ([LandType] of patch (pxcor - 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume5 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume5 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume5 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes5 Field-IrrigationVolume5 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4 - Use-Field-IrrigationVolumes5) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Field-IrrigationVolume4 + Use-Field-IrrigationVolumes5) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume5 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + + if pycor < 17 + [ + ;;the primary canal + if pycor > 14 + [ + ;;if field1 needs irrigation + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch (pxcor + 1) pycor) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch (pxcor + 1) pycor ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch pxcor (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, field4, and field5 need irrigation + if ([LandType] of patch (pxcor - 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume5 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume5 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume5 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes5 Field-IrrigationVolume5 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4 - Use-Field-IrrigationVolumes5) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Field-IrrigationVolume4 + Use-Field-IrrigationVolumes5) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume5 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pycor < 15 + [ + if pxcor < 38 ;; left side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, field4, and field5 need irrigation + if ([LandType] of patch pxcor (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume5 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume5 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume5 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes5 Field-IrrigationVolume5 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4 - Use-Field-IrrigationVolumes5) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Field-IrrigationVolume4 + Use-Field-IrrigationVolumes5) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume5 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + if pxcor > 38 ;; right side of the secondary canal + [ + ;;if field1 needs irrigation + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage, field1 + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set the current storage of the field to the current storage in the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the water demand of the barley + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set irrigation volume to the irrigation demand + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the irrigation demand, set the irrigation volume to the maximum amount, which is the currently available volume in the storage patch + ] + + let Use-Field-IrrigationVolume1 Field-IrrigationVolume1 ;; local variable that allows the storage in the storage patch to be reduced according to the amount of water used for irrigation of barley on a field patch + + if ([pcolor] of patch pxcor (pycor - 1)) = grey ;; searches for the storage patch and if it is the storage patch, set the current storage + [ + ask patch pxcor (pycor - 1) ;; ask the storage patch + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolume1) ;; update the current storage to a lower amount because water was used for irrigation + ask n-of Use-Field-IrrigationVolume1 StorageVolumes-here [ die ] ;; ask storage volumes on the reservoir to die, the amount is equal to the amount of supplied irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 and field2 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 ;; storage patch, if field1 need preirrigation + [ ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) - Field-IrrigationVolume1) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume2 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume2 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Use-Field-IrrigationVolumes2) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, and field3 need irrigation + if ([LandType] of patch (pxcor - 1) pycor) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) pycor) - Field-IrrigationVolume1 - Field-IrrigationVolume2) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume3 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume3 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Use-Field-IrrigationVolumes3) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, and field4 need irrigation + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume4 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume4 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume4 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes4 Field-IrrigationVolume4 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Use-Field-IrrigationVolumes4) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Use-Field-IrrigationVolumes4) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume4 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ;;if field1 field2, field3, field4, and field5 need irrigation + if ([LandType] of patch pxcor (pycor + 1)) = 3 ;; storage patch, if field1 need preirrigation + [ + set IrrigationDemand Pre-IrrigationDemand ;; fellow field has no irrigation demand + set CurrentStorage (([CurrentStorage] of patch pxcor (pycor + 1)) - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4) ;; set currentstorage of the barley field to the currentstorage of the storage patch + + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume5 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + if CurrentStorage <= 0 + [ + set Field-IrrigationVolume5 0 + ] + if CurrentStorage > 0 and CurrentStorage < IrrigationDemand + [ + set Field-IrrigationVolume5 CurrentStorage + ] + ] + + let Use-Field-IrrigationVolumes5 Field-IrrigationVolume5 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Field-IrrigationVolume1 - Field-IrrigationVolume2 - Field-IrrigationVolume3 - Field-IrrigationVolume4 - Use-Field-IrrigationVolumes5) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of (Field-IrrigationVolume1 + Field-IrrigationVolume2 + Field-IrrigationVolume3 + Field-IrrigationVolume4 + Use-Field-IrrigationVolumes5) StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + ] + + sprout-IrrigationVolumes Field-IrrigationVolume5 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater Counter + set plabel Counter + ] + show word "ReceivedWater:" ReceivedWater + ] +end + +to TrackFieldsReceivedWater;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;improvement needed;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patches with [LandType = 2] + [ + if Harvestcycle = 145 + [ + ask IrrigationVolumes-here [die] + set plabel 0 + ] + if HarvestCycle = 109 + [ + set ReceivedWater2 ReceivedWater + ask IrrigationVolumes-here [die] + set plabel 0 + ] + if HarvestCycle = 73 + [ + set ReceivedWater3 ReceivedWater + ask IrrigationVolumes-here [die] + set plabel 0 + ] + if HarvestCycle = 37 + [ + set ReceivedWater4 ReceivedWater + ask IrrigationVolumes-here [die] + set plabel 0 + ] + if HarvestCycle = 1 + [ + set ReceivedWater5 ReceivedWater + ask IrrigationVolumes-here [die] + set plabel 0 + ] + ] +end + +to WaterStress + ask patches with [LandType = 2] ;; ask patches with barley + [ + if IrrigationMemory <= -24 + [ + ask BarleyPlants-here [die] + set LandType 1 ;; after harvest, the field becomes fellow again + set pcolor brown ;; set color to brown + set IrrigationDemand 0 ;; set irrigation demand to 0 since fellow fields don't need water + set BarleyQuality 0 ;; set quality of barley to 0 since fellow fields don't have barley + set FallowCountDown (Year * 365 - Day) ;; set the FallowCountDown to 2 so that after this time step fallowCountDown is 1, because after this procedure the procedure fallowfields substracts 1 of the value, and then would result into the possiblity to regrow straight away + set ReadyForBarley false ;; set readyForCrops to false since it is not straight away ready for new crops + set ReceivedWater1 0 + set ReceivedWater2 0 + set ReceivedWater3 0 + set ReceivedWater4 0 + set ReceivedWater5 0 + ] + + set FieldReceivedWater-Stage1 (ReceivedWater1 + ReceivedWater2) ;; local variables to record the fields received water at each calculation stage + if FieldReceivedWater-Stage1 = 164 + [ + set BarleyQuality1 4 + ] + if FieldReceivedWater-Stage1 >= 82 and FieldReceivedWater-Stage1 < 164 + [ + set BarleyQuality1 3 + ] + if FieldReceivedWater-Stage1 > 0 and FieldReceivedWater-Stage1 < 82 + [ + set BarleyQuality1 1 + ] + if FieldReceivedWater-Stage1 = 0 or ReceivedWater1 = 0 or ReceivedWater2 = 0 + [ + set BarleyQuality1 0 + ] + + set FieldReceivedWater-Stage2 (ReceivedWater3 + ReceivedWater4) + if FieldReceivedWater-Stage2 = 164 + [ + set BarleyQuality2 4 + ] + if FieldReceivedWater-Stage2 >= 82 and FieldReceivedWater-Stage2 < 164 + [ + set BarleyQuality2 3 + ] + if FieldReceivedWater-Stage2 >= 41 and FieldReceivedWater-Stage2 < 82 + [ + set BarleyQuality2 2 + ] + if FieldReceivedWater-Stage2 > 0 and FieldReceivedWater-Stage2 < 41 + [ + set BarleyQuality2 1 + ] + if FieldReceivedWater-Stage2 = 0 or ReceivedWater3 = 0 or ReceivedWater4 = 0 + [ + set BarleyQuality2 0 + ] + + set FieldReceivedWater-Stage3 ReceivedWater5 + if FieldReceivedWater-Stage3 = 82 + [ + set BarleyQuality3 4 + ] + if FieldReceivedWater-Stage3 >= 41 and FieldReceivedWater-Stage3 < 82 + [ + set BarleyQuality3 3 + ] + if FieldReceivedWater-Stage3 > 0 and FieldReceivedWater-Stage3 < 42 + [ + set BarleyQuality3 1 + ] + if FieldReceivedWater-Stage3 = 0 + [ + set BarleyQuality3 0 + ] + ] +end + +to Harvest + ask patches with [LandType = 2] ;; ask fields with barley + [ + if HarvestCycle = 0 ;; if barley is ready to be harvested + [ + set HarvestCycle (BarleyHarvestCycle + 1) ;; reset the harvest cycle, add one because at the end of this procedure, 1 day will already be substracted even when reset + + if BarleyQuality1 = 4 and BarleyQuality2 = 4 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY6] + if BarleyQuality1 = 4 and BarleyQuality2 = 4 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY5] + if BarleyQuality1 = 4 and BarleyQuality2 = 4 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 4 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 3 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY5] + if BarleyQuality1 = 4 and BarleyQuality2 = 3 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY4] + if BarleyQuality1 = 4 and BarleyQuality2 = 3 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 3 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 2 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY4] + if BarleyQuality1 = 4 and BarleyQuality2 = 2 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY3] + if BarleyQuality1 = 4 and BarleyQuality2 = 2 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 2 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 1 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 1 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 1 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 4 and BarleyQuality2 = 1 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 0 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 0 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 0 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 4 and BarleyQuality2 = 0 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 4 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY5] + if BarleyQuality1 = 3 and BarleyQuality2 = 4 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY4] + if BarleyQuality1 = 3 and BarleyQuality2 = 4 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 4 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 3 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY4] + if BarleyQuality1 = 3 and BarleyQuality2 = 3 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY3] + if BarleyQuality1 = 3 and BarleyQuality2 = 3 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 3 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 2 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY3] + if BarleyQuality1 = 3 and BarleyQuality2 = 2 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY2] + if BarleyQuality1 = 3 and BarleyQuality2 = 2 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 2 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 1 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 1 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 1 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 3 and BarleyQuality2 = 1 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 0 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 0 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 0 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 3 and BarleyQuality2 = 0 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 4 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 4 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 4 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 4 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 3 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 3 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 3 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 3 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 2 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 2 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 2 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 2 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 1 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 1 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 1 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY1] + if BarleyQuality1 = 1 and BarleyQuality2 = 1 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 0 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 0 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 0 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 1 and BarleyQuality2 = 0 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 4 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 4 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 4 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 4 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 3 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 3 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 3 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 3 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 2 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 2 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 2 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 2 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 1 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 1 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 1 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 1 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 0 and BarleyQuality3 = 4 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 0 and BarleyQuality3 = 3 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 0 and BarleyQuality3 = 1 [set BarleyYield BarleyYieldY0] + if BarleyQuality1 = 0 and BarleyQuality2 = 0 and BarleyQuality3 = 0 [set BarleyYield BarleyYieldY0] + + if any? BarleyPlants-here + ;if BarleyYield > 0 + [ + sprout-HarvestBarleyRecords 1 ;; this is used to record if the field has harvest, if yes there is a red star, if no nothing stands here. let this [die] when new sowing start + [ + set shape "star" + set size 0.1 + set color red + ] + ] + + set LandType 1 ;; after harvest, the field becomes fellow again + set pcolor brown ;; set color to brown + set IrrigationDemand 0 ;; set irrigation demand to 0 since fellow fields don't need water + set BarleyQuality 0 ;; set quality of barley to 0 since fellow fields don't have barley + set FallowCountDown (Year * 365 - Day) ;; set the FallowCountDown to 2 so that after this time step fallowCountDown is 1, because after this procedure the procedure fallowfields substracts 1 of the value, and then would result into the possiblity to regrow straight away + set ReadyForBarley false ;; set readyForCrops to false since it is not straight away ready for new crops + set ReceivedWater1 0 + set ReceivedWater2 0 + set ReceivedWater3 0 + set ReceivedWater4 0 + set ReceivedWater5 0 + ] + set HarvestCycle (HarvestCycle - 1) ;; reduce the time till harvest by 1 day + ] +end + +to FarmersToTalBarley + ask patches with [LandType = 3] + [ + if pycor > 17 + [ + set TotalBarleyYieldPerFarmerPerYear ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) ;; set the barley of the farmer to his old barley plus the total yields of his just harvested barley + if ([FallowCountDown] of patch (pxcor - 1) pycor) = 2 and ([FallowCountDown] of patch (pxcor - 1) (pycor + 1)) = 2 and ([FallowCountDown] of patch pxcor (pycor + 1)) = 2 and ([FallowCountDown] of patch (pxcor - 1) (pycor - 1)) = 2 and ([FallowCountDown] of patch (pxcor - 1) pycor) = 2 + [ + set TotalBarleyPerFarmer (TotalBarleyPerFarmer + TotalBarleyYieldPerFarmerPerYear) + ] + + ] + if pycor < 17 + [ + if pycor > 14 ;; the primary canal + [ + set TotalBarleyYieldPerFarmerPerYear ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) ;; set the barley of the farmer to his old barley plus the total yields of his just harvested barley + if ([FallowCountDown] of patch (pxcor - 1) pycor) = 2 and ([FallowCountDown] of patch (pxcor - 1) (pycor - 1)) = 2 and ([FallowCountDown] of patch pxcor (pycor - 1)) = 2 and ([FallowCountDown] of patch (pxcor + 1) (pycor - 1)) = 2 and ([FallowCountDown] of patch (pxcor + 1) pycor) = 2 + [ + set TotalBarleyPerFarmer (TotalBarleyPerFarmer + TotalBarleyYieldPerFarmerPerYear) + ] + ] + if pycor < 15 ;; the secondary canal + [ + if pxcor < 38 ;; the left side of the secondary canal + [ + set TotalBarleyYieldPerFarmerPerYear ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) ;; set the barley of the farmer to his old barley plus the total yields of his just harvested barley + if ([FallowCountDown] of patch pxcor (pycor + 1)) = 2 and ([FallowCountDown] of patch (pxcor - 1) (pycor + 1)) = 2 and ([FallowCountDown] of patch (pxcor - 1) pycor) = 2 and ([FallowCountDown] of patch (pxcor - 1) (pycor - 1)) = 2 and ([FallowCountDown] of patch pxcor (pycor - 1)) = 2 + [ + set TotalBarleyPerFarmer (TotalBarleyPerFarmer + TotalBarleyYieldPerFarmerPerYear) + ] + ] + if pxcor > 38 ;; the right side of the secondary canan + [ + set TotalBarleyYieldPerFarmerPerYear ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) ;; set the barley of the farmer to his old barley plus the total yields of his just harvested barley + if ([FallowCountDown] of patch pxcor (pycor + 1)) = 2 and ([FallowCountDown] of patch (pxcor + 1) (pycor + 1)) = 2 and ([FallowCountDown] of patch (pxcor + 1) pycor) = 2 and ([FallowCountDown] of patch (pxcor + 1) (pycor - 1)) = 2 and ([FallowCountDown] of patch pxcor (pycor - 1)) = 2 + [ + set TotalBarleyPerFarmer (TotalBarleyPerFarmer + TotalBarleyYieldPerFarmerPerYear) + ] + ] + ] + ] + ] + + ask patches with [LandType = 1] ;; ask fallow fields + [ + if FallowCountDown = 2 + [ + ask patches with [LandType = 3] + [ + set TotalBarleyPerFarmer (TotalBarleyPerFarmer + TotalBarleyYieldPerFarmerPerYear) + ] + ] + ] +end + +to FarmersHarvestSituationPerYear ;; use to count the number of harvested fields for each farmer + ask patches with [LandType = 3] ;; ask storage patch + [ + if day = 365 * Year - 2 + [ +;;the primary canal + if pxcor = 28 + [ + set NumberofHarvestFieldsF1 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF1 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 30 + [ + set NumberofHarvestFieldsF2 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF2 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 32 + [ + set NumberofHarvestFieldsF3 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF3 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 34 + [ + set NumberofHarvestFieldsF4 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF4 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 36 + [ + set NumberofHarvestFieldsF5 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF5 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 41 + [ + set NumberofHarvestFieldsF6 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF6 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 43 + [ + set NumberofHarvestFieldsF7 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF7 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 45 + [ + set NumberofHarvestFieldsF8 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF8 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 47 + [ + set NumberofHarvestFieldsF9 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF9 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 49 + [ + set NumberofHarvestFieldsF10 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF10 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] +;;the secondary canal + if pycor = 13 + [ + set NumberofHarvestFieldsF11 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF11 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] + if pycor = 11 + [ + set NumberofHarvestFieldsF12 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF12 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] + if pycor = 9 + [ + set NumberofHarvestFieldsF13 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF13 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] + if pycor = 7 + [ + set NumberofHarvestFieldsF14 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF14 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] + if pycor = 5 + [ + set NumberofHarvestFieldsF15 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF15 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] + if pycor = 3 + [ + set NumberofHarvestFieldsF16 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF16 ([BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1)) + ] +;;the 2nd primary canal + if pxcor = 22 + [ + set NumberofHarvestFieldsF17 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF17 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 20 + [ + set NumberofHarvestFieldsF18 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF18 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 18 + [ + set NumberofHarvestFieldsF19 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF19 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 16 + [ + set NumberofHarvestFieldsF20 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF20 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 14 + [ + set NumberofHarvestFieldsF21 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF21 ([BarleyYield] of patch (pxcor + 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor + 1) + [BarleyYield] of patch pxcor (pycor + 1) + [BarleyYield] of patch (pxcor + 1) (pycor + 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + if pxcor = 12 + [ + set NumberofHarvestFieldsF22 (count neighbors with [BarleyYield != 0]) + set BarleyYieldPerYearF22 ([BarleyYield] of patch (pxcor - 1) pycor + [BarleyYield] of patch (pxcor - 1) (pycor - 1) + [BarleyYield] of patch pxcor (pycor - 1) + [BarleyYield] of patch (pxcor + 1) (pycor - 1) + [BarleyYield] of patch (pxcor + 1) pycor) + ] + ] + ] +end + +to SystemsReaction_PrimaryCanal + set CommunicationYear Year ;; record the year when farmers comparing their harvest (poor harvest year recording) + if any? neighbors with [pcolor = red] + [ + ask neighbors with [pcolor = red] + [ + set ReadyforGCDecision_PrimaryCanal true + ] + ] +end + +to SystemsReaction_SecondaryCanal + if any? neighbors with [pcolor = red + 2] + [ + ask neighbors with [pcolor = red + 2] + [ + set ReadyforGCDecision_SecondaryCanal true + ] + ] +end + +to FallowFields + ask patches with [LandType = 6] ;; ask prepared fields, sky + [ + if day = 365 * Year - 2 + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + + ask patches with [LandType = 1] ;; ask fallow fields + [ + set FallowCountDown (FallowCountDown - 1) ;; for each tick reduce the fallow count down by one day + if FallowCountDown = 1 + [ + ask patches with [LandType = 1 or LandType = 2] ;; ask fallow and barley fields + [ + set BarleyYield 0 ;; reset the barley weight of the just harvested fields + ask BarleyPlants [die] ;; barley harvested + set Counter 0 + ] + ] + + if FallowCountDown = 0 + [ + ask patches with [LandType = 3] + [ + set Landed 0 + ] + ] + + if FallowCountDown < 0 ;; if fallow count down is lower or equal to 0 + [ + set ReadyForBarley true ;; set ready for barley to true which allow the BarleySowSelection procedure to be active + ] + ] + + ask patches with [LandType = 2] + [ + if [FallowCountDown] of patch 27 18 = 2 + [ + set LandType 1 ;; after harvest, the field becomes fellow again + set pcolor brown ;; set color to brown + set IrrigationDemand 0 ;; set irrigation demand to 0 since fellow fields don't need water + set BarleyQuality 0 ;; set quality of barley to 0 since fellow fields don't have barley + set FallowCountDown (Year * 365 - Day) ;; set the FallowCountDown to 2 so that after this time step fallowCountDown is 1, because after this procedure the procedure fallowfields substracts 1 of the value, and then would result into the possiblity to regrow straight away + set ReadyForBarley false ;; set readyForCrops to false since it is not straight away ready for new crops + set ReceivedWater1 0 + set ReceivedWater2 0 + set ReceivedWater3 0 + set ReceivedWater4 0 + set ReceivedWater5 0 + ask BarleyPlants [die] + ] + ] + +end + +to Outflow + ask patch 25 0 + [ + ask turtles-here [die] + ] + + ask patch 51 17 + [ + ask turtles-here [die] + ] + + ask patch 38 6 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 38 4 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 38 3 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 38 0 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 15 17 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 13 17 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 12 17 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] + + ask patch 9 17 + [ + if pcolor = black + [ + ask turtles-here [die] + ] + ] +end + +to BarleySowSelection + ask patches with [LandType = 1] + [ + if ReadyForBarley = true + [ + if pycor > 17 + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "ExpandOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + if SowingChoice = "ExpandOneField" ;; keep field1, expand field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; stop field1 + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 and field2 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; start expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse any? HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; sowing field1 and field2 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; sowing field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2,field1 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ask patch pxcor (pycor - 1) + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, and field3 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 and field3 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 and field3 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 and field3 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, and field4 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor - 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field1, feild2, field3, and field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; expand field5 + [ ;; keep field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field4 + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, field4, and field5 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field5 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field5 + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ ;; stop field4 and field5 + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] + ] + if pycor < 17 + [ + if pycor > 14 + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "ExpandOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + if SowingChoice = "ExpandOneField" ;; keep field1, expand field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; stop field1 + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 and field2 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor + 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2,field1 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ask patch pxcor (pycor + 1) + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, and field3 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, and field4 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field1, feild2, field3, and field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; expand field5 + [ ;; keep field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field4 + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, field4, and field5 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 2) pycor != 0 and count HarvestBarleyRecords-on patch (pxcor - 2) (pycor - 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor - 1)!= 0 and count HarvestBarleyRecords-on patch pxcor (pycor - 1) != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field5 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field5 + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 1) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 2) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] + ] + if pycor < 15 + [ + if pxcor < 38 ;; the left side of the secondary canal + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "ExpandOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + if SowingChoice = "ExpandOneField" ;; keep field1, expand field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; stop field1 + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 and field2 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2,field1 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; keep field1 + [ + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ask patch (pxcor + 1) pycor + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, and field3 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) ;; field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) ;; field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1, field2, and field3, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, and field4 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor + 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field1, feild2, field3, and field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; expand field5 + [ ;; keep field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field4 + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, field4, and field5 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field5 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field5 + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" ;; stop field4, field5 + [ + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] + ] + if pxcor > 38 ;; the right side of the secondary canal + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "ExpandOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "KeepLastSeasonChoice" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) >= TotalIrrigationDemand * 0.5 and ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + set SowingChoice "DecreaseOneField" + ] + if ([AverageAvailableWater] of patch pxcor (pycor - 1)) < TotalIrrigationDemand * 0.5 + [ + set SowingChoice "DecreaseOneField" ;; stop farming field1 + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + if SowingChoice = "ExpandOneField" ;; keep field1, expand field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; stop field1 + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 and field2 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field3 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1 and field2 + ] + [ + set SowingChoice "DecreaseOneField" ;; stopfield2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field2 + ] + ] + ] + + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) >= TotalIrrigationDemand * 1.5 and ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" + ] + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) (pycor - 1)) < TotalIrrigationDemand * 1.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) pycor != 0 ;; if field1 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop farming field2 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop farming field2,field1 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1 and field2, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" ;; keep field1 + [ + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ask patch (pxcor - 1) pycor + [ + set LandType 1 + set pcolor brown + set IrrigationDemand 0 + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, and field3 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2 harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field4 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) >= TotalIrrigationDemand * 2.5 and ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1,field2, and field3 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1) pycor) < TotalIrrigationDemand * 2.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 1) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field3 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" ;; keep sowing field1 and field2 + [ ;; keep field2 and field1 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) ;; field2 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) ;; field1 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; keep sowing field1, field2, and field3, then expand field3 + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor - 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch (pxcor - 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, and field4 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "ExpandOneField" ;; expand field5 + ] + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) >= TotalIrrigationDemand * 3.5 and ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field1, field2, field3, and field4 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + ] + if ([AverageAvailableWater] of patch (pxcor - 1)(pycor + 1)) < TotalIrrigationDemand * 3.5 + [ + ifelse count HarvestBarleyRecords-on patch (pxcor - 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch pxcor (pycor + 1) != 0 ;; if field1 and field2harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field4 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field3 and field4 + ] + ] + ] + + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field1, feild2, field3, and field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "ExpandOneField" ;; expand field5 + [ ;; keep field4 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field4 + ask patch pxcor (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" + [ + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor - 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1 field2, field3, field4, and field5 with barley last season;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if count HarvestBarleyRecords-here != 0 + [ + if AverageHarvestBarley >= 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley > 55 and AverageHarvestBarley < 440 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if AverageHarvestBarley <= 55 + [ + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) >= TotalIrrigationDemand * 4.5 and ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 5.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "KeepLastSeasonChoice" ;; keep field5 + ] + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + ] + if ([AverageAvailableWater] of patch pxcor (pycor + 1)) < TotalIrrigationDemand * 4.5 + [ + ifelse count HarvestBarleyRecords-on patch pxcor (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 2) != 0 and count HarvestBarleyRecords-on patch (pxcor + 1) (pycor + 1)!= 0 and count HarvestBarleyRecords-on patch (pxcor + 1) pycor != 0 ;; if field1 field2 field3 field4 and field5 harvested in the last year + [ + set SowingChoice "DecreaseOneField" ;; stop field5 + ] + [ + set SowingChoice "DecreaseTwoFields" ;; stop field4 and field5 + ] + ] + ] + if SowingChoice = "KeepLastSeasonChoice" + [ ;; keep field5 + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseOneField" + [ ;; stop field5 + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) pycor + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + if SowingChoice = "DecreaseTwoFields" ;; stop field4, field5 + [ + ask patch pxcor (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 2) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ask patch (pxcor + 1) (pycor + 1) + [ + set LandType 6 + set pcolor sky + set IrrigationDemand Pre-IrrigationDemand + ] + ] + ] + ] + ] + ] + ];;;pycor < 17 + ] + ] +end + +to FieldPreparation2 ;; keep field1 and expand field2 + ask patches with [LandType = 6] ;; ask fields that need pre irrigation + [ + if pycor > 17 + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set currentstorage of the barley field to the currentstorage of the storage patch + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + if IrrigationStatus = "Irrigated" + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch pxcor (pycor + 1) + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume2 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] +; if count IrrigationVolumes-here >= IrrigationDemand +; [ +; set IrrigationStatus "Irrigated" +; ] + ] + ] + ] + ] + if pycor < 17 + [ + if pycor > 14 + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch (pxcor + 1) pycor) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) ;; set currentstorage of the barley field to the currentstorage of the storage patch + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + if IrrigationStatus = "Irrigated" + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch pxcor (pycor - 1) + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume2 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + if pycor < 15 ;; the secondary canal + [ + if pxcor < 38 ;; the left side of the secondary canal + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set currentstorage of the barley field to the currentstorage of the storage patch + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + if IrrigationStatus = "Irrigated" + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch (pxcor - 1) pycor + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume2 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + if pxcor > 38 ;; the right side of the secondary canal + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if ([LandType] of patch pxcor (pycor - 1)) = 3 ;; storage patch + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) ;; set currentstorage of the barley field to the currentstorage of the storage patch + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume1 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume1 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes1 Field-IrrigationVolume1 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes1) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes1 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume1 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + if IrrigationStatus = "Irrigated" + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;field2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch (pxcor + 1) pycor + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume2 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume2 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes2 Field-IrrigationVolume2 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume2 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + ] + ] + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater1 IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater1 Counter + set plabel Counter + ] + show word "ReceivedWater1:" ReceivedWater1 + ] + ] +end + +to FieldPreparation2-sub + ask patches with [LandType = 6] + [ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;the primary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pycor > 14 + [ + if [LandType] of patch (pxcor + 1) (pycor - 1) = 3 ;; field2 - upside + [ + if Field-IrrigationVolume2 < IrrigationDemand + [ + if [CurrentStorage] of patch (pxcor + 1) (pycor - 1) > 0 + [ + set CurrentStorage (Field-IrrigationVolume2 + [CurrentStorage] of patch (pxcor + 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand + [ + set Field-IrrigationVolume2-sub IrrigationDemand + ] + [ + set Field-IrrigationVolume2-sub CurrentStorage + ] + let Use-Field-IrrigationVolumes2-sub (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2-sub) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2-sub StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigatio + ] + sprout-IrrigationVolumes (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + if [LandType] of patch (pxcor + 1) (pycor + 1) = 3 ;; field2 - lowside + [ + if Field-IrrigationVolume2 < IrrigationDemand + [ + if [CurrentStorage] of patch (pxcor + 1) (pycor + 1) > 0 + [ + set CurrentStorage (Field-IrrigationVolume2 + [CurrentStorage] of patch (pxcor + 1) (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand + [ + set Field-IrrigationVolume2-sub IrrigationDemand + ] + [ + set Field-IrrigationVolume2-sub CurrentStorage + ] + let Use-Field-IrrigationVolumes2-sub (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2-sub) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2-sub StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigatio + ] + sprout-IrrigationVolumes (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;the secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + if pycor < 15 + [ + if [LandType] of patch (pxcor + 1) (pycor - 1) = 3 ;; field2 - left side + [ + if Field-IrrigationVolume2 < IrrigationDemand + [ + if [CurrentStorage] of patch (pxcor + 1) (pycor - 1) > 0 + [ + set CurrentStorage (Field-IrrigationVolume2 + [CurrentStorage] of patch (pxcor + 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand + [ + set Field-IrrigationVolume2-sub IrrigationDemand + ] + [ + set Field-IrrigationVolume2-sub CurrentStorage + ] + let Use-Field-IrrigationVolumes2-sub (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) + ask patch (pxcor + 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2-sub) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2-sub StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigatio + ] + sprout-IrrigationVolumes (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + if [LandType] of patch (pxcor - 1) (pycor - 1) = 3 ;; field2 - right side + [ + if Field-IrrigationVolume2 < IrrigationDemand + [ + if [CurrentStorage] of patch (pxcor - 1) (pycor - 1) > 0 + [ + set CurrentStorage (Field-IrrigationVolume2 + [CurrentStorage] of patch (pxcor - 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand + [ + set Field-IrrigationVolume2-sub IrrigationDemand + ] + [ + set Field-IrrigationVolume2-sub CurrentStorage + ] + let Use-Field-IrrigationVolumes2-sub (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes2-sub) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes2-sub StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigatio + ] + sprout-IrrigationVolumes (Field-IrrigationVolume2-sub - Field-IrrigationVolume2) ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + ] + ] +end + +to FieldPreparation3 + ask patches with [LandType = 6] + [ + set IrrigationDemand Pre-IrrigationDemand + if pycor > 17 + [ + if ([LandType] of patch pxcor (pycor - 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor - 1) pycor)= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 17 + [ + if pycor > 14 ;; the primary canal + [ + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor - 1) pycor)= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 15 ;; the secondary canal + [ + if pxcor < 38 ;; the left side of the secondary canal + [ + if ([LandType] of patch (pxcor + 1) pycor) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor + 1))= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) pycor) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pxcor > 38 ;; the right side of the secondary canal + [ + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor + 1))= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) pycor) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater1 IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater1 Counter + set plabel Counter + ] + show word "ReceivedWater1:" ReceivedWater1 + ] + ] +end + +to FieldPreparation4 + ask patches with [LandType = 6] + [ + set IrrigationDemand Pre-IrrigationDemand + if pycor > 17 + [ + if ([LandType] of patch (pxcor - 1) (pycor - 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor - 1) pycor)= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) (pycor - 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) (pycor - 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 17 + [ + if pycor > 14 ;; the primary canal + [ + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor - 1) pycor)= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 15 ;; the secondary canal + [ + if pxcor < 38 ;; the left side of the secondary canal + [ + if ([LandType] of patch (pxcor + 1) (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor + 1))= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor + 1) (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor + 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pxcor > 38 ;; the right side of the secondary canal + [ + if ([LandType] of patch (pxcor - 1) (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor + 1))= "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater1 IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater1 Counter + set plabel Counter + ] + show word "ReceivedWater1:" ReceivedWater1 + ] + ] +end + +to FieldPreparation5 + ask patches with [LandType = 6] + [ + set IrrigationDemand Pre-IrrigationDemand + if pycor > 17 + [ + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor + 1)) = "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) pycor) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 17 + [ + if pycor > 14 ;; the primary canal + [ + if ([LandType] of patch (pxcor - 1) pycor) = 3 + [ + if ([IrrigationStatus] of patch pxcor (pycor - 1)) = "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch (pxcor - 1) pycor) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch (pxcor - 1) pycor + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pycor < 15 ;; the secondary canal + [ + if pxcor < 38 ;; the left side of the secondary canal + [ + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor - 1) pycor) = "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + if pxcor > 38 ;; the right side of the secondary canal + [ + if ([LandType] of patch pxcor (pycor + 1)) = 3 + [ + if ([IrrigationStatus] of patch (pxcor + 1) pycor) = "Irrigated" + [ + set CurrentStorage ([CurrentStorage] of patch pxcor (pycor + 1)) + ifelse CurrentStorage >= IrrigationDemand ;; if there is more or equal storage than the irrigation demand + [ + set Field-IrrigationVolume3 IrrigationDemand ;; set the amount of water that needs to be supplied by irrigation in the fields to the irrigation demand of the field + ] + [ + set Field-IrrigationVolume3 CurrentStorage ;; if there is not sufficient storage to provide the entire irrigation demand, set the irrigation volume to currentstorage of the storage patch + ] + let Use-Field-IrrigationVolumes3 Field-IrrigationVolume3 ;; local variable that allows the irrigation water in the storage patch to be reduced according to the amount of water used for irrigation of the barley at the field + ask patch pxcor (pycor + 1) + [ + set CurrentStorage (CurrentStorage - Use-Field-IrrigationVolumes3) ;; update the currentstorage 0n the storage patch to a lower amount because water used for irrigation + ask n-of Use-Field-IrrigationVolumes3 StorageVolumes-here [die] ;; ask the storage volumes on the storage patch to die, the amount is equal to the amount used for irrigation + ] + sprout-IrrigationVolumes Field-IrrigationVolume3 ;; create irrigation volumes, the amount is equal to the remaining irrigation demand + [ + set color turquoise + set size 0.5 + set heading 0 + ] + ] + if count IrrigationVolumes-here >= IrrigationDemand + [ + set IrrigationStatus "Irrigated" + ] + ] + ] + ] + ] + if count IrrigationVolumes-here > 0 + [ + set Counter (count IrrigationVolumes-here) + ifelse Counter >= IrrigationDemand ;; if the current storage exceeds the maximum storage + [ + ask n-of (Counter - IrrigationDemand) IrrigationVolumes-here [die] ;; ask the extra storage volumes to die (so they go out the system) + set ReceivedWater1 IrrigationDemand + set plabel IrrigationDemand + ] + [ + set ReceivedWater1 Counter + set plabel Counter + ] + show word "ReceivedWater1:" ReceivedWater1 + ] + ] +end + +to SecondaryCanal_Expansion +; file-open "InitialLayout_Expansion.txt" +; set ExpandedLandscape file-read ;; sets the land type according to the file + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup three new farmers;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 37 13 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 11 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 9 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 38 16 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 15 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 14 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 13 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 12 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 11 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 10 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 9 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 8 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 7 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 6 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup farmlands;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 37 14 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 14 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 13 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 11 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 9 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + + if [pcolor] of patch 38 16 = blue + 2 + [ + set ContinuouslySameHarvestYear 0 + ] +end + +to SecondaryCanal_Movement +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;abandon farmlands of F8-10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;Farmer8 + ask patch 44 18 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 44 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 45 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 46 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 46 18 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 45 18 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] +;Farmer9 + ask patch 46 16 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 46 15 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 47 15 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 48 15 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 48 16 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 47 16 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] +;Farmer10 + ask patch 48 18 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 48 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 49 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 50 19 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 50 18 + [ + set LandType 4 + set pcolor green + 2 + ask IrrigationVolumes-here [die] + ] + ask patch 49 18 + [ + set LandType 4 + set pcolor green + 2 + ask StorageVolumes-here [die] + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup three new farmers;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 37 13 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithPoorHarvestYearsProcedure_1year? False + set F11-13WithPoorHarvestYearsProcedure_2years? False + set F11-13WithPoorHarvestYearsProcedure_3years? False + set F11-13WithPoorHarvestYearsProcedure_4years? False + set F11-13WithPoorHarvestYearsProcedure_5years? False + set F11-13WithPoorHarvestYearsProcedure_6years? False + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 39 11 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithPoorHarvestYearsProcedure_1year? False + set F11-13WithPoorHarvestYearsProcedure_2years? False + set F11-13WithPoorHarvestYearsProcedure_3years? False + set F11-13WithPoorHarvestYearsProcedure_4years? False + set F11-13WithPoorHarvestYearsProcedure_5years? False + set F11-13WithPoorHarvestYearsProcedure_6years? False + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] + ask patch 37 9 + [ + set LandType 3 ;; setup storage patch + set pcolor grey + set CompareOnceAYear true ;; the procedure of comparing the harvest every year + set CompareEveryTwoYearsSecondary false ;; the procedure of comparing the harvest every two years along the secondary canal + set ComparisonCountDownSecondary ComparisonTime + set F11-13WithPoorHarvestYearsProcedure_1year? False + set F11-13WithPoorHarvestYearsProcedure_2years? False + set F11-13WithPoorHarvestYearsProcedure_3years? False + set F11-13WithPoorHarvestYearsProcedure_4years? False + set F11-13WithPoorHarvestYearsProcedure_5years? False + set F11-13WithPoorHarvestYearsProcedure_6years? False + set F11-13WithGoodHarvestYearsProcedure_1year? False + set F11-13WithGoodHarvestYearsProcedure_2years? False + set F11-13WithGoodHarvestYearsProcedure_3years? False + set F11-13WithGoodHarvestYearsProcedure_4years? False + set F11-13WithGoodHarvestYearsProcedure_5years? False + set F11-13WithGoodHarvestYearsProcedure_6years? False + set F11-13CountDownExpansion_1year (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_2years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_3years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_4years (ComparisonCountDownForFarmersExpansion + 1) + set F11-13CountDownExpansion_5years (ComparisonCountDownForFarmersExpansion + 1) + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup secondary canal;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 38 16 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 15 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 14 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 13 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 12 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 11 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 10 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 9 + [ + set LandType 7 ;; setup secondary gate patch, color is different from the primary canal, only for coding + set pcolor red + 2 + set ReadyforGCDecision_SecondaryCanal false + ] + ask patch 38 8 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 7 + [ + set LandType -3 ;; setup secondary canal patch + set pcolor blue + 2 + ] + ask patch 38 6 + [ + set LandType 5 ;; setup edge of the world patch, without function + set pcolor black + ] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;setup farmlands;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patch 37 14 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 14 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 13 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 12 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 11 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 40 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 39 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 10 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 9 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 36 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] + ask patch 37 8 + [ + set LandType 1 ;; setup farmland patch + set pcolor brown + ] +end + +to set-label ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ask patches + [ ;; aks all patches + ifelse (count turtles-here) > 0 ;; if the patch has any turtles go to first statement, if no turtles go to second statement + [ + set plabel (count turtles-here) ;; if the patch has any turtles count the number of turtles and display this in plabel + if pcolor = green + [ + set plabel (count IrrigationVolumes-here) + ] + set plabel-color black + ] + [set plabel ""] ;; if the patch has no turtles don't display a number in plabel + ] +end +@#$#@#$#@ +GRAPHICS-WINDOW +0 +10 +1568 +649 +-1 +-1 +30.0 +1 +10 +1 +1 +1 +0 +0 +0 +1 +0 +51 +0 +20 +1 +1 +1 +ticks +30.0 + +BUTTON +1575 +35 +1647 +68 +NIL +setup +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +1580 +75 +1643 +108 +NIL +go +T +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +BUTTON +1580 +115 +1643 +148 +NIL +go +NIL +1 +T +OBSERVER +NIL +NIL +NIL +NIL +1 + +MONITOR +65 +655 +122 +700 +NIL +time +17 +1 +11 + +MONITOR +5 +655 +62 +700 +day +ticks +17 +1 +11 + +SLIDER +0 +705 +172 +738 +Qin_average +Qin_average +0 +5000 +700.0 +10 +1 +NIL +HORIZONTAL + +SWITCH +130 +660 +277 +693 +QHeadGateLimit? +QHeadGateLimit? +0 +1 +-1000 + +SLIDER +0 +740 +172 +773 +QHeadGateMaxFixed +QHeadGateMaxFixed +0 +1000 +200.0 +50 +1 +NIL +HORIZONTAL + +SWITCH +285 +660 +402 +693 +QGateLimit? +QGateLimit? +0 +1 +-1000 + +SLIDER +0 +775 +172 +808 +QGateMaxFixed +QGateMaxFixed +0 +410 +200.0 +10 +1 +NIL +HORIZONTAL + +SLIDER +0 +815 +237 +848 +MaximunStorageOfStoragePatch +MaximunStorageOfStoragePatch +0 +3000 +200.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +355 +775 +527 +808 +BarleyIrrigationMemory +BarleyIrrigationMemory +0 +37 +36.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +175 +740 +352 +773 +BarleyIrrigationDemand +BarleyIrrigationDemand +0 +82 +82.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +175 +705 +347 +738 +BarleyHarvestCycle +BarleyHarvestCycle +0 +181 +180.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1120 +655 +1292 +688 +BarleyYieldY6 +BarleyYieldY6 +0 +880 +880.0 +10 +1 +NIL +HORIZONTAL + +SLIDER +1120 +690 +1292 +723 +BarleyYieldY5 +BarleyYieldY5 +0 +440 +440.0 +10 +1 +NIL +HORIZONTAL + +SLIDER +1120 +725 +1292 +758 +BarleyYieldY4 +BarleyYieldY4 +0 +220 +220.0 +10 +1 +NIL +HORIZONTAL + +SLIDER +355 +705 +527 +738 +StartBarley +StartBarley +0 +44 +44.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1305 +655 +1477 +688 +StartBarleyF1 +StartBarleyF1 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1305 +690 +1477 +723 +StartBarleyF2 +StartBarleyF2 +0 +3 +2.75 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1305 +725 +1477 +758 +StartBarleyF3 +StartBarleyF3 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1305 +760 +1477 +793 +StartBarleyF4 +StartBarleyF4 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1305 +795 +1477 +828 +StartBarleyF5 +StartBarleyF5 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1480 +655 +1652 +688 +StartBarleyF6 +StartBarleyF6 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1480 +690 +1652 +723 +StartBarleyF7 +StartBarleyF7 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1480 +725 +1652 +758 +StartBarleyF8 +StartBarleyF8 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1480 +760 +1652 +793 +StartBarleyF9 +StartBarleyF9 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +SLIDER +1480 +795 +1652 +828 +StartBarleyF10 +StartBarleyF10 +0 +3 +3.0 +0.05 +1 +NIL +HORIZONTAL + +INPUTBOX +220 +865 +372 +925 +DaysFromStartForBarleySowSelection +185.0 +1 +0 +Number + +SLIDER +355 +810 +527 +843 +Pre-IrrigationDemand +Pre-IrrigationDemand +0 +120 +82.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1120 +760 +1292 +793 +BarleyYieldY3 +BarleyYieldY3 +0 +110 +110.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1120 +795 +1292 +828 +BarleyYieldY2 +BarleyYieldY2 +0 +55 +55.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1120 +830 +1292 +863 +BarleyYieldY1 +BarleyYieldY1 +0 +27 +27.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1120 +865 +1292 +898 +BarleyYieldY0 +BarleyYieldY0 +0 +0 +0.0 +0 +1 +NIL +HORIZONTAL + +SWITCH +410 +660 +513 +693 +Seed? +Seed? +1 +1 +-1000 + +INPUTBOX +0 +865 +217 +925 +RandomSeed +290449 +1 +0 +String + +MONITOR +1585 +155 +1642 +200 +Year +floor (day / 365) + 1 +17 +1 +11 + +SLIDER +355 +740 +527 +773 +TotalIrrigationDemand +TotalIrrigationDemand +0 +410 +410.0 +10 +1 +NIL +HORIZONTAL + +PLOT +1895 +10 +2130 +180 +Barley yield of F2 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 29 16" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 29 15" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 30 15" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 31 15" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 31 16" +"BYF2" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 30 16" + +PLOT +1660 +10 +1895 +180 +Barley yield of F1 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 27 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 27 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 28 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 29 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 29 18" +"BYF1" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 28 18" +"pen-6" 1.0 0 -7500403 true "" "plot [TotalBarleyPerFarmer] of patch 28 18" + +PLOT +1660 +180 +1895 +350 +Barley yield of F3 +Day +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 31 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 31 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 32 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 33 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 33 18" +"BYF3" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 32 18" + +PLOT +1895 +180 +2130 +350 +Barley yield of F4 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 33 16" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 33 15" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 34 15" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 35 15" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 35 16" +"BYF4" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 34 16" + +PLOT +1660 +350 +1895 +520 +Barley yield of F5 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 35 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 35 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 36 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 37 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 37 18" +"BYF5" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 36 18" + +PLOT +1895 +350 +2130 +520 +Barley yield of F6 +Time (days) +Yields (kg/ton) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 40 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 40 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 41 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 42 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 42 18" +"BYF6" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 41 18" + +PLOT +1660 +520 +1895 +690 +Barley yield F7 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 42 16" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 42 15" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 43 15" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 44 15" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 44 16" +"BYF7" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 43 16" + +PLOT +1895 +520 +2130 +690 +Barley yield F8 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 44 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 44 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 45 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 46 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 45 18" +"BFY8" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 45 18" + +PLOT +1660 +690 +1895 +860 +Barley yield F9 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 46 16" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 46 15" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 47 15" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 48 15" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 49 16" +"BYF9" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 47 16" + +PLOT +1895 +690 +2130 +860 +Barley yield of F10 +Time (days) +Yields (kg/ha) +0.0 +10.0 +0.0 +10.0 +true +true +"" "" +PENS +"Field1" 1.0 0 -2674135 true "" "plot [BarleyYield] of patch 48 18" +"Field2" 1.0 0 -955883 true "" "plot [BarleyYield] of patch 48 19" +"Field3" 1.0 0 -6459832 true "" "plot [BarleyYield] of patch 49 19" +"Field4" 1.0 0 -1184463 true "" "plot [BarleyYield] of patch 50 19" +"Field5" 1.0 0 -10899396 true "" "plot [BarleyYield] of patch 50 18" +"BYF10" 1.0 2 -16777216 true "" "plot [TotalBarleyYieldPerFarmerPerYear] of patch 49 18" + +SLIDER +520 +660 +692 +693 +Qin_randomizer +Qin_randomizer +0 +100 +0.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +760 +730 +932 +763 +CountDownF3 +CountDownF3 +1 +20 +3.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +525 +880 +712 +913 +ComparisonTime +ComparisonTime +365 +3650 +730.0 +365 +1 +NIL +HORIZONTAL + +SLIDER +940 +655 +1112 +688 +CountDownF6 +CountDownF6 +1 +20 +4.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +940 +690 +1112 +723 +CountDownF7 +CountDownF7 +1 +20 +4.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +940 +800 +1112 +833 +CountDownF10 +CountDownF10 +1 +20 +4.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +545 +775 +717 +808 +QGateMaxFixed3 +QGateMaxFixed3 +0 +410 +149.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +545 +810 +717 +843 +CSHY +CSHY +1 +10 +5.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +545 +840 +717 +873 +CPHY +CPHY +1 +10 +5.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +740 +845 +1022 +878 +ComparisonCountDownForCanalExpansion +ComparisonCountDownForCanalExpansion +1 +365 +365.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +740 +885 +1037 +918 +ComparisonCountDownForFarmersExpansion +ComparisonCountDownForFarmersExpansion +0 +365 +365.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +740 +920 +962 +953 +CountDownForWaterAvailability +CountDownForWaterAvailability +1 +365 +365.0 +1 +1 +NIL +HORIZONTAL + +SLIDER +1010 +945 +1227 +978 +CountDownForHarvestMemory +CountDownForHarvestMemory +0 +365 +365.0 +1 +1 +NIL +HORIZONTAL + +@#$#@#$#@ +## WHAT IS IT? + +A model that simulates a river with 10 farmers, each having 4 fields where they can grow 3 types of crops on with different properties, investemnt costs and potential revenues. + +## HOW IT WORKS + +(what rules the agents use to create the overall behavior of the model) + +## HOW TO USE IT + +(how to use the model, including a description of each of the items in the Interface tab) + +## THINGS TO NOTICE + +(suggested things for the user to notice while running the model) + +## THINGS TO TRY + +(suggested things for the user to try to do (move sliders, switches, etc.) with the model) + +## EXTENDING THE MODEL + +(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) + +## NETLOGO FEATURES + +(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) + +## RELATED MODELS + +(models in the NetLogo Models Library and elsewhere which are of related interest) + +## CREDITS AND REFERENCES + +(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) +@#$#@#$#@ +default +true +0 +Polygon -7500403 true true 150 5 40 250 150 205 260 250 + +airplane +true +0 +Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 + +arrow +true +0 +Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 + +box +false +0 +Polygon -7500403 true true 150 285 285 225 285 75 150 135 +Polygon -7500403 true true 150 135 15 75 150 15 285 75 +Polygon -7500403 true true 15 75 15 225 150 285 150 135 +Line -16777216 false 150 285 150 135 +Line -16777216 false 150 135 15 75 +Line -16777216 false 150 135 285 75 + +bug +true +0 +Circle -7500403 true true 96 182 108 +Circle -7500403 true true 110 127 80 +Circle -7500403 true true 110 75 80 +Line -7500403 true 150 100 80 30 +Line -7500403 true 150 100 220 30 + +butterfly +true +0 +Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 +Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 +Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 +Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 +Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 +Circle -16777216 true false 135 90 30 +Line -16777216 false 150 105 195 60 +Line -16777216 false 150 105 105 60 + +car +false +0 +Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 +Circle -16777216 true false 180 180 90 +Circle -16777216 true false 30 180 90 +Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 +Circle -7500403 true true 47 195 58 +Circle -7500403 true true 195 195 58 + +circle +false +0 +Circle -7500403 true true 0 0 300 + +circle 2 +false +0 +Circle -7500403 true true 0 0 300 +Circle -16777216 true false 30 30 240 + +cow +false +0 +Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 +Polygon -7500403 true true 73 210 86 251 62 249 48 208 +Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 + +cylinder +false +0 +Circle -7500403 true true 0 0 300 + +dot +false +0 +Circle -7500403 true true 90 90 120 + +face happy +false +0 +Circle -7500403 true true 8 8 285 +Circle -16777216 true false 60 75 60 +Circle -16777216 true false 180 75 60 +Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 + +face neutral +false +0 +Circle -7500403 true true 8 7 285 +Circle -16777216 true false 60 75 60 +Circle -16777216 true false 180 75 60 +Rectangle -16777216 true false 60 195 240 225 + +face sad +false +0 +Circle -7500403 true true 8 8 285 +Circle -16777216 true false 60 75 60 +Circle -16777216 true false 180 75 60 +Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 + +farmerbroke +false +15 +Polygon -2064490 true false 78 163 68 165 68 170 76 167 65 179 71 183 80 182 94 167 +Polygon -6459832 true false 92 297 102 297 61 79 56 80 +Polygon -16777216 true false 120 299 77 301 79 286 101 285 +Polygon -16777216 true false 185 300 228 302 226 287 204 286 +Polygon -2064490 true false 232 166 242 168 242 173 234 170 245 182 239 186 230 185 216 171 +Circle -2064490 true false 122 22 54 +Polygon -2064490 true false 139 120 169 120 169 67 140 68 139 120 +Polygon -1 true true 125 179 181 180 192 133 219 171 232 168 193 74 185 74 170 74 155 89 155 134 140 74 117 75 79 165 94 168 119 133 +Polygon -13345367 true false 124 179 124 74 139 74 139 119 169 119 169 74 184 74 184 179 214 284 184 299 154 224 124 299 94 284 +Polygon -6459832 true false 121 42 133 33 158 30 175 38 210 29 207 21 165 17 158 6 119 9 115 27 87 40 88 49 +Polygon -6459832 true false 69 294 74 294 +Polygon -2064490 true false 78 163 68 165 68 170 76 167 84 170 83 170 89 168 94 167 +Polygon -7500403 true false 20 46 30 88 79 77 68 35 71 74 60 36 63 76 53 38 55 75 45 40 48 75 37 43 41 80 30 44 34 80 +Circle -16777216 true false 137 42 6 +Circle -16777216 true false 154 40 6 +Line -16777216 false 147 66 159 66 +Polygon -7500403 true false 19 46 67 35 76 71 34 83 27 72 + +farmerrich +false +15 +Polygon -2064490 true false 78 163 68 165 68 170 76 167 65 179 71 183 80 182 94 167 +Polygon -6459832 true false 92 297 102 297 61 79 56 80 +Polygon -16777216 true false 120 299 77 301 79 286 101 285 +Polygon -16777216 true false 185 300 228 302 226 287 204 286 +Polygon -2064490 true false 232 166 242 168 242 173 234 170 245 182 239 186 230 185 216 171 +Circle -2064490 true false 122 22 54 +Polygon -2064490 true false 139 120 169 120 169 67 140 68 139 120 +Polygon -1 true true 125 179 181 180 192 133 219 171 232 168 193 74 185 74 170 74 155 89 155 134 140 74 117 75 79 165 94 168 119 133 +Polygon -13345367 true false 124 179 124 74 139 74 139 119 169 119 169 74 184 74 184 179 214 284 184 299 154 224 124 299 94 284 +Polygon -6459832 true false 121 42 133 33 158 30 175 38 210 29 207 21 165 17 158 6 119 9 115 27 87 40 88 49 +Polygon -6459832 true false 69 294 74 294 +Polygon -2064490 true false 78 163 68 165 68 170 76 167 84 170 83 170 89 168 94 167 +Polygon -7500403 true false 20 46 30 88 79 77 68 35 71 74 60 36 63 76 53 38 55 75 45 40 48 75 37 43 41 80 30 44 34 80 +Circle -16777216 true false 137 42 6 +Circle -16777216 true false 154 40 6 +Polygon -6459832 true false 195 270 210 285 255 285 270 270 270 210 240 195 225 195 195 210 195 270 +Polygon -6459832 true false 225 195 210 180 255 180 240 195 +Rectangle -14835848 true false 216 214 249 220 +Rectangle -14835848 true false 216 214 249 220 +Rectangle -14835848 true false 216 228 249 234 +Rectangle -14835848 true false 216 243 249 249 +Rectangle -14835848 true false 215 214 223 233 +Rectangle -14835848 true false 243 229 249 249 +Rectangle -14835848 true false 228 204 231 260 +Rectangle -14835848 true false 234 204 237 260 +Line -16777216 false 147 66 159 66 +Polygon -7500403 true false 19 46 67 35 76 71 34 83 27 72 + +fish +false +0 +Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 +Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 +Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 +Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 +Circle -16777216 true false 215 106 30 + +flag +false +0 +Rectangle -7500403 true true 60 15 75 300 +Polygon -7500403 true true 90 150 270 90 90 30 +Line -7500403 true 75 135 90 135 +Line -7500403 true 75 45 90 45 + +flower +false +0 +Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 +Circle -7500403 true true 85 132 38 +Circle -7500403 true true 130 147 38 +Circle -7500403 true true 192 85 38 +Circle -7500403 true true 85 40 38 +Circle -7500403 true true 177 40 38 +Circle -7500403 true true 177 132 38 +Circle -7500403 true true 70 85 38 +Circle -7500403 true true 130 25 38 +Circle -7500403 true true 96 51 108 +Circle -16777216 true false 113 68 74 +Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 +Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 + +house +false +0 +Rectangle -7500403 true true 45 120 255 285 +Rectangle -16777216 true false 120 210 180 285 +Polygon -7500403 true true 15 120 150 15 285 120 +Line -16777216 false 30 120 270 120 + +irrigation +false +7 +Rectangle -13791810 true false 69 176 84 191 +Rectangle -16777216 false false 69 176 84 192 +Rectangle -13791810 true false 45 147 60 162 +Polygon -14835848 true true 157 148 194 206 199 211 205 213 211 215 220 216 229 213 240 208 291 168 297 161 299 154 300 146 298 136 294 127 232 24 227 19 221 15 214 15 205 18 198 21 131 65 123 75 119 83 121 92 124 98 128 105 134 113 141 125 +Polygon -14835848 true true 299 142 292 27 291 19 290 14 287 9 283 4 277 2 267 3 261 6 246 16 230 28 224 47 230 48 243 44 265 27 268 25 271 25 274 25 278 29 279 36 282 119 +Polygon -14835848 true true 89 162 200 212 213 184 175 174 79 142 71 133 62 130 50 132 85 189 90 174 +Polygon -14835848 true true 121 95 116 81 117 75 124 67 198 23 203 71 +Polygon -14835848 true true 170 168 116 96 114 90 113 89 113 86 114 81 116 75 126 67 +Polygon -14835848 true true 98 32 97 36 98 42 100 46 103 53 113 69 127 79 135 67 128 59 118 42 116 38 117 35 123 36 169 42 181 37 192 33 176 31 124 22 111 21 105 23 102 26 99 30 +Rectangle -13791810 true false 49 224 64 239 +Rectangle -13791810 true false 43 282 58 297 +Rectangle -13791810 true false 55 198 70 213 +Rectangle -13791810 true false 25 167 40 182 +Rectangle -13791810 true false 30 206 45 221 +Rectangle -13791810 true false 27 236 42 251 +Rectangle -13791810 true false 45 254 60 269 +Rectangle -13791810 true false 24 267 39 282 +Rectangle -13791810 true false 3 280 18 295 +Rectangle -13791810 true false 5 251 20 266 +Rectangle -13791810 true false 9 221 24 236 +Rectangle -13791810 true false 11 191 26 206 +Rectangle -13791810 true false 45 174 60 189 +Polygon -16777216 false false 174 174 115 94 114 92 113 86 114 80 116 73 113 69 106 59 100 50 97 39 97 34 99 30 102 24 109 21 115 20 167 28 178 32 202 16 213 15 223 15 227 18 230 21 233 25 261 5 267 3 271 2 277 2 281 2 286 4 288 9 289 10 292 18 299 139 299 153 297 162 241 209 232 213 225 216 218 215 205 214 180 203 91 162 91 176 87 189 50 132 60 129 72 133 81 140 +Polygon -16777216 false false 243 43 282 106 279 30 276 26 268 26 263 28 +Polygon -16777216 false false 129 63 165 41 121 34 117 34 116 36 116 40 +Rectangle -16777216 false false 25 167 40 183 +Rectangle -16777216 false false 45 174 60 190 +Rectangle -16777216 false false 55 198 70 214 +Rectangle -16777216 false false 30 206 45 222 +Rectangle -16777216 false false 11 191 26 207 +Rectangle -16777216 false false 49 224 64 240 +Rectangle -16777216 false false 9 221 24 237 +Rectangle -16777216 false false 27 236 42 252 +Rectangle -16777216 false false 45 254 60 270 +Rectangle -16777216 false false 5 251 20 267 +Rectangle -16777216 false false 24 266 39 282 +Rectangle -16777216 false false 43 282 58 298 +Rectangle -16777216 false false 3 279 18 295 +Rectangle -16777216 false false 45 147 60 163 + +leaf +false +0 +Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 +Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 + +line +true +0 +Line -7500403 true 150 0 150 300 + +line half +true +0 +Line -7500403 true 150 0 150 150 + +newwateringcan +false +8 +Rectangle -13791810 true false 69 176 84 191 +Rectangle -13791810 true false 45 147 60 162 +Polygon -14835848 true false 157 148 194 206 199 211 205 213 211 215 220 216 229 213 240 208 291 168 297 161 299 154 300 146 298 136 294 127 232 24 227 19 221 15 214 15 205 18 198 21 131 65 123 75 119 83 121 92 124 98 128 105 134 113 141 125 +Polygon -14835848 true false 299 142 292 27 291 19 290 14 287 9 283 4 277 2 267 3 261 6 246 16 230 28 224 47 230 48 243 44 265 27 268 25 271 25 274 25 278 29 279 36 282 119 +Polygon -14835848 true false 89 162 200 212 213 184 175 174 79 142 71 133 62 130 50 132 85 189 90 174 +Polygon -14835848 true false 121 95 116 81 117 75 124 67 198 23 203 71 +Polygon -14835848 true false 170 168 116 96 114 90 113 89 113 86 114 81 116 75 126 67 +Polygon -14835848 true false 98 32 97 36 98 42 100 46 103 53 113 69 127 79 135 67 128 59 118 42 116 38 117 35 123 36 169 42 181 37 192 33 176 31 124 22 111 21 105 23 102 26 99 30 +Rectangle -13791810 true false 49 224 64 239 +Rectangle -13791810 true false 43 282 58 297 +Rectangle -13791810 true false 55 198 70 213 +Rectangle -13791810 true false 25 167 40 182 +Rectangle -13791810 true false 30 206 45 221 +Rectangle -13791810 true false 27 236 42 251 +Rectangle -13791810 true false 45 254 60 269 +Rectangle -13791810 true false 24 267 39 282 +Rectangle -13791810 true false 3 280 18 295 +Rectangle -13791810 true false 5 251 20 266 +Rectangle -13791810 true false 9 221 24 236 +Rectangle -13791810 true false 11 191 26 206 +Rectangle -13791810 true false 45 174 60 189 +Polygon -16777216 false false 174 174 115 94 114 92 113 86 114 80 116 73 113 69 106 59 100 50 97 39 97 34 99 30 102 24 109 21 115 20 167 28 178 32 202 16 213 15 223 15 227 18 230 21 233 25 261 5 267 3 271 2 277 2 281 2 286 4 288 9 289 10 292 18 299 139 299 153 297 162 241 209 232 213 225 216 218 215 205 214 180 203 91 162 91 176 87 189 50 132 60 129 72 133 81 140 +Polygon -16777216 false false 243 43 282 106 279 30 276 26 268 26 263 28 +Polygon -16777216 false false 129 63 165 41 121 34 117 34 116 36 116 40 + +pentagon +false +0 +Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 + +person +false +0 +Circle -7500403 true true 110 5 80 +Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 +Rectangle -7500403 true true 127 79 172 94 +Polygon -7500403 true true 195 90 240 150 225 180 165 105 +Polygon -7500403 true true 105 90 60 150 75 180 135 105 + +person farmer +false +0 +Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 +Polygon -1 true false 60 195 90 210 114 154 120 195 180 195 187 157 210 210 240 195 195 90 165 90 150 105 150 150 135 90 105 90 +Circle -7500403 true true 110 5 80 +Rectangle -7500403 true true 127 79 172 94 +Polygon -13345367 true false 120 90 120 180 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 180 90 172 89 165 135 135 135 127 90 +Polygon -6459832 true false 116 4 113 21 71 33 71 40 109 48 117 34 144 27 180 26 188 36 224 23 222 14 178 16 167 0 +Line -16777216 false 225 90 270 90 +Line -16777216 false 225 15 225 90 +Line -16777216 false 270 15 270 90 +Line -16777216 false 247 15 247 90 +Rectangle -6459832 true false 240 90 255 300 + +plant +false +0 +Rectangle -7500403 true true 135 90 165 300 +Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 +Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 +Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 +Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 +Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 +Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 +Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 + +raincloud +false +10 +Circle -1 true false 46 75 85 +Circle -1 true false 84 45 95 +Circle -1 true false 149 108 60 +Circle -1 true false 114 99 42 +Circle -1 true false 145 59 67 +Circle -1 true false 194 83 67 +Circle -1 true false 106 120 44 +Circle -13345367 true true 114 201 48 +Polygon -13345367 true true 141 172 134 191 128 200 116 215 129 225 155 222 160 216 151 198 144 184 +Circle -13345367 true true 195 179 34 +Polygon -13345367 true true 211 161 208 173 206 177 198 189 210 196 225 197 228 190 216 173 +Circle -13345367 true true 75 181 23 +Polygon -13345367 true true 88 167 83 177 79 186 89 196 96 194 96 184 + +river +false +0 +Polygon -7500403 true true 15 150 30 135 +Polygon -7500403 true true 53 117 60 105 67 99 76 93 85 90 97 90 110 93 125 100 140 107 155 113 166 117 182 122 198 124 219 124 232 122 242 117 250 112 257 105 263 99 260 115 254 127 249 137 239 147 227 155 211 159 196 161 178 160 159 154 144 146 134 141 119 133 105 125 93 122 81 120 70 123 61 128 43 143 48 129 +Polygon -7500403 true true 42 185 49 173 56 167 65 161 74 158 86 158 99 161 114 168 129 175 144 181 155 185 171 190 187 192 208 192 221 190 231 185 239 180 246 173 252 167 249 183 243 195 238 205 228 215 216 223 200 227 185 229 167 228 148 222 133 214 123 209 108 201 94 193 82 190 70 188 59 191 50 196 32 211 37 197 + +sheep +false +15 +Circle -1 true true 203 65 88 +Circle -1 true true 70 65 162 +Circle -1 true true 150 105 120 +Polygon -7500403 true false 218 120 240 165 255 165 278 120 +Circle -7500403 true false 214 72 67 +Rectangle -1 true true 164 223 179 298 +Polygon -1 true true 45 285 30 285 30 240 15 195 45 210 +Circle -1 true true 3 83 150 +Rectangle -1 true true 65 221 80 296 +Polygon -1 true true 195 285 210 285 210 240 240 210 195 210 +Polygon -7500403 true false 276 85 285 105 302 99 294 83 +Polygon -7500403 true false 219 85 210 105 193 99 201 83 + +square 2 +false +0 +Rectangle -7500403 true true 30 30 270 270 +Rectangle -16777216 true false 60 60 240 240 + +star +false +0 +Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 + +storage +false +0 +Rectangle -11221820 true false 75 45 225 180 + +target +false +0 +Circle -7500403 true true 0 0 300 +Circle -16777216 true false 30 30 240 +Circle -7500403 true true 60 60 180 +Circle -16777216 true false 90 90 120 +Circle -7500403 true true 120 120 60 + +tree +false +0 +Circle -7500403 true true 118 3 94 +Rectangle -6459832 true false 120 195 180 300 +Circle -7500403 true true 65 21 108 +Circle -7500403 true true 116 41 127 +Circle -7500403 true true 45 90 120 +Circle -7500403 true true 104 74 152 + +triangle +false +0 +Polygon -7500403 true true 150 30 15 255 285 255 + +triangle 2 +false +0 +Polygon -7500403 true true 150 30 15 255 285 255 +Polygon -16777216 true false 151 99 225 223 75 224 + +truck +false +0 +Rectangle -7500403 true true 4 45 195 187 +Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 +Rectangle -1 true false 195 60 195 105 +Polygon -16777216 true false 238 112 252 141 219 141 218 112 +Circle -16777216 true false 234 174 42 +Rectangle -7500403 true true 181 185 214 194 +Circle -16777216 true false 144 174 42 +Circle -16777216 true false 24 174 42 +Circle -7500403 false true 24 174 42 +Circle -7500403 false true 144 174 42 +Circle -7500403 false true 234 174 42 + +turtle +true +0 +Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 +Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 +Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 +Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 +Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 +Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 + +wateringcan +false +8 +Rectangle -13791810 true false 69 176 84 191 +Rectangle -13791810 true false 45 147 60 162 +Polygon -14835848 true false 157 148 194 206 199 211 205 213 211 215 220 216 229 213 240 208 291 168 297 161 299 154 300 146 298 136 294 127 232 24 227 19 221 15 214 15 205 18 198 21 131 65 123 75 119 83 121 92 124 98 128 105 134 113 141 125 +Polygon -14835848 true false 299 142 292 27 291 19 290 14 287 9 283 4 277 2 267 3 261 6 246 16 230 28 224 47 230 48 243 44 265 27 268 25 271 25 274 25 278 29 279 36 282 119 +Polygon -14835848 true false 89 162 200 212 213 184 175 174 79 142 71 133 62 130 50 132 85 189 90 174 +Polygon -14835848 true false 121 95 116 81 117 75 124 67 198 23 203 71 +Polygon -14835848 true false 170 168 116 96 114 90 113 89 113 86 114 81 116 75 126 67 +Polygon -14835848 true false 98 32 97 36 98 42 100 46 103 53 113 69 127 79 135 67 128 59 118 42 116 38 117 35 123 36 169 42 181 37 192 33 176 31 124 22 111 21 105 23 102 26 99 30 +Rectangle -13791810 true false 49 224 64 239 +Rectangle -13791810 true false 43 282 58 297 +Rectangle -13791810 true false 55 198 70 213 +Rectangle -13791810 true false 25 167 40 182 +Rectangle -13791810 true false 30 206 45 221 +Rectangle -13791810 true false 27 236 42 251 +Rectangle -13791810 true false 45 254 60 269 +Rectangle -13791810 true false 24 267 39 282 +Rectangle -13791810 true false 3 280 18 295 +Rectangle -13791810 true false 5 251 20 266 +Rectangle -13791810 true false 9 221 24 236 +Rectangle -13791810 true false 11 191 26 206 +Rectangle -13791810 true false 45 174 60 189 + +wheel +false +0 +Circle -7500403 true true 3 3 294 +Circle -16777216 true false 30 30 240 +Line -7500403 true 150 285 150 15 +Line -7500403 true 15 150 285 150 +Circle -7500403 true true 120 120 60 +Line -7500403 true 216 40 79 269 +Line -7500403 true 40 84 269 221 +Line -7500403 true 40 216 269 79 +Line -7500403 true 84 40 221 269 + +wolf +false +0 +Polygon -16777216 true false 253 133 245 131 245 133 +Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105 +Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113 + +x +false +0 +Polygon -7500403 true true 270 75 225 30 30 225 75 270 +Polygon -7500403 true true 30 75 75 30 270 225 225 270 +@#$#@#$#@ +NetLogo 6.3.0 +@#$#@#$#@ +@#$#@#$#@ +@#$#@#$#@ + + + setup + go + ticks = 18250 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 50 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 383 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + setup + go + ticks = 36500 + Year + day + ticks + [count Turtles-here] of patch 25 19 + [count Turtles-here] of patch 25 1 + [count Turtles-here] of patch 27 17 + [count Turtles-here] of patch 39 17 + [count Turtles-here] of patch 50 17 + [count Turtles-here] of patch 38 16 + [count Turtles-here] of patch 24 17 + [BarleyYield] of patch 27 18 + [BarleyYield] of patch 27 19 + [BarleyYield] of patch 28 19 + [BarleyYield] of patch 29 19 + [BarleyYield] of patch 29 18 + [BarleyYield] of patch 29 16 + [BarleyYield] of patch 29 15 + [BarleyYield] of patch 30 15 + [BarleyYield] of patch 31 15 + [BarleyYield] of patch 31 16 + [BarleyYield] of patch 31 18 + [BarleyYield] of patch 31 19 + [BarleyYield] of patch 32 19 + [BarleyYield] of patch 33 19 + [BarleyYield] of patch 33 18 + [BarleyYield] of patch 33 16 + [BarleyYield] of patch 33 15 + [BarleyYield] of patch 34 15 + [BarleyYield] of patch 35 15 + [BarleyYield] of patch 35 16 + [BarleyYield] of patch 35 18 + [BarleyYield] of patch 35 19 + [BarleyYield] of patch 36 19 + [BarleyYield] of patch 37 19 + [BarleyYield] of patch 37 18 + [BarleyYield] of patch 40 18 + [BarleyYield] of patch 40 19 + [BarleyYield] of patch 41 19 + [BarleyYield] of patch 42 19 + [BarleyYield] of patch 42 18 + [BarleyYield] of patch 42 16 + [BarleyYield] of patch 42 15 + [BarleyYield] of patch 43 15 + [BarleyYield] of patch 44 15 + [BarleyYield] of patch 44 16 + [BarleyYield] of patch 44 18 + [BarleyYield] of patch 44 19 + [BarleyYield] of patch 45 19 + [BarleyYield] of patch 46 19 + [BarleyYield] of patch 46 18 + [BarleyYield] of patch 46 16 + [BarleyYield] of patch 46 15 + [BarleyYield] of patch 47 15 + [BarleyYield] of patch 48 15 + [BarleyYield] of patch 48 16 + [BarleyYield] of patch 48 18 + [BarleyYield] of patch 48 19 + [BarleyYield] of patch 49 19 + [BarleyYield] of patch 50 19 + [BarleyYield] of patch 50 18 + [BarleyYield] of patch 37 14 + [BarleyYield] of patch 36 14 + [BarleyYield] of patch 36 13 + [BarleyYield] of patch 36 12 + [BarleyYield] of patch 37 12 + [BarleyYield] of patch 39 12 + [BarleyYield] of patch 40 12 + [BarleyYield] of patch 40 11 + [BarleyYield] of patch 40 10 + [BarleyYield] of patch 39 10 + [BarleyYield] of patch 37 10 + [BarleyYield] of patch 36 10 + [BarleyYield] of patch 36 9 + [BarleyYield] of patch 36 8 + [BarleyYield] of patch 37 8 + [BarleyYield] of patch 39 8 + [BarleyYield] of patch 40 8 + [BarleyYield] of patch 40 7 + [BarleyYield] of patch 40 6 + [BarleyYield] of patch 39 6 + [BarleyYield] of patch 37 6 + [BarleyYield] of patch 36 6 + [BarleyYield] of patch 36 5 + [BarleyYield] of patch 36 4 + [BarleyYield] of patch 37 4 + [BarleyYield] of patch 39 4 + [BarleyYield] of patch 40 4 + [BarleyYield] of patch 40 3 + [BarleyYield] of patch 40 2 + [BarleyYield] of patch 39 2 + [BarleyYield] of patch 21 18 + [BarleyYield] of patch 21 19 + [BarleyYield] of patch 22 19 + [BarleyYield] of patch 23 19 + [BarleyYield] of patch 23 18 + [BarleyYield] of patch 19 16 + [BarleyYield] of patch 19 15 + [BarleyYield] of patch 20 15 + [BarleyYield] of patch 21 15 + [BarleyYield] of patch 21 16 + [BarleyYield] of patch 17 18 + [BarleyYield] of patch 17 19 + [BarleyYield] of patch 18 19 + [BarleyYield] of patch 19 19 + [BarleyYield] of patch 19 18 + [BarleyYield] of patch 15 16 + [BarleyYield] of patch 15 15 + [BarleyYield] of patch 16 15 + [BarleyYield] of patch 17 15 + [BarleyYield] of patch 17 16 + [BarleyYield] of patch 13 18 + [BarleyYield] of patch 13 19 + [BarleyYield] of patch 14 19 + [BarleyYield] of patch 15 19 + [BarleyYield] of patch 15 18 + [BarleyYield] of patch 11 16 + [BarleyYield] of patch 11 15 + [BarleyYield] of patch 12 15 + [BarleyYield] of patch 13 15 + [BarleyYield] of patch 13 16 + [BarleyYieldPerYearF1] of patch 28 18 + [BarleyYieldPerYearF2] of patch 30 16 + [BarleyYieldPerYearF3] of patch 32 18 + [BarleyYieldPerYearF4] of patch 34 16 + [BarleyYieldPerYearF5] of patch 36 18 + [BarleyYieldPerYearF6] of patch 41 18 + [BarleyYieldPerYearF7] of patch 43 16 + [BarleyYieldPerYearF8] of patch 45 18 + [BarleyYieldPerYearF9] of patch 47 16 + [BarleyYieldPerYearF10] of patch 49 18 + [BarleyYieldPerYearF11] of patch 37 13 + [BarleyYieldPerYearF12] of patch 39 11 + [BarleyYieldPerYearF13] of patch 37 9 + [BarleyYieldPerYearF14] of patch 39 7 + [BarleyYieldPerYearF15] of patch 37 5 + [BarleyYieldPerYearF16] of patch 39 3 + [BarleyYieldPerYearF17] of patch 22 18 + [BarleyYieldPerYearF18] of patch 20 16 + [BarleyYieldPerYearF19] of patch 18 18 + [BarleyYieldPerYearF20] of patch 16 16 + [BarleyYieldPerYearF21] of patch 14 18 + [BarleyYieldPerYearF22] of patch 12 16 + [NumberofHarvestFieldsF1] of patch 28 18 + [NumberofHarvestFieldsF2] of patch 30 16 + [NumberofHarvestFieldsF3] of patch 32 18 + [NumberofHarvestFieldsF4] of patch 34 16 + [NumberofHarvestFieldsF5] of patch 36 18 + [NumberofHarvestFieldsF6] of patch 41 18 + [NumberofHarvestFieldsF7] of patch 43 16 + [NumberofHarvestFieldsF8] of patch 45 18 + [NumberofHarvestFieldsF9] of patch 47 16 + [NumberofHarvestFieldsF10] of patch 49 18 + [NumberofHarvestFieldsF11] of patch 37 13 + [NumberofHarvestFieldsF12] of patch 39 11 + [NumberofHarvestFieldsF13] of patch 37 9 + [NumberofHarvestFieldsF14] of patch 39 7 + [NumberofHarvestFieldsF15] of patch 37 5 + [NumberofHarvestFieldsF16] of patch 39 3 + [NumberofHarvestFieldsF17] of patch 22 18 + [NumberofHarvestFieldsF18] of patch 20 16 + [NumberofHarvestFieldsF19] of patch 18 18 + [NumberofHarvestFieldsF20] of patch 16 16 + [NumberofHarvestFieldsF21] of patch 14 18 + [NumberofHarvestFieldsF22] of patch 12 16 + [QGateMax] of patch 28 17 + [QGateMax] of patch 30 17 + [QGateMax] of patch 32 17 + [QGateMax] of patch 34 17 + [QGateMax] of patch 36 17 + [QGateMax] of patch 41 17 + [QGateMax] of patch 43 17 + [QGateMax] of patch 45 17 + [QGateMax] of patch 47 17 + [QGateMax] of patch 49 17 + [QGateMax] of patch 38 13 + [QGateMax] of patch 38 11 + [QGateMax] of patch 38 9 + [QGateMax] of patch 38 7 + [QGateMax] of patch 38 5 + [QGateMax] of patch 38 3 + [QGateMax] of patch 22 17 + [QGateMax] of patch 20 17 + [QGateMax] of patch 18 17 + [QGateMax] of patch 16 17 + [QGateMax] of patch 14 17 + [QGateMax] of patch 12 17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@#$#@#$#@ +@#$#@#$#@ +default +0.0 +-0.2 0 0.0 1.0 +0.0 1 1.0 0.0 +0.2 0 0.0 1.0 +link direction +true +0 +Line -7500403 true 150 150 90 180 +Line -7500403 true 150 150 210 180 +@#$#@#$#@ +1 +@#$#@#$#@ diff --git a/parameters.nls b/parameters.nls new file mode 100644 index 0000000..5e4b907 --- /dev/null +++ b/parameters.nls @@ -0,0 +1,1072 @@ +breed [farmers farmer] ;; ceate a breed to represent the farmers +breed [RiverVolumes RiverVolume] ;; ceate a breed to represent river volumes +breed [IrrigationVolumes IrrigationVolume] ;; ceate a breed to represent irrigation volumes +breed [StorageVolumes StorageVolume] ;; ceate a breed to represent storage volumes +breed [BarleyPlants BarleyPlant] ;; ceate a breed to represent the barley +breed [HarvestBarleyRecords HarvestBarleyRecord] ;; create a breed to record if there is a harvest in the barley field +breed [ComparisonRecords ComparisonRecord] ;; create a breed to record if there is a comparison + + +globals +[ + time + day + Year + InitialLandscape ;; land type variable for reading the file is then coverted to a patch variable + ExpandedLandscape + folderPath ;; the path where the files will be written to + Q_randomizer ;; the actual random value for deviation of Qin_average + RandomSeedVariable ;; the random seed variable + FarmerAverageAvailableWater ;; the average available water for a farmer + SowingChoice ;; the choice of new sowing to cultivate if a fallow field is ready to be cultivated + IrrigationStatus ;; varaible used to present fields irrigated or not + StartTotalBarley ;; the aggregated amount of barley of all the farmers at the start + FarmerBarley ;; variable used to store the barley of a farmer when he makes a decision on sowing barley after the first harvest + BarleyFarmerPerYear ;; barley amount of each farmer per year + TotalBarleyYieldPerFarmerPerYear + AverageBarleyPerField ;; the average barley per field per farmer per year, use to strict the expanding condition + TotalBarleyPerFarmer ;; the amount of barley harvest a farmer + + BarleyYieldPerYearF1 ;; the 1st farmer's yields per year + BarleyYieldPerYearF2 ;; the 2nd farmer's yields per year + BarleyYieldPerYearF3 ;; the 3rd farmer's yields per year + BarleyYieldPerYearF4 ;; the 4th farmer's yields per year + BarleyYieldPerYearF5 ;; the 5th farmer's yields per year + BarleyYieldPerYearF6 ;; the 6th farmer's yields per year + BarleyYieldPerYearF7 ;; the 7th farmer's yields per year + BarleyYieldPerYearF8 ;; the 8th farmer's yields per year + BarleyYieldPerYearF9 ;; the 9th farmer's yields per year + BarleyYieldPerYearF10 ;; the 10th farmer's yields per year + BarleyYieldPerYearF11 ;; the 11th farmer's yields per year + BarleyYieldPerYearF12 ;; the 12th farmer's yields per year + BarleyYieldPerYearF13 ;; the 13th farmer's yields per year + BarleyYieldPerYearF14 ;; the 14th farmer's yields per year + BarleyYieldPerYearF15 ;; the 15th farmer's yields per year + BarleyYieldPerYearF16 ;; the 16th farmer's yields per year + BarleyYieldPerYearF17 ;; the 17th farmer's yields per year + BarleyYieldPerYearF18 ;; the 18th farmer's yields per year + BarleyYieldPerYearF19 ;; the 19th farmer's yields per year + BarleyYieldPerYearF20 ;; the 19th farmer's yields per year + BarleyYieldPerYearF21 ;; the 19th farmer's yields per year + BarleyYieldPerYearF22 ;; the 19th farmer's yields per year + + FarmersBarleyYieldList ;; the list for F1-10's yields + UpstreamFarmersBarleyYieldList ;; the yields list for upstream farmers: F1 F2 F3 + MiddlestreamFarmersBarleyYieldList ;; the yields list for middle stream farmers: F4 F5 F6 F7 + DownstreamFarmersBarleyYieldList ;; the yields list for downstream farmers: F8 F9 F10 + + MiddlestreamF12-13BarleyYieldList ;; the yields list for middle stream farmers: F12 13 + MiddlestreamF12-14BarleyYieldList ;; the yields list for middle stream farmers: F12 13 14 + UpstreamF11-12BarleyYieldList ;; the yields list for upstream farmers:F11 12 + MiddlestreamF13-14BarleyYieldList ;; the yields list for middle stream farmers: F13 14 + DownstreamF15-16BarleyYieldList ;; the yields list for downstream farmers: F15 1 + + NumberofHarvestFieldsF1 ;; the 1st farmers' harvest fields + NumberofHarvestFieldsF2 ;; the 2nd farmers' harvest fields + NumberofHarvestFieldsF3 ;; the 3rd farmers' harvest fields + NumberofHarvestFieldsF4 ;; the 4th farmers' harvest fields + NumberofHarvestFieldsF5 ;; the 5th farmers' harvest fields + NumberofHarvestFieldsF6 ;; the 6th farmers' harvest fields + NumberofHarvestFieldsF7 ;; the 7th farmers' harvest fields + NumberofHarvestFieldsF8 ;; the 8th farmers' harvest fields + NumberofHarvestFieldsF9 ;; the 9th farmers' harvest fields + NumberofHarvestFieldsF10 ;; the 10th farmers' harvest fields + NumberofHarvestFieldsF11 ;; the 11th farmers' harvest fields + NumberofHarvestFieldsF12 ;; the 12th farmers' harvest fields + NumberofHarvestFieldsF13 ;; the 13th farmers' harvest fields + NumberofHarvestFieldsF14 ;; the 14th farmers' harvest fields + NumberofHarvestFieldsF15 ;; the 15th farmers' harvest fields + NumberofHarvestFieldsF16 ;; the 16th farmers' harvest fields + NumberofHarvestFieldsF17 ;; the 17th farmers' harvest fields + NumberofHarvestFieldsF18 ;; the 18th farmers' harvest fields + NumberofHarvestFieldsF19 ;; the 19th farmers' harvest fields + NumberofHarvestFieldsF20 ;; the 20th farmers' harvest fields + NumberofHarvestFieldsF21 ;; the 21th farmers' harvest fields + NumberofHarvestFieldsF22 ;; the 22th farmers' harvest fields + FarmersHarvestFieldsList + UpstreamfarmersHarvestFieldsList ;; upsream farmers: F1 F2 F3 + MiddlestreamfarmersHarvestFieldsList ;; middle stream farmers: F4 F5 F6 F7 + DownstreamfarmersHarvestFieldsList ;; downstream farmers: F8 F9 F10 + MiddlestreamF12-13HarvestFieldsList + MiddlestreamF12-14HarvestFieldsList + UpstreamF11-12HarvestFieldsList + MiddlestreamF13-14HarvestFieldsList + DownstreamF15-16HarvestFieldsList + MiddlestreamF18-19BarleyYieldList + MiddlestreamF18-19HarvestFieldsList + MiddlestreamF18-20BarleyYieldList + MiddlestreamF18-20HarvestFieldsList + UpstreamF17-18BarleyYieldList + UpstreamF17-18HarvestFieldsList + MiddlestreamF19-20BarleyYieldList + MiddlestreamF19-20HarvestFieldsList + DownstreamF21-22BarleyYieldList + DownstreamF21-22HarvestFieldsList + + +; ReadyforGCDecision ;; ready for GC change (boolean) +; ReadyforGFDecision ;; ready for GF gate flow change (boolean) + ReadyforGCDecision_PrimaryCanal ;; ready for GC change (boolean) + ReadyforGCDecision_SecondaryCanal ;; ready for GC change (boolean) + ReadyforGCDecision_SecondaryCanalF11-14 + ReadyforGCDecision_SecondaryCanalF11-15 + ReadyforGCDecision_SecondaryCanalF11-16 + ReadyforGCDecisionF17-19 + ReadyforGCDecisionF17-20 + ReadyforGCDecisionF17-21 + ReadyforGCDecisionF17-22 + CommunicationYear ;; the first compare year-The year when farmers along the same canal comparing their harvest situation and if there is poor harvest sitation the upstream and middle stream farmers will decrease their GC + ;ContinuousPoorYearNumber ;; record the number of tines when poor year appears + AW_List ;; the list shows the year and the available water in this year +] + +turtles-own +[ + ;FeedbackChoice ;; what decision each farmer has made after the communication among within the canal +] + +patches-own +[ + LandType ;; land type variable for a patch + ;TotalBarleyPerFarmer ;; the amount of barley harvest a farmer has + QHeadGateMax ;; the gate capacity of the heading gate + QGateMax ;; the gate capacity of each farmer + GCF11_F13 + GCF12_F13 + GCF13_F13 + GCF11_F14 ;; the initial GC of farmer11 when expanding to farmer14 + GCF12_F14 ;; the initial GC of farmer12 when expanding to farmer14 + GCF13_F14 ;; the initial GC of farmer13 when expanding to farmer14 + GCF14_F14 + GCF11_F15 ;; the initial GC of farmer11 when expanding to farmer15 + GCF12_F15 ;; the initial GC of farmer12 when expanding to farmer15 + GCF13_F15 ;; the initial GC of farmer13 when expanding to farmer15 + GCF14_F15 ;; the initial GC of farmer14 when expanding to farmer15 + GCF15_F15 + GCF11_F16 ;; the initial GC of farmer11 when expanding to farmer16 + GCF12_F16 ;; the initial GC of farmer12 when expanding to farmer16 + GCF13_F16 ;; the initial GC of farmer13 when expanding to farmer16 + GCF14_F16 ;; the initial GC of farmer14 when expanding to farmer16 + GCF15_F16 ;; the initial GC of farmer15 when expanding to farmer16 + + GCF17_F19 + GCF18_F19 + GCF19_F19 + GCF17_F20 ;; the initial GC of farmer17 when expanding to farmer20 + GCF18_F20 ;; the initial GC of farmer18 when expanding to farmer20 + GCF19_F20 ;; the initial GC of farmer19 when expanding to farmer20 + GCF20_F20 + GCF17_F21 ;; the initial GC of farmer17 when expanding to farmer21 + GCF18_F21 ;; the initial GC of farmer18 when expanding to farmer21 + GCF19_F21 ;; the initial GC of farmer19 when expanding to farmer21 + GCF20_F21 ;; the initial GC of farmer20 when expanding to farmer21 + GCF21_F21 + GCF17_F22 ;; the initial GC of farmer17 when expanding to farmer21 + GCF18_F22 ;; the initial GC of farmer18 when expanding to farmer21 + GCF19_F22 ;; the initial GC of farmer19 when expanding to farmer21 + GCF20_F22 ;; the initial GC of farmer20 when expanding to farmer21 + GCF21_F22 ;; the initial GC of farmer21 when expanding to farmer21 + + IrrigationDemand ;; the amount of water that barley desires per tick + ;TotalIrrigationDemand ;; if barely sowed it is (120+80+80+70+60), if not it is 0 + PreIrrigationDemand ;; irrigation demand at the preparation stage + CurrentStorage ;; the irrigation storage of fields + IrrigationMemory ;; how long ago were the crops irrigated + CountDown ;; variable used to record the irrigation time of each farmer + Field-IrrigationVolume1 ;; the amount of water that needs to be supplied by irrigation in field1 + Field-IrrigationVolume2 ;; the amount of water that needs to be supplied by irrigation in field2 + Field-IrrigationVolume2-sub + Field-IrrigationVolume3 ;; the amount of water that needs to be supplied by irrigation in field3 + Field-IrrigationVolume4 ;; the amount of water that needs to be supplied by irrigation in field4 + Field-IrrigationVolume5 ;; the amount of water that needs to be supplied by irrigation in field5 + Counter ;; used to count irrigation volumes at fields + ;BarleyWaterStress ;; barley starts without any water stress + BarleyQuality ;; the quality of the crops on the field goes down if it doesn't receive it's water demand too frequent GOOD: 3 MEDIUM: 2 POOR: 1 DEAD: 0 --> becomes fellow + BarleyQuality1 + BarleyQuality2 + BarleyQuality3 + BarleyYield + + BarleyDied ;; keeps track if barley died + FallowCountDown ;; how much time left befor cropselection procedure might start + ReadyForBarley ;; ready for crop selection (boolean) + AlreadyWithBarley ;; already sowed barley and both keeping the fields and expand a new fields + HarvestCycle ;; how many days left till harvest + ReceivedWater ;; + ReceivedWater1 ;; the amount of received water at the preparation stage + ReceivedWater2 ;; the amount of received water at the first irrigation stage + ReceivedWater3 ;; the amount of received water at the second irrigation stage + ReceivedWater4 ;; the amount of received water at the third irrigation stage + ReceivedWater5 ;; the amount of received water at the fourth irrigation stage + FieldReceivedWater-Stage1 + FieldReceivedWater-Stage2 + FieldReceivedWater-Stage3 + FeedbackChoice ;; what decision each farmer has made after the communication among within the canal + AverageHarvestBarley + HarvestBarleyY1 + HarvestBarleyY2 + HarvestBarleyY3 + HarvestBarleyY4 + HarvestBarleyY5 + HarvestBarleyY6 + HarvestBarleyY7 + HarvestBarleyY8 + HarvestBarleyY9 + HarvestBarleyY10 + HarvestBarleyY11 + HarvestBarleyY12 + HarvestBarleyY13 + HarvestBarleyY14 + HarvestBarleyY15 + HarvestBarleyY16 + HarvestBarleyY17 + HarvestBarleyY18 + HarvestBarleyY19 + HarvestBarleyY20 + HarvestBarleyY21 + HarvestBarleyY22 + HarvestBarleyY23 + HarvestBarleyY24 + HarvestBarleyY25 + HarvestBarleyY26 + HarvestBarleyY27 + HarvestBarleyY28 + HarvestBarleyY29 + HarvestBarleyY30 + HarvestBarleyY31 + HarvestBarleyY32 + HarvestBarleyY33 + HarvestBarleyY34 + HarvestBarleyY35 + HarvestBarleyY36 + HarvestBarleyY37 + HarvestBarleyY38 + HarvestBarleyY39 + HarvestBarleyY40 + HarvestBarleyY41 + HarvestBarleyY42 + HarvestBarleyY43 + HarvestBarleyY44 + HarvestBarleyY45 + HarvestBarleyY46 + HarvestBarleyY47 + HarvestBarleyY48 + HarvestBarleyY49 + HarvestBarleyY50 + HarvestBarleyY51 + HarvestBarleyY52 + HarvestBarleyY53 + HarvestBarleyY54 + HarvestBarleyY55 + HarvestBarleyY56 + HarvestBarleyY57 + HarvestBarleyY58 + HarvestBarleyY59 + HarvestBarleyY60 + HarvestBarleyY61 + HarvestBarleyY62 + HarvestBarleyY63 + HarvestBarleyY64 + HarvestBarleyY65 + HarvestBarleyY66 + HarvestBarleyY67 + HarvestBarleyY68 + HarvestBarleyY69 + HarvestBarleyY70 + HarvestBarleyY71 + HarvestBarleyY72 + HarvestBarleyY73 + HarvestBarleyY74 + HarvestBarleyY75 + HarvestBarleyY76 + HarvestBarleyY77 + HarvestBarleyY78 + HarvestBarleyY79 + HarvestBarleyY80 + HarvestBarleyY81 + HarvestBarleyY82 + HarvestBarleyY83 + HarvestBarleyY84 + HarvestBarleyY85 + HarvestBarleyY86 + HarvestBarleyY87 + HarvestBarleyY88 + HarvestBarleyY89 + HarvestBarleyY90 + HarvestBarleyY91 + HarvestBarleyY92 + HarvestBarleyY93 + HarvestBarleyY94 + HarvestBarleyY95 + HarvestBarleyY96 + HarvestBarleyY97 + HarvestBarleyY98 + HarvestBarleyY99 + HarvestBarleyY100 + + Landed_Year ;; variable to record passed rivervolumes on a storage patch in one year + Landed ;; variable used to record passed rivervolumes on a storage patch + + AverageAvailableWater ;; the average available water after at the current timestep days + AvailableWaterY100 + AvailableWaterY99 + AvailableWaterY98 + AvailableWaterY97 + AvailableWaterY96 + AvailableWaterY95 + AvailableWaterY94 + AvailableWaterY93 + AvailableWaterY92 + AvailableWaterY91 + AvailableWaterY90 + AvailableWaterY89 + AvailableWaterY88 + AvailableWaterY87 + AvailableWaterY86 + AvailableWaterY85 + AvailableWaterY84 + AvailableWaterY83 + AvailableWaterY82 + AvailableWaterY81 + AvailableWaterY80 + AvailableWaterY79 + AvailableWaterY78 + AvailableWaterY77 + AvailableWaterY76 + AvailableWaterY75 + AvailableWaterY74 + AvailableWaterY73 + AvailableWaterY72 + AvailableWaterY71 + AvailableWaterY70 + AvailableWaterY69 + AvailableWaterY68 + AvailableWaterY67 + AvailableWaterY66 + AvailableWaterY65 + AvailableWaterY64 + AvailableWaterY63 + AvailableWaterY62 + AvailableWaterY61 + AvailableWaterY60 + AvailableWaterY59 + AvailableWaterY58 + AvailableWaterY57 + AvailableWaterY56 + AvailableWaterY55 + AvailableWaterY54 + AvailableWaterY53 + AvailableWaterY52 + AvailableWaterY51 + AvailableWaterY50 + AvailableWaterY49 + AvailableWaterY48 + AvailableWaterY47 + AvailableWaterY46 + AvailableWaterY45 + AvailableWaterY44 + AvailableWaterY43 + AvailableWaterY42 + AvailableWaterY41 + AvailableWaterY40 + AvailableWaterY39 + AvailableWaterY38 + AvailableWaterY37 + AvailableWaterY36 + AvailableWaterY35 + AvailableWaterY34 + AvailableWaterY33 + AvailableWaterY32 + AvailableWaterY31 + AvailableWaterY30 ;; the available water after 30 days + AvailableWaterY29 ;; the available water after 29 days + AvailableWaterY28 ;; the available water after 28 days + AvailableWaterY27 ;; the available water after 27 days + AvailableWaterY26 ;; the available water after 26 days + AvailableWaterY25 ;; the available water after 25 days + AvailableWaterY24 ;; the available water after 24 days + AvailableWaterY23 ;; the available water after 23 days + AvailableWaterY22 ;; the available water after 22 days + AvailableWaterY21 ;; the available water after 21 days + AvailableWaterY20 ;; the available water after 20 days + AvailableWaterY19 ;; the available water after 19 days + AvailableWaterY18 ;; the available water after 18 days + AvailableWaterY17 ;; the available water after 17 days + AvailableWaterY16 ;; the available water after 16 days + AvailableWaterY15 ;; the available water after 15 days + AvailableWaterY14 ;; the available water after 14 days + AvailableWaterY13 ;; the available water after 13 days + AvailableWaterY12 ;; the available water after 12 days + AvailableWaterY11 ;; the available water after 11 days + AvailableWaterY10 ;; the available water after 10 days + AvailableWaterY9 ;; the available water after 9 days + AvailableWaterY8 ;; the available water after 8 days + AvailableWaterY7 ;; the available water after 7 days + AvailableWaterY6 ;; the available water after 6 days + AvailableWaterY5 ;; the available water after 5 days + AvailableWaterY4 ;; the available water after 4 days + AvailableWaterY3 ;; the available water after 3 days + AvailableWaterY2 ;; the available water after 2 days + AvailableWaterY1 ;; the available water after 1 day + AvailableWater ;; the available water after at the current timestep days + ComparisonProcedure1 ;; the first time of poor harvest situation + ComparisonProcedure ;; the following comparison procedure + ContinuousPoorYearNumberPrimary ;; record the number of times when poor year appears along the primary canal + ContinuousPoorYearNumberSecondary ;; record the number of times when poor year appears along the primary canal + ContinuousPoorYearNumberSecondaryF11-14 + ContinuousPoorYearNumberSecondaryF11-15 + ContinuousPoorYearNumberSecondaryF11-16 + ContinuousPoorYearNumberF17-19 + ContinuousPoorYearNumberF17-20 + ContinuousPoorYearNumberF17-21 + ContinuousPoorYearNumberF17-22 + CompareOnceAYear ;; the procedure of comparing the harvest every year, for F1-13 + CompareOnceAYearF11-14 ;; the procedure of comparing the harvest every year, for F1-14 + CompareOnceAYearF11-15 ;; the procedure of comparing the harvest every year, for F1-15 + CompareOnceAYearF11-16 ;; the procedure of comparing the harvest every year, for F1-16 + CompareOnceAYearF17-19 + CompareOnceAYearF17-20 + CompareOnceAYearF17-21 + CompareOnceAYearF17-22 + CompareEveryTwoYearsPrimary ;; the procedure of comparing the harvest every two years along the primary canal + CompareEveryTwoYearsSecondary ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-14 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-15 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-16 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsF17-19 + CompareEveryTwoYearsF17-20 + CompareEveryTwoYearsF17-21 + CompareEveryTwoYearsF17-22 + ComparisonCountDownPrimary;ComparisonTime ;; use to present how often to compare the harvest + ComparisonCountDownSecondary + ComparisonCountDownSecondaryF11-14 + ComparisonCountDownSecondaryF11-15 + ComparisonCountDownSecondaryF11-16 + ComparisonCountDownF17-19 + ComparisonCountDownF17-20 + ComparisonCountDownF17-21 + ComparisonCountDownF17-22 + + ContinuouslySameHarvestYear ;; use to record the number of continuously year that all farmers have the same harvest (prepare for the canal expansion) + ContinuouslyPoorHarvestYear ;; use to record the number of continuously year that farmers have poor harvest (prepare for the farmers' movement) +;;;;;;these for meet good harvest first + ContinuouslySameHarvestYearProcedure_1year_1st? ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ContinuouslySameHarvestYearProcedure_1year_2nd? ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_1year_3rd? ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_1year_4th? ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + ContinuouslySameHarvestYearProcedure_1year_5th? ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + ContinuouslySameHarvestYearProcedure_1year_6th? ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + ContinuouslySameHarvestYearProcedure_1year_7th? ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + ContinuouslySameHarvestYearProcedure_1year_8th? ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + ContinuouslySameHarvestYearProcedure_1year_9th? ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + ContinuouslySameHarvestYearProcedure_1year_10th? ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + ContinuouslySameHarvestYearProcedure_1year_11th? ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + ContinuouslySameHarvestYearProcedure_1year_12th? ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + ContinuouslySameHarvestYearProcedure_1year_13th? ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + ContinuouslySameHarvestYearProcedure_1year_14th? ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + ContinuouslySameHarvestYearProcedure_1year_15th? ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + ContinuouslySameHarvestYearProcedure_1year_16th? ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + ContinuouslySameHarvestYearProcedure_2years_1st? ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_2years_2nd? ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_2years_3rd? ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_2years_4th? ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_2years_5th? ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_2years_6th? ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + ContinuouslySameHarvestYearProcedure_2years_7th? ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + ContinuouslySameHarvestYearProcedure_2years_8th? ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + ContinuouslySameHarvestYearProcedure_3years_1st? ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_3years_2nd? ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_3years_3rd? ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_3years_4th? ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_3years_5th? ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_3years_6th? ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_4years_1st? ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_4years_2nd? ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_4years_3rd? ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_4years_4th? ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_4years_5th? ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_4years_6th? ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_5years_1st? ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_5years_2nd? ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_5years_3rd? ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_5years_4th? ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_5years_5th? ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_5years_6th? ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_6years_1st? ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_6years_2nd? ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_6years_3rd? ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_6years_4th? ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_6years_5th? ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_6years_6th? ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_1year_1st? ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_1year_2nd? ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_1year_3rd? ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_1year_4th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_1year_5th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_1year_6th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_1year_7th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_1year_8th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + ContinuouslyPoorHarvestYearProcedure_1year_9th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + ContinuouslyPoorHarvestYearProcedure_1year_10th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + ContinuouslyPoorHarvestYearProcedure_1year_11th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + ContinuouslyPoorHarvestYearProcedure_1year_12th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + ContinuouslyPoorHarvestYearProcedure_1year_13th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + ContinuouslyPoorHarvestYearProcedure_1year_14th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + ContinuouslyPoorHarvestYearProcedure_1year_15th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + ContinuouslyPoorHarvestYearProcedure_1year_16th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + ContinuouslyPoorHarvestYearProcedure_2years_1st? ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_2years_2nd? ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_2years_3rd? ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_2years_4th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_2years_5th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_2years_6th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_2years_7th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_2years_8th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + + ContinuouslyPoorHarvestYearProcedure_3years_1st? ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_3years_2nd? ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_3years_3rd? ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_3years_4th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_3years_5th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_3years_6th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_4years_1st? ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_4years_2nd? ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_4years_3rd? ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_4years_4th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_4years_5th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_4years_6th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_5years_1st? ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_5years_2nd? ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_5years_3rd? ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_5years_4th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_5years_5th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_5years_6th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_6years_1st? ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_6years_2nd? ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_6years_3rd? ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_6years_4th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_6years_5th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_6years_6th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + CountDownExpansion1_1 ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + CountDownExpansion1_2 ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + CountDownExpansion1_3 ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + CountDownExpansion1_4 ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + CountDownExpansion1_5 ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + CountDownExpansion1_6 ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + CountDownExpansion1_7 ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + CountDownExpansion1_8 ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + CountDownExpansion1_9 ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + CountDownExpansion1_10 ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + CountDownExpansion1_11 ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + CountDownExpansion1_12 ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + CountDownExpansion1_13 ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + CountDownExpansion1_14 ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + CountDownExpansion1_15 ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + CountDownExpansion1_16 ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + CountDownExpansion2_1 ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + CountDownExpansion2_2 ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + CountDownExpansion2_3 ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + CountDownExpansion2_4 ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + CountDownExpansion2_5 ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + CountDownExpansion2_6 ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + CountDownExpansion2_7 ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + CountDownExpansion2_8 ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + CountDownExpansion3_1 ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + CountDownExpansion3_2 ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + CountDownExpansion3_3 ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + CountDownExpansion3_4 ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + CountDownExpansion3_5 ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + CountDownExpansion3_6 ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + CountDownExpansion4_1 ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + CountDownExpansion4_2 ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + CountDownExpansion4_3 ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + CountDownExpansion4_4 ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + CountDownExpansion4_5 ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + CountDownExpansion4_6 ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + CountDownExpansion5_1 ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + CountDownExpansion5_2 ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + CountDownExpansion5_3 ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + CountDownExpansion5_4 ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + CountDownExpansion5_5 ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + CountDownExpansion5_6 ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + CountDownExpansion6_1 ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + CountDownExpansion6_2 ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + CountDownExpansion6_3 ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + CountDownExpansion6_4 ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + CountDownExpansion6_5 ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + CountDownExpansion6_6 ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + CountDownMovement1_1 ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + CountDownMovement1_2 ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + CountDownMovement1_3 ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + CountDownMovement1_4 ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + CountDownMovement1_5 ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + CountDownMovement1_6 ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + CountDownMovement1_7 ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + CountDownMovement1_8 ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + CountDownMovement1_9 ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + CountDownMovement1_10 ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + CountDownMovement1_11 ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + CountDownMovement1_12 ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + CountDownMovement1_13 ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + CountDownMovement1_14 ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + CountDownMovement1_15 ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + CountDownMovement1_16 ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + CountDownMovement2_1 ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + CountDownMovement2_2 ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + CountDownMovement2_3 ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + CountDownMovement2_4 ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + CountDownMovement2_5 ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + CountDownMovement2_6 ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + CountDownMovement2_7 ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + CountDownMovement2_8 ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + CountDownMovement3_1 ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + CountDownMovement3_2 ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + CountDownMovement3_3 ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + CountDownMovement3_4 ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + CountDownMovement3_5 ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + CountDownMovement3_6 ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + CountDownMovement4_1 ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + CountDownMovement4_2 ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + CountDownMovement4_3 ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + CountDownMovement4_4 ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + CountDownMovement4_5 ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + CountDownMovement4_6 ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + CountDownMovement5_1 ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + CountDownMovement5_2 ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + CountDownMovement5_3 ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + CountDownMovement5_4 ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + CountDownMovement5_5 ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + CountDownMovement5_6 ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + CountDownMovement6_1 ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + CountDownMovement6_2 ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + CountDownMovement6_3 ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + CountDownMovement6_4 ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + CountDownMovement6_5 ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + CountDownMovement6_6 ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time + +;;;;;;these for meet poor harvest first(each variable end with p) + ContinuouslySameHarvestYearProcedure_1year_1st?p ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ContinuouslySameHarvestYearProcedure_1year_2nd?p ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_1year_3rd?p ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_1year_4th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + ContinuouslySameHarvestYearProcedure_1year_5th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + ContinuouslySameHarvestYearProcedure_1year_6th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + ContinuouslySameHarvestYearProcedure_1year_7th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + ContinuouslySameHarvestYearProcedure_1year_8th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + ContinuouslySameHarvestYearProcedure_1year_9th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + ContinuouslySameHarvestYearProcedure_1year_10th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + ContinuouslySameHarvestYearProcedure_1year_11th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + ContinuouslySameHarvestYearProcedure_1year_12th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + ContinuouslySameHarvestYearProcedure_1year_13th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + ContinuouslySameHarvestYearProcedure_1year_14th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + ContinuouslySameHarvestYearProcedure_1year_15th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + ContinuouslySameHarvestYearProcedure_1year_16th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + ContinuouslySameHarvestYearProcedure_2years_1st?p ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_2years_2nd?p ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_2years_3rd?p ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_2years_4th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_2years_5th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_2years_6th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + ContinuouslySameHarvestYearProcedure_2years_7th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + ContinuouslySameHarvestYearProcedure_2years_8th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + ContinuouslySameHarvestYearProcedure_3years_1st?p ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_3years_2nd?p ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_3years_3rd?p ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_3years_4th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_3years_5th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_3years_6th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_4years_1st?p ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_4years_2nd?p ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_4years_3rd?p ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_4years_4th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_4years_5th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_4years_6th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_5years_1st?p ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_5years_2nd?p ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_5years_3rd?p ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_5years_4th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_5years_5th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_5years_6th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_6years_1st?p ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_6years_2nd?p ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_6years_3rd?p ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_6years_4th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_6years_5th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_6years_6th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_1year_1st?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_1year_2nd?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_1year_3rd?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_1year_4th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_1year_5th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_1year_6th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_1year_7th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_1year_8th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + ContinuouslyPoorHarvestYearProcedure_1year_9th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + ContinuouslyPoorHarvestYearProcedure_1year_10th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + ContinuouslyPoorHarvestYearProcedure_1year_11th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + ContinuouslyPoorHarvestYearProcedure_1year_12th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + ContinuouslyPoorHarvestYearProcedure_1year_13th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + ContinuouslyPoorHarvestYearProcedure_1year_14th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + ContinuouslyPoorHarvestYearProcedure_1year_15th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + ContinuouslyPoorHarvestYearProcedure_1year_16th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + ContinuouslyPoorHarvestYearProcedure_2years_1st?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_2years_2nd?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_2years_3rd?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_2years_4th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_2years_5th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_2years_6th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_2years_7th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_2years_8th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + + ContinuouslyPoorHarvestYearProcedure_3years_1st?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_3years_2nd?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_3years_3rd?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_3years_4th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_3years_5th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_3years_6th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_4years_1st?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_4years_2nd?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_4years_3rd?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_4years_4th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_4years_5th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_4years_6th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_5years_1st?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_5years_2nd?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_5years_3rd?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_5years_4th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_5years_5th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_5years_6th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_6years_1st?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_6years_2nd?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_6years_3rd?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_6years_4th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_6years_5th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_6years_6th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + CountDownExpansion1_1p ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + CountDownExpansion1_2p ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + CountDownExpansion1_3p ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + CountDownExpansion1_4p ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + CountDownExpansion1_5p ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + CountDownExpansion1_6p ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + CountDownExpansion1_7p ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + CountDownExpansion1_8p ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + CountDownExpansion1_9p ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + CountDownExpansion1_10p ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + CountDownExpansion1_11p ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + CountDownExpansion1_12p ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + CountDownExpansion1_13p ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + CountDownExpansion1_14p ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + CountDownExpansion1_15p ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + CountDownExpansion1_16p ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + CountDownExpansion2_1p ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + CountDownExpansion2_2p ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + CountDownExpansion2_3p ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + CountDownExpansion2_4p ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + CountDownExpansion2_5p ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + CountDownExpansion2_6p ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + CountDownExpansion2_7p ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + CountDownExpansion2_8p ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + CountDownExpansion3_1p ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + CountDownExpansion3_2p ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + CountDownExpansion3_3p ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + CountDownExpansion3_4p ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + CountDownExpansion3_5p ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + CountDownExpansion3_6p ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + CountDownExpansion4_1p ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + CountDownExpansion4_2p ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + CountDownExpansion4_3p ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + CountDownExpansion4_4p ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + CountDownExpansion4_5p ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + CountDownExpansion4_6p ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + CountDownExpansion5_1p ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + CountDownExpansion5_2p ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + CountDownExpansion5_3p ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + CountDownExpansion5_4p ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + CountDownExpansion5_5p ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + CountDownExpansion5_6p ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + CountDownExpansion6_1p ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + CountDownExpansion6_2p ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + CountDownExpansion6_3p ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + CountDownExpansion6_4p ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + CountDownExpansion6_5p ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + CountDownExpansion6_6p ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + CountDownMovement1_1p ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + CountDownMovement1_2p ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + CountDownMovement1_3p ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + CountDownMovement1_4p ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + CountDownMovement1_5p ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + CountDownMovement1_6p ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + CountDownMovement1_7p ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + CountDownMovement1_8p ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + CountDownMovement1_9p ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + CountDownMovement1_10p ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + CountDownMovement1_11p ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + CountDownMovement1_12p ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + CountDownMovement1_13p ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + CountDownMovement1_14p ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + CountDownMovement1_15p ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + CountDownMovement1_16p ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + CountDownMovement2_1p ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + CountDownMovement2_2p ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + CountDownMovement2_3p ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + CountDownMovement2_4p ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + CountDownMovement2_5p ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + CountDownMovement2_6p ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + CountDownMovement2_7p ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + CountDownMovement2_8p ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + CountDownMovement3_1p ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + CountDownMovement3_2p ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + CountDownMovement3_3p ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + CountDownMovement3_4p ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + CountDownMovement3_5p ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + CountDownMovement3_6p ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + CountDownMovement4_1p ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + CountDownMovement4_2p ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + CountDownMovement4_3p ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + CountDownMovement4_4p ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + CountDownMovement4_5p ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + CountDownMovement4_6p ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + CountDownMovement5_1p ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + CountDownMovement5_2p ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + CountDownMovement5_3p ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + CountDownMovement5_4p ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + CountDownMovement5_5p ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + CountDownMovement5_6p ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + CountDownMovement6_1p ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + CountDownMovement6_2p ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + CountDownMovement6_3p ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + CountDownMovement6_4p ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + CountDownMovement6_5p ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + CountDownMovement6_6p ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time +;;there is farmers11 12 13, and compare these three farmers per year to see if it possible to expand to farmer14 + F11-13WithGoodHarvestYears + F11-13WithGoodHarvestYearsProcedure_1year? + F11-13WithGoodHarvestYearsProcedure_2years? + F11-13WithGoodHarvestYearsProcedure_3years? + F11-13WithGoodHarvestYearsProcedure_4years? + F11-13WithGoodHarvestYearsProcedure_5years? + F11-13WithGoodHarvestYearsProcedure_6years? + F11-13CountDownExpansion_1year + F11-13CountDownExpansion_2years + F11-13CountDownExpansion_3years + F11-13CountDownExpansion_4years + F11-13CountDownExpansion_5years + +;;there is farmers11 12 13, and compare these three farmers per year to see if there is poor harvest situation and then expand to farmer17-19, a new primary canal + F11-13WithPoorHarvestYears + F11-13WithPoorHarvestYearsProcedure_1year? + F11-13WithPoorHarvestYearsProcedure_2years? + F11-13WithPoorHarvestYearsProcedure_3years? + F11-13WithPoorHarvestYearsProcedure_4years? + F11-13WithPoorHarvestYearsProcedure_5years? + F11-13WithPoorHarvestYearsProcedure_6years? + +;;there is farmers11 12 13,14 and compare these three farmers per year to see if it possible to expand to farmer15 + F11-14WithGoodHarvestYears + F11-14WithGoodHarvestYearsProcedure_1year? + F11-14WithGoodHarvestYearsProcedure_2years? + F11-14WithGoodHarvestYearsProcedure_3years? + F11-14WithGoodHarvestYearsProcedure_4years? + F11-14WithGoodHarvestYearsProcedure_5years? + F11-14WithGoodHarvestYearsProcedure_6years? + F11-14CountDownExpansion_1year + F11-14CountDownExpansion_2years + F11-14CountDownExpansion_3years + F11-14CountDownExpansion_4years + F11-14CountDownExpansion_5years + +;;there is farmers11 12 13,14,15 and compare these three farmers per year to see if it possible to expand to farmer16 + F11-15WithGoodHarvestYears + F11-15WithGoodHarvestYearsProcedure_1year? + F11-15WithGoodHarvestYearsProcedure_2years? + F11-15WithGoodHarvestYearsProcedure_3years? + F11-15WithGoodHarvestYearsProcedure_4years? + F11-15WithGoodHarvestYearsProcedure_5years? + F11-15WithGoodHarvestYearsProcedure_6years? + F11-15CountDownExpansion_1year + F11-15CountDownExpansion_2years + F11-15CountDownExpansion_3years + F11-15CountDownExpansion_4years + F11-15CountDownExpansion_5years + +;;there is farmers11 12 13,14,15, 16 and compare these three farmers per year to see if it possible to expand to another primary canal + F11-16WithGoodHarvestYears + F11-16WithGoodHarvestYearsProcedure_1year? + F11-16WithGoodHarvestYearsProcedure_2years? + F11-16WithGoodHarvestYearsProcedure_3years? + F11-16WithGoodHarvestYearsProcedure_4years? + F11-16WithGoodHarvestYearsProcedure_5years? + F11-16WithGoodHarvestYearsProcedure_6years? + F11-16CountDownExpansion_1year + F11-16CountDownExpansion_2years + F11-16CountDownExpansion_3years + F11-16CountDownExpansion_4years + F11-16CountDownExpansion_5years + +;;there is farmers17, 18, 19 and compare these three farmers per year to see if it possible to expand to F20 + F17-19WithGoodHarvestYears + F17-19WithGoodHarvestYearsProcedure_1year? + F17-19WithGoodHarvestYearsProcedure_2years? + F17-19WithGoodHarvestYearsProcedure_3years? + F17-19WithGoodHarvestYearsProcedure_4years? + F17-19WithGoodHarvestYearsProcedure_5years? + F17-19WithGoodHarvestYearsProcedure_6years? + F17-19CountDownExpansion_1year + F17-19CountDownExpansion_2years + F17-19CountDownExpansion_3years + F17-19CountDownExpansion_4years + F17-19CountDownExpansion_5years + +;;there is farmers17, 18, 19 due to movement of poor harvest situation + F17-19WithPoorHarvestYears + F17-19WithPoorHarvestYearsProcedure_1year? + F17-19WithPoorHarvestYearsProcedure_2years? + F17-19WithPoorHarvestYearsProcedure_3years? + F17-19WithPoorHarvestYearsProcedure_4years? + F17-19WithPoorHarvestYearsProcedure_5years? + F17-19WithPoorHarvestYearsProcedure_6years? + +;;there is farmers17, 18, 19, 20 and compare these three farmers per year to see if it possible to expand to F21 + F17-20WithGoodHarvestYears + F17-20WithGoodHarvestYearsProcedure_1year? + F17-20WithGoodHarvestYearsProcedure_2years? + F17-20WithGoodHarvestYearsProcedure_3years? + F17-20WithGoodHarvestYearsProcedure_4years? + F17-20WithGoodHarvestYearsProcedure_5years? + F17-20WithGoodHarvestYearsProcedure_6years? + F17-20CountDownExpansion_1year + F17-20CountDownExpansion_2years + F17-20CountDownExpansion_3years + F17-20CountDownExpansion_4years + F17-20CountDownExpansion_5years + +;;there is farmers17, 18, 19, 20, 21 and compare these three farmers per year to see if it possible to expand to F22 + F17-21WithGoodHarvestYears + F17-21WithGoodHarvestYearsProcedure_1year? + F17-21WithGoodHarvestYearsProcedure_2years? + F17-21WithGoodHarvestYearsProcedure_3years? + F17-21WithGoodHarvestYearsProcedure_4years? + F17-21WithGoodHarvestYearsProcedure_5years? + F17-21WithGoodHarvestYearsProcedure_6years? + F17-21CountDownExpansion_1year + F17-21CountDownExpansion_2years + F17-21CountDownExpansion_3years + F17-21CountDownExpansion_4years + F17-21CountDownExpansion_5years + +;;there is farmers17, 18, 19, 20, 21,22 and compare these three farmers per year to see if it possible to expand to F23 + F17-22WithGoodHarvestYears + F17-22WithGoodHarvestYearsProcedure_1year? + F17-22WithGoodHarvestYearsProcedure_2years? + F17-22WithGoodHarvestYearsProcedure_3years? + F17-22WithGoodHarvestYearsProcedure_4years? + F17-22WithGoodHarvestYearsProcedure_5years? + F17-22WithGoodHarvestYearsProcedure_6years? + F17-22CountDownExpansion_1year + F17-22CountDownExpansion_2years + F17-22CountDownExpansion_3years + F17-22CountDownExpansion_4years + F17-22CountDownExpansion_5years + + F11NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF11 + CountDownBarleyF11 + F11NeverWithLand? + F11FirstWithLand + CountDownLandF11 + + F14NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF14 + CountDownBarleyF14 + F14NeverWithLand? + F14FirstWithLand + CountDownLandF14 + + F15NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF15 + CountDownBarleyF15 + F15NeverWithLand? + F15FirstWithLand + CountDownLandF15 + + F16NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF16 + CountDownBarleyF16 + F16NeverWithLand? + F16FirstWithLand + CountDownLandF16 + + F17NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF17 + CountDownBarleyF17 + F17NeverWithLand? + F17FirstWithLand + CountDownLandF17 + + F20NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF20 + CountDownBarleyF20 + F20NeverWithLand? + F20FirstWithLand + CountDownLandF20 + + F21NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF21 + CountDownBarleyF21 + F21NeverWithLand? + F21FirstWithLand + CountDownLandF21 + + F22NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF22 + CountDownBarleyF22 + F22NeverWithLand? + F22FirstWithLand + CountDownLandF22 +] \ No newline at end of file