Skip to main content

No project description provided

Project description

cuckoo-sim

Agent-based simulation of cuckoo brood parasitism — modeling the co-evolutionary arms race between cuckoo parasites and their reed warbler host species. Tracks population dynamics, egg-laying strategies, and host detection abilities over many generations.

Installation

pip install cuckoo-sim

Or install from source in editable mode:

git clone <repo-url>
cd Data_And_Script/Model_Script
pip install -e .

Quick Start

GUI

cuckoo-gui

Opens a Tkinter interface with two tabs:

  • Configure & Run — set input CSVs, population parameters, spatial grid, and run simulations
  • Results — plot population time series, trait evolution, and spatial maps

CLI

cuckoo-sim -c path/to/Cuckoo/ -r path/to/Reeds/ -o path/to/OUT/ \
  -c1 Cuckoo_12.csv -r1 ReedsBird_1.csv -q a -N 300 -M 10

Key arguments:

Flag Description Default
-N Number of simulated years 300
-M Number of iterations 10
-P Crowding penalty coefficient 0.9
-D Detection cost on breeding 0.15
-pm Penalty mode (exponential / logistic) exponential
-gw, -gh Spatial grid width/height 200
-s1..-s4 Sigma values for trait variation 0.02 / 1.0

Python API

from cuckoo_sim import SimConfig, run_simulation, aggregate_time_series

config = SimConfig(
    cuckoo_file="path/to/Cuckoo_12.csv",
    reeds_file="path/to/ReedsBird_1.csv",
    years=100,
    iterations=5,
    grid_width=100,
    grid_height=100,
)

results = run_simulation(config)
agg = aggregate_time_series(results)

for species, data in agg.items():
    print(f"{species}: final mean pop = {data['Total']['mean'][-1]:.0f}")

Dependencies

Python 3.6+, numpy, scipy, matplotlib, tkinter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cuckoo_sim-0.1.1.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cuckoo_sim-0.1.1-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

Details for the file cuckoo_sim-0.1.1.tar.gz.

File metadata

  • Download URL: cuckoo_sim-0.1.1.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cuckoo_sim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 611e07b792d37bd002de21d622c16daa42ed092ecf8d10cefb57a597cc12428c
MD5 5a20166eb9672e6886b481ca335f1d67
BLAKE2b-256 060cddaf527f43156342a54d4766451302599e70d58506072b6ff72b057afa1f

See more details on using hashes here.

File details

Details for the file cuckoo_sim-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cuckoo_sim-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for cuckoo_sim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e5f477f3a1ac59243d747a464ee154db63ac17e6f2a1c4e3bd43b0a0a37f6de
MD5 fc9cf2ffcac89745e9acee03dc0a1927
BLAKE2b-256 7dc3b9624006b2ab63678ff74425da1dcef609857a25f2861be8f0163a309979

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page