Farm Irrigation
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model simulates a farm during the life cycle of a crop. The user acts like a farmer who chooses how to grow the crop. The user selects the type of crop, soil and irrigation method. The frequency and amount of crop irrigation is chosen so as to maximize the crop yield and make the most efficient use of water. The model runs for the life cycle of the crop. Each plant absorbs and uses the water from the soil. Water is also lost through evaporation and drains into the earth. Crops can die from an excess or lack of water. This model lets the user adjust the parameters in order to see what optimizes their objective.
HOW IT WORKS
Plants absorb water from the soil. The user irrigates the farm periodically. Soil patches diffuse 10% of their water content to their neighbors at every tick. Soil loses some amount of water directly to the atmosphere via evaporation. More water is lost down to the earth due to drainage. This depends on the type of soil chosen: sand, clay or loam. If the soil has too much or too little water then the plant on that patch of soil dies. Individual plants are not identical. Plants of the same crop have slightly differing optimium water content values that very by about 10% between each other. This adds a level of heterogeneity in the crop. This is more realistic as no two peppers are exactly the same. Based on the parameter values irrigation water is applied to the field every period number of ticks. The color of the patches indicates how much water is present. Dark brown means lots of water, light brown means less water. When the crop starts dying one by one plants die and disappear from the model.
HOW TO USE IT
Using the respective sliders set the number of plants, evaporation rate, period and irrigation-amount-per-patch. Period is the number of ticks in between two successive irrigation actions. If periodic is turned on then irrigaion will continue automatically once every period. If not on then irrigation will be one time. Using the respective choosers choose the crop to be grown, the irrigation method to be used, the kind of soil and the arrangement of the crops on the field. Then hit setup to initialize the model and then hit go. The model will stop once all turtles are dead or the lifecycle of the crop is over.
The irrigation efficiency is shown in a plot. The number of plants killed from an excess and lack of water are monitored too. The average water content of the plants and the average patch water content is monitored in the top two plots. The crop yield, which is the percentage of initial crops that are still alive, is shown in a monitor window as well. The number of plants is also plotted as a function of time.
THINGS TO NOTICE
There are 5 output plots. Notice how the average patch water content zig-zags up and down, but usually have a net rise or fall over the lifespan of the model. The efficiency plot measurs the percentage of water irrigated that is used by the plants. The plot usually tends to follow a shifted logarithmic curve. When running the model sometimes you will see that initially a lot of plants die but then the model reaches a somewhat steady number and the population tends to plateau till the end. However in some cases the population suddenly dies out if the conditions are not suitable.
THINGS TO TRY
Try growing rice with sand, clay and loam soils with a 80% yield rate. Which of the three is the most water efficient?
By changing the number of plants in the slider, you can notice the spacing between the plants changes as well. The more plants there are the closer together they will be. Try drip irrigation on peppers but change the spacing everytime you try. You will see that the efficiency of irrigation is affected by the proximity of neighbouring plants.
EXTENDING THE MODEL
A button could be added for rain, to introduce a new factor into the model. As of now the model assumes that all water is from artificial irrigation.
Another feature to add would be fertilizers which containt nutrients and chemicals. This could effect the soil content aiding or harming the growth rate of the crops.
This model is a 1 crop farm model. If maybe 2 or 3 types of crops were grown together on the farm that might have interesting effects on the water usage. Alernate croppping is practiced in the real world so to have an extension on that would be useful.
NETLOGO FEATURES
The model has 3 BehaviorSpace experiments. They vary the period and irrigation per patch parameters for the three different crops - rice, maize and peppers - to find the optimal combination that maximizes yield and efficiency. Behavior Space allows the developer to test the model with a very wide range of parameters automatically. This feature is very useful because you can get insights and findings from combinations that you might not have tried manually.
Another feature that is really interesting is the the colors. The patches change shades of brown based on their water content. Netlogo's brown shades range from 30 to 39. I was able to use this window to vary the colors gradually. I find this feature particularly useful as it is different from the hex rbg color code systems.
RELATED MODELS
Percolation Model fromt the Netlogo Model Library
CREDITS AND REFERENCES
Brouwer, C. J. Irrigation Water Management: Irrigation Methods. Rome: Food and Agriculture Organization of the United Nations, 1985. www.fao.org. Food and Agricultural Organization of the United Nations. Web. 2 June 2016.
This model would have not been possible without the guidance of Uri Wilensky, Artur Hjorth, Bryan Head and Elhem Beheshti.
Comments and Questions
turtles-own [ pmin-water-content ; min water content of patch its on in order to live pmax-water-content ; max water content of patch its on in order to live cur-water-content ; current water content of turtle ] patches-own [ pwater-content ; patche's water content ] globals [ avg-cur-water-content ;avg water content of patches total-water-used-in-irrgn ;total water used in irrigation total-killed-from-excess-water ;number of plants killed from excess water total-killed-from-less-water ;number of plants killed from less water total-water-used-by-crops ; total water used by crop total-water-on-farm ; total water content of farm time ; time in the simulation. = number of ticks abs-rate abs-success efficiency ; outout measure crop-lifespan ; lifespan of current crop ] to setup clear-all ;;maize if crop-type = "maize" [ ; if maize crop set maize properties create-turtles num-plants [ set shape "plant" setxy random-xcor random-ycor set crop-lifespan 1300 set pmin-water-content 100 + random 10 set pmax-water-content 700 + random 100 set cur-water-content 300 + random 50 set color green ] ] ;;peppers if crop-type = "peppers" [ ; if pepper crop set pepper properties create-turtles num-plants [ set shape "plant" setxy random-xcor random-ycor set crop-lifespan 1500 set pmin-water-content 100 + random 10 set pmax-water-content 600 + random 100 set cur-water-content 300 + random 100 set color blue ] ] ;; rice if crop-type = "rice" [ ;set rice properties create-turtles num-plants [ set shape "plant" setxy random-xcor random-ycor set crop-lifespan 1200 set pmin-water-content 150 + random 15 set pmax-water-content 800 + random 100 set cur-water-content 400 + random 100 set color red ] ] set total-water-on-farm 0 ask patches [ ;get total water on farm set pwater-content 180 + random 40 set total-water-on-farm total-water-on-farm + pwater-content set pcolor (39.9 - pwater-content / 100 ) ] get-avg-cur-water-content set abs-rate 3 set abs-success 0 set total-water-used-in-irrgn (sum [pwater-content] of patches) set total-killed-from-excess-water 0 set total-killed-from-less-water 0 set total-water-used-by-crops 0 set time 0 set efficiency 0 ;getter defined below set-arrangement reset-ticks end ;; set arrangment or formation of crops based on input to set-arrangement if arrangement = "rows" [setup-rows] if arrangement = "evenspread" [setup-es] end ;; setup equally spaced rows to setup-rows let num-rows 9 ; number of rows to create let total-turtles count turtles let x-spacing (max-pxcor - min-pxcor) / num-rows ;space between the rows ask turtles [ foreach [0 1 2 3 4 5 6 7] [ if who >= (? * total-turtles / (num-rows - 1)) and who < ((? + 1) * total-turtles / (num-rows - 1))[ set xcor min-pxcor + x-spacing * (? + 1) ] ] set ycor (min-pycor + ((who mod (total-turtles / (num-rows - 1))) / (total-turtles / (num-rows - 1))) * max-pycor * 2) ] end ;; set up turtles equally spead out equispread arrangment to setup-es let num-rows 24 let total-turtles count turtles let x-spacing (max-pxcor - min-pxcor) / num-rows ask turtles [ foreach [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22] [ if who >= (? * total-turtles / (num-rows - 1)) and who < ((? + 1) * total-turtles / (num-rows - 1))[ set xcor min-pxcor + x-spacing * (? + 1) ] ] set ycor (min-pycor + ((who mod (total-turtles / (num-rows - 1))) / (total-turtles / (num-rows - 1))) * max-pycor * 2) ] end to go if count turtles <= 1 [ stop ] ; if all plants dead if time >= crop-lifespan [ stop ] ;life cycle of crop finished diffuse pwater-content 0.1 check-water irrigate absorb-water use-water patches-lose-water evaporation recolor-patches get-avg-cur-water-content get-eff get-total-water-on-farm set time time + 1 tick end ; patches lose water to earth to patches-lose-water ;; patch procedure if soil-type = "sand" [ ask patches [ set pwater-content pwater-content - 0.3 ] ] if soil-type = "loam" [ ask patches [ set pwater-content pwater-content - 0.2 ] ] if soil-type = "clay" [ ask patches [ set pwater-content pwater-content - 0.1 ] ] recolor-patches end ; check water at turtles patch. die accordingly to check-water ;; turtle procedure ;; check if there is too much water on the turtle's patch ask turtles [ let flag 0 let y pmax-water-content ask patch-here [ if pwater-content > y [ set flag 1 ] ] if flag = 1[ set total-killed-from-excess-water total-killed-from-excess-water + 1 die ] ] ;; check if too little water for turtle ask turtles [ let flag 0 let x pmin-water-content ask patch-here [ if pwater-content < x [ set flag 1 ] ] if flag = 1[ set total-killed-from-less-water total-killed-from-less-water + 1 die ] ] end ; turtles use the water they absorb to use-water ;; turtle procedure ask turtles [ set cur-water-content cur-water-content - abs-rate ] end ; absorb water from soil to absorb-water ;; turtle procedure ask turtles[ set abs-success 0 let abss 0 ask patch-here[ if pwater-content > abs-rate [ set pwater-content pwater-content - abs-rate set abss 1 ] set abs-success 1 ] if abss = 1 [ set cur-water-content cur-water-content + abs-rate set total-water-used-by-crops total-water-used-by-crops + abs-rate ] set abs-success 0 set abss 0 ] end to evaporation ;; patch procedure ask patches [ ifelse pwater-content >= evaporation-rate [ set pwater-content pwater-content - evaporation-rate ] [ set pwater-content 0 ] ] end to irrigate if periodic [ ;;; repeat the irrigation if ticks mod period = 0 [ if irrigation-type = "drip" [drip-irrigation] if irrigation-type = "surface" [surf-irrigation] if irrigation-type = "channel" [channel-irrigation] ] ] end ;; surface irrigation. add water to every patch to surf-irrigation ;; patch procedure ;;; add water to every patch ask patches [ set pwater-content pwater-content + irrigation-per-patch set total-water-used-in-irrgn total-water-used-in-irrgn + irrigation-per-patch ] recolor-patches end ;; add water to those patches with turtles on them to drip-irrigation ;; patch procedure ask patches [ if count turtles-here > 0 [ set pwater-content pwater-content + irrigation-per-patch set total-water-used-in-irrgn total-water-used-in-irrgn + irrigation-per-patch ] ] recolor-patches end ;; add water in vertical lines to channel-irrigation ;; patch procedure ask patches [ let x-spacing (max-pxcor - min-pxcor) / 7 ;;9 channels if member? pxcor [0 4 7 11 14 -4 -7 -11 -14] [ set pwater-content pwater-content + irrigation-per-patch set total-water-used-in-irrgn total-water-used-in-irrgn + irrigation-per-patch ] ] recolor-patches end ; calcualtes the irrigation efficiency to get-eff set efficiency (total-water-used-by-crops / total-water-used-in-irrgn) * 100 end ;total water on farm is sum of pwaterc-content of patches to get-total-water-on-farm set total-water-on-farm (sum [pwater-content] of patches) end ;; scale the patch colors from light to dark brown based on water content to recolor-patches ;; patch procedure ask patches [ set pcolor (39.9 - pwater-content / 100 ) ] end ;getter function to get-avg-cur-water-content if count turtles > 0 [ set avg-cur-water-content (mean [cur-water-content] of turtles) ] end
There are 6 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
JaiveerKothari-FinalProjectReport.pdf | Final Report | about 9 years ago, by Jaiveer Kothari | Download |
This model does not have any ancestors.
This model does not have any descendants.