Farm submodel
Eventually, the aim is to create a full socio-economic farm decision model for Persefone. However, for the time being, we will restrict ourselves to a simple model that executes typical farm operations and crop rotations.
farm.jl
This file is responsible for managing the farm module(s).
Persefone.BasicFarmer — TypeBasicFarmerThe BasicFarmer type simply applies a set crop rotation to his fields and keeps track of income.
Persefone.Farmer — TypeThis is the agent type for the farm ABM.
Persefone.findsetasides — Methodfindsetasides(farmer, model)Return a vector of field IDs that this farmer should keep fallow to satisfy the configured set-aside rules.
Persefone.initbasicfarms! — Methodinitbasicfarms!(model)Initialise the basic farm model. All fields are controlled by a single farmer actor and are assigned as grassland, set-aside, or arable land with a crop rotation.
Persefone.initfarms! — Methodinitfarms!(model)Initialise the model with a set of farm agents, depending on the configured farm model.
Persefone.stepagent! — Methodstepagent!(farmer, model)Update a farmer by one day. Cycle through all fields and see what management is needed.