Skip to content

EbiAG/abm-indvariation-beerecruitment

Repository files navigation

Simulations of individual variation in dance activity in honey bees

Code, Datasets and Analysis associated with the Agent-based model simulations of honey bee foraging behaviour incorporating individual variation in dance activity This repository has everything needed to rerun the simulations. The repository contains the following folders and files (in the order they need to be run):

  1. Model Input Folder - This contains the R code to visualise different levels of variation in probability and intensity as well as illustrator files showing the process opverview for foragers and scouts in the ABM
  2. Model Code - This folder contains three folders
    1. ABM_NETLOGO - containing separate NETLOGO codes to run the ABMs for Experiment 1, Experiment 2 and the Sensitivity Analysis as described in the manuscript
    2. ABM_NETLOGO_Output - the CSVs obtained directly from running the NETLOGO codes via the _'behaviourspace'_ tool (with the _'table'_ output format) in NETLOGO
    3. OutputCleanup_Python - python codes to clean up the output files obtained directly from NETLOGO
  3. Model_Output_Processed - the processed CSV files obtained after cleaning up the output produced from NETLOGO using python. These are the CSVs on which the statsitical analysis is done
  4. Analysis_Experiment1_Repeatability - R codes for analysing the data obtained from the simulations in Experiment 1 and the output (results, graphs) of the analysis
  5. Analysis_Experiment2_AdaptiveBenefit - R codes for analysing the data obtained from the simulations in Experiment 2 and the output (results, graphs) of the analysis
  6. Analysis_SensitivityAnalysis_Repeatability - R codes for analysing the data obtained from the sensitivity analysis and the output (results, graphs) of the analysis

Rerunning the simulations

To rerun the simulations and the analysis, follow the process below:

  1. Open the NETLOGO code for an experiment of interest and use the _behaviourspace_ tool to run multiple simulations. Make sure to select the _table_ output.
    • For experiment 1, the behaviourspace code is set to run 100 simulations of each of the 4 models
    • For experiment 2, the behaviourspace code is set to run 20 simulations of each of the 12 model combinations
    • For the sensitivity analysis, the behaviourspace code is set to run 5 simulations of each of the 80 model combinations. When re-running the analysis, the random seed number must be changed. this can be done by selecting the edit option in the _behaviourspace_ tool and providing new seed numbers in the appropriate location.
  2. Copy the CSVs output by NETLOGO into the same folder with python code and run the code to process the CSVs for analysis. Ensure that the CSVs are named as in the ABM_NETLOGO_Output folder or alternatively change the python code to match the names of the files
  3. Copy the processed CSVs to the Model_Output_Processed folder and the run the R codes in the 'Analysis' folder linked to the particular experiment to perform the statistical analysis

Zenodo Link of this repository: https://doi.org/10.5281/zenodo.5217629

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published