Skip to content

Agent-Based Simulations with Mesa.       A collection of sample simulation models built using Mesa-framework, showcasing the dynamics of complex systems through agent-based modeling.

Notifications You must be signed in to change notification settings

ashwin-r11/ABM-Samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Agent-Based Simulations with Mesa

Welcome to my repository showcasing various agent-based simulations built using Mesa, a Python library for agent-based modeling. This collection contains diverse examples and templates designed to explore the dynamics of complex systems.


Table of Contents

Introduction

This repository demonstrates the capabilities of agent-based modeling through sample simulations developed using Mesa. Each simulation highlights unique behaviors, interactions, and phenomena observed in complex systems.


Simulations

  1. Lotka–Volterra predator–prey model
    • Description: a pair of first-order nonlinear differential equations, frequently used to describe the dynamics of biological systems in which two species interact, one as a predator and the other as prey.
    • Key Features: Interaction between agents, emergent behaviors.
    • For more Details of this Model chekout:Lotka–Volterra predator–prey model

Installation

  1. Clone this repository:
    git clone https://github.com/ashwin-r11/ABM-Samples.git
    cd ABM-Samples
  2. Set up a virtual environment:
    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt
  4. Usage: Run a simulation by navigating to its directory and executing the corresponding Python script:
     python simulation_name.py
    Some simulations include a graphical interface for visualization, while others output results as logs or data files.

Repo-Tree

├── README.md                   # Repository overview
├── LICENSE                     # License for the repository
├── requirements.txt            # Python dependencies
├── .gitignore                  # Git ignore file
├── docs/                       # Documentation and guides
│   ├── index.md                # Main documentation file
│   └── simulation_guides.md    # Detailed guides for simulations
├── simulations/                # Folder containing all simulation projects
│   ├── __init__.py             # Make this a Python package
│   ├── predator_prey/          # Example simulation: Predator-Prey
│   │   ├── main.py             # Main script to run the simulation
│   │   ├── model.py            # Mesa model definition
│   │   ├── agent.py            # Agent definitions
│   │   ├── server.py           # Server for visualization
│   │   └── README.md           # Explanation of this simulation
│   ├── traffic_flow/           # Example simulation: Traffic Flow
│   │   ├── main.py
│   │   ├── model.py
│   │   ├── agent.py
│   │   ├── server.py
│   │   └── README.md
│   └── ...                     # Add more simulations here
├── utils/                      # Utility scripts shared by simulations
│   ├── visualization.py        # Custom visualization components
│   └── data_processing.py      # Scripts for data analysis
├── tests/                      # Unit tests for your simulations
│   ├── test_predator_prey.py   # Tests for Predator-Prey simulation
│   ├── test_traffic_flow.py    # Tests for Traffic Flow simulation
│   └── ...                     # Add more tests here
└── examples/                   # Example runs or templates
    ├── minimal_simulation.py   # A minimal example for new users
    └── ...                     # Additional examples

About

Agent-Based Simulations with Mesa.       A collection of sample simulation models built using Mesa-framework, showcasing the dynamics of complex systems through agent-based modeling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published