ECOGrid now supports generating synthetic data using Agent-Based Modeling (ABM) to simulate energy community dynamics. This guide explains the purpose of ABM-generated data, how to generate it, and how to structure outputs for downstream analysis.
ABM-generated data is essential for:
- Testing & Development β Provides realistic agent-level trajectories.
- Scenario Analysis β Enables experimentation with different incentive policies and agent compositions.
- Reproducibility β Ensures anyone can reproduce the same trajectories using a fixed random seed.
All generated data is stored in data/abm/.
Data generation involves:
- Script:
src/scripts/generate_abm.py - Logic:
src/simulation/model.pyandsrc/simulation/agents/
Generate ABM data with default parameters:
python -m src.scripts.generate_abmYou can adjust the number of agents, steps, seed, and output folder. Example:
python -m src.scripts.generate_abm \
--n-consumers 10 \
--n-prosumers 5 \
--n-grid-agents 1 \
--n-steps 50 \
--seed 1234 \
--output data/abm_custom| Parameter | Type | Default | Description |
|---|---|---|---|
--n-consumers |
int | 2 |
Number of consumer agents |
--n-prosumers |
int | 2 |
Number of prosumer agents |
--n-grid-agents |
int | 1 |
Number of grid agents |
--n-steps |
int | 3 |
Number of simulation steps |
--seed |
int | 42 |
Random seed for reproducibility |
--output |
Path | data/abm |
Directory for CSV/JSON outputs |
Each run creates a folder named after the seed:
data/abm/
βββ run_seed_42/
βββ agents_step_1.csv
βββ agents_step_2.csv
βββ ...
βββ simulation_output.json
agents_step_*.csvβ Agent states at each simulation step.simulation_output.jsonβ Full aggregated simulation trajectory for easy analysis.
- Agents are currently mocked, with minimal behavior logic.
- Future versions will implement realistic decision rules and interactions.
- CSVs are compatible with downstream notebooks and visualizations.
- See MonteCarlo Data Generation Guide for comparisons and pipeline conventions.
- For initial setup steps, refer to Getting Started.