
Data and scripts belonging to:
How semi-natural habitats can maximally support nautral pest control.

Reference: Mansier, L., ten Brink J.A., Janssen A. & van Rijn, P.C.J. 
How semi-natural habitats can maximally support nautral pest control. [in prep].


The newest version of this model can be found on the github page of Laura Mansier.


DATA & SCRIPTS
Prerequisites: R and Package "deSolve"

The model can be found in the "Main_model_components" folder. This folder contains a script with the model itself "Functions_model", 
a script with all the parameters "Pars_model" and a script to run the bifurcation analyses "Run_model_all".
If all these scripts are in the same folder, then you only need to run "Run_model_all" to obtain the data from the bifurcation analyses used in
our paper. Note that running this script will take a while.

You can visualise the data using our data visualisation scripts that are in the "Figures" folder.
By first running the script "CalculateAverages", you will save the averages of the bifurcation analyses.
Then you can run "PrepFigures" and "Figures" (in order) to generate the graphs used in our paper.

The other scripts found in the "Figures" folder, namely "Timeseries_B2m_B3m_low" and "Timeseries_n1a" are used to 
create the timeseries figures found in the supplementary information of our paper.
