Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.0.0] - in planning
Aim: 3 species, 2 crop growth models, farm model, GAEC scenarios, experimental analysis
[0.6.0] - unreleased
Plan: decouple CairoMakie (#81), fix & test ALMaSS, set up first experiments
Added
- crop.cropdirectoryparameter specifies folder in which all crop data files for the selected crop model can be found.
Changed
- preprocessparameters()checks whether the map and crop directories are reachable from the current working directory. If not, it checks whether it can be reached from the package directory. This makes running simulations easier when Persefone has been installed as a package.
- simulate()and- initialise()now take a- paramskeyword argument that can be used to override parameters from other input sources
Deprecated
Removed
- crop.cropfileand- crop.growthfileparameters -> user configuration is now done via- crop.cropdirectory, names of ALMaSS input files are specified as constants in- almass.jl
Fixed
[0.5.5] - 09-08-2024
This point release implements the first basic farm model
Added
- basic farm model that assigns a crop rotation to each field, sowing and harvesting when appropriate 
- new parameters: - farm.farmmodel,- farm.setaside,- farm.fieldoutfreq
- visualisation of cropped area and crop growth over time 
- farm.setasidesetting to configure what proportion of land farmers let lie fallow
- isharvestable()function for- FarmPlots
- @areaofmacro to calculate the area of a given number of landscape pixels
- data/farm/standard_gross_margins.csvfrom KTBL data
Changed
- expanded & adapted general crop data and crop growth curve tables
Fixed
- bug fixes in the ALMaSS crop model
[0.5.4] - 08-08-2024
Skylark data analysis and new internal utility functions
Added
- AnnualDatetype and associated functions for working with recurring dates (#101)- can be constructed from two Int64, aDate, or aTuple{Int64,Int64}
- automatic conversion from DateorTuple{Int64,Int64}
- can use operators: ==,<,+,-,:
- thisyear(),- lastyear(),- nextyear()functions and macros
 
- can be constructed from two 
- new file - core/utils.jlfor utility functions that fit in no other file
- irregular data logging using - record!()/- @record()(#103)
- data outputs & visualisation for the skylark model (#97) 
- randn()function and macro to sample from a vector using a normal distribution
- make installto download and install Julia and package dependencies (on Linux, #67)
- weather file for the Thüringer Becken 
Changed
- moved random number functions and macros from - input.jlto- utils.jl
- expanded weather data for Jena to 1990-2023 
- Non-breeding skylarks only search for neighbours to follow once (-> huge performance improvement!) 
Fixed
- bug fixes in the skylark model
[0.5.3] - 31-07-2024
Switchable crop models
Added
- Support for switchable crop models (#70), crop models can be set with the - cropmodelsetting in the- [crop]section of- parameters.toml.
- New submodules - ALMaSSfor the ALMaSS crop model, and- SimpleCropfor testing switchable crop models.
Changed
- All functionality specific to the ALMaSS crop model has been moved to the submodule - ALMaSS.
- Due to switchable crop models, some types are now parametric: - AgricultureModel{Tcroptype,Tcropstate}and- FarmPlot{Tcropstate}.
- FarmPlot{Tcropstate}now only stores basic information about which pixels are part of the farm plot, all crop-specific information is now stored in the field- cropstate. Many functions acting on a- FarmPlotnow mostly forward to functions of the same name acting on the- cropstatefield of a- FarmPlot.
- The type of - heightin- ALMaSS.CropStateand- ALMaSS.CropCurveParamsis now a unitful number- ::Length{Float64}.
- Both crop models - ALMaSSand- SimpleCropnow also support the functions- cropcoverand- cropyieldin addition to- croptype,- cropname,- cropheight.
- cropheightnow returns a unitful number- ::Length{Float64}, and returns height- 0cmif the landscape at that position is not a- FarmPlot.
[0.5.2] - 30-07-2024
Rewrote the skylark model
Added
- Skylark model is largely rewritten to follow a new phase structure (#9) 
- animals can occupy territories (see - @occupy,- @isoccupied,- @vacatemacros/functions) (#94)
- @cropcovermacro and function
- ODD documentation for Skylark 
Changed
- input files that are now copied to a separate - inputsdirectory within the output directory
- EventTyperenamed to- Managementfor clarity
- documentation website now has a "Scientific Documentation" section 
Removed
- old skylark model (has been rewritten, see above)
Fixed
- all skylarks now migrate (#90) 
- insectbiomass()uses units
[0.5.1] - 13-06-2024
Added Unitful.jl
Added
- Unitful.jl now used to add units to quantities 
- world.mapdirectoryparameter specifies the path to the directory in which
landcovermap, farmfieldsmap, and weatherfile are located
- world.mapresolutionparameter specifies the input maps' spatial resolution in meters
Changed
- spatial functions now work with explicit distances (using Unitful.jl) rather than using the number of pixels 
- all species definitions and tests updated to use units 
[0.5.0] - 07-06-2024
This release doesn't add much new functionality, but represents a major restructuring of the code base. Specifically, it removes the Agents.jl dependency and changes the way the species definition macros work and are used.
Added
- SimulationModeltype, extended by- AgricultureModelstruct
- @createmacro defines a special phase function that is called when an individual animal is created (at birth or on model initialisation)
- functions (and associated macros) to replace Agents.jl functionality: - move!()and- walk!()
- nearby_ids(),- nearby_animals(),- countanimals(),- neighbours()
- directionto(),- distanceto(),- randomdirection()
- nagents(),- killallanimals!()
 
- @heremacro to return the pixel currently occupied by the active animal
- core.logoutputparameter to define whether logs are printed to screen, file, none, or both
- large logo and model structure diagram 
- Changelog 
Changed
- SimulationModelreplaces- AgentBasedModel
- Species definition macros revamped: - @speciesnow only defines parameters and variables and creates a mutable struct
- @phasemust now be defined in the top-level code and creates a global function
- @initialiserenamed to- @populate, must also be called in the top-level code
- initindividual()renamed to- create!()
 
- Skylark, Wolpertinger, and Wyvern updated to match the new macros 
- requires Julia 1.10 
Removed
- Agents.jl dependency (including AgentBasedModeland functions for adding/moving/removing agents)
[0.4.1] - 2023-11-14
Initial version of the skylark model
Added
- initial version of the Skylark species 
- small Jena map 
- animal individuals keep track of their parents' IDs 
- several new functions and macros for animals 
- installation instructions for Windows 
Changed
- graphics output is more configurable
[0.4.0] - 2023-10-28
Functions for animal populations
Added
- initialisation functions for individuals (not just species) 
- migration function / migrant pool for animals that disappear from the landscape during winter 
- skylark migration 
Changed
- online documentation was expanded and restructured 
- nature macros moved to a separate file 
Started changelog at this point, earlier versions are not included.
<!– Template
[version] - unreleased
<comments>
PLANNED
Added
Changed
Deprecated
Removed
Fixed
–>