Tuning regimes in ant foraging dynamics depend on the existence of bistability
# Tuning Regimes in Ant Foraging Dynamics Depend on the Existence of Bistability This repository contains all data and code used in the manuscript titled: **"Tuning regimes in ant foraging dynamics depend on the existence of bistability"** ## Contents The repository includes MATLAB, R, and Python scripts used to generate and analyze simulation data, reproduce all main figures, and support the results and conclusions presented in the main text and supplemental materials. --- ## Getting Started ### Core Script To generate the primary dataset used in the analyses, run: - `runModels.m`: This MATLAB script simulates the full set of model dynamics and produces the file `simulationData.mat`, which is used throughout the manuscript. ### Required Functions Several scripts require the following custom MATLAB functions: - `computeFisherInformation.m`- `computeHysteresis.m`- `findRoots.m`- `initializeAgents.m`- `simulateSteadyState.m`- `runDynamics.m` Additionally, some figures use the perceptually uniform colormap `cmocean.m`: - **Citation**: Thyng, K. M., Greene, C. A., Hetland, R. D., Zimmerle, H. M., & DiMarco, S. F. (2016). True colors of oceanography: Guidelines for effective and accurate colormap selection. *Oceanography*, 29(3), 9–13. https://doi.org/10.5670/oceanog.2016.66 --- ## Figure Scripts The following scripts reproduce figures in the **main text**: - `figure5.m`- `figures1and4.m`- `figures2and3andS5.m` The following scripts reproduce figures in the **supplementary materials**: - `figureS3.m`- `figureS4.m`- `Figure S2.R` – written in R- `simple-model-phase-diagram.ipynb` – Jupyter notebook used to generate Figure S1 --- ## Additional Simulations Two Python scripts are used to generate simulation data for supplemental section S2: - `run_open_loop_sim.py` → produces `250410_open_loop_simulation_data.csv`- `run_closed_loop_sim.py` → produces `250515_closed_loop_simulation_data.csv` --- ## Instructions 1. **File Organization**: Ensure all scripts, functions, and data files are in the same working directory.2. **Dependencies**: - MATLAB scripts require the custom functions listed above. - R script requires base R and any standard plotting packages (e.g., `ggplot2`). - Python scripts require `numpy`, `pandas`, and `matplotlib` and other packages.3. **Working Directory**: Set your working directory appropriately before executing any scripts.4. **File Names**: Make sure data files and references in scripts (e.g., `.mat` or `.csv` files) match expected names exactly. --- ## Contact For questions regarding the code or data, please contact the corresponding author listed in the manuscript.
Institutions
- Arizona State University (US)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-08-04
- DOI
- https://doi.org/10.5281/zenodo.16740449
- Primary Topic
- Insect and Arachnid Ecology and Behavior
- Type
- article
- Field-Weighted Citation Impact
- 0.00