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
— TypeBasicFarmer
The 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.
farmdata.jl
This file collects relevant output data from the farm model.
Persefone.initfarmdata
— Methodinitfarmdata()
Create output files for each data group collected by the farm model.
Persefone.savefielddata
— Methodsavefielddata(model)
Return a data table (to be printed to fields.csv
), giving the current date, and the area and average of each crop in the landscape. May be called never, daily, monthly, yearly, or at the end of a simulation, depending on the parameter farm.fieldoutfreq
.