Skip to content

Latest commit

Β 

History

History
94 lines (63 loc) Β· 2.72 KB

File metadata and controls

94 lines (63 loc) Β· 2.72 KB

πŸ“¦ ABM Energy Community Data Generation Guide

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.


🎯 Purpose of ABM Data

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/.


1️⃣ Data Generation

Data generation involves:

  • Script: src/scripts/generate_abm.py
  • Logic: src/simulation/model.py and src/simulation/agents/

A. Run a Simulation

Generate ABM data with default parameters:

python -m src.scripts.generate_abm

B. Customize Parameters

You 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

πŸ”§ Available CLI Parameters

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

2️⃣ Output Structure

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.

3️⃣ Notes

  • 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.

πŸ“š References

  • See MonteCarlo Data Generation Guide for comparisons and pipeline conventions.
  • For initial setup steps, refer to Getting Started.