Skip to content

Latest commit

 

History

History
81 lines (60 loc) · 3.22 KB

File metadata and controls

81 lines (60 loc) · 3.22 KB

Electricity Planning Model (EPM)

EPM is a least-cost capacity expansion and dispatch model for power system planning, developed by the World Bank's Energy Sector Management Assistance Program (ESMAP). It has been applied in over 80 countries.


Where do I start?

I want to... Go here
Understand what EPM does Introduction
Install EPM and run my first simulation Installation
Understand how to structure my input data Input Overview
Run multiple scenarios or a sensitivity analysis Python — Advanced
Visualize results in Tableau Tableau Dashboards
Read the mathematical formulation Model Formulation

How EPM works

flowchart LR
    A("**1. Collect data**\nDemand, generation,\ncosts, policies") -->
    B("**2. Prepare inputs**\nCSV files in\n`input/data_*/`") -->
    C("**3. Configure**\n`config.csv`,\nscenarios, solver") -->
    D("**4. Run EPM**\n`python epm.py`\n--folder_input ...") -->
    E("**5. Optimize**\nGAMS solves\ncapacity + dispatch") -->
    F("**6. Postprocess**\nCSV tables +\nplots generated") -->
    G("**7. Analyze**\nTableau / Python\ndashboards")

    style A fill:#dbeafe,stroke:#3b82f6
    style B fill:#dbeafe,stroke:#3b82f6
    style C fill:#dbeafe,stroke:#3b82f6
    style D fill:#dcfce7,stroke:#16a34a
    style E fill:#dcfce7,stroke:#16a34a
    style F fill:#fef9c3,stroke:#ca8a04
    style G fill:#fef9c3,stroke:#ca8a04

Under the hood: Python (epm.py) orchestrates the run — it reads your configuration, builds scenarios, and launches GAMS in parallel for each one. GAMS solves the optimization and writes results to epmresults.gdx. Python then postprocesses everything into CSV tables and charts.


Key capabilities

  • Capacity expansion — identifies least-cost investment plans across multiple years and zones
  • Dispatch optimization — co-optimizes generation, reserves, and cross-border trade
  • Scenario analysis — run hundreds of scenarios in parallel with a single command
  • Sensitivity & Monte Carlo — built-in support for uncertainty quantification
  • Policy testing — emissions caps, carbon prices, renewable targets, fuel limits

Quick start

# 1. Install dependencies
conda create -n epm_env python=3.10
conda activate epm_env
pip install -r requirements.txt

# 2. Run the test dataset (takes ~1 min)
python epm.py --simple

# 3. Run a full solve with 4 parallel jobs
python epm.py --folder_input data_test --parallel 4

Results are written to output/simulations_run_<timestamp>/ as CSV and GDX files, with Excel, Python, and Tableau templates available for post-processing.


Resources

Resource Link
Source code GitHub — ESMAP-World-Bank-Group/EPM
Previous versions Zenodo archive
Report an issue GitHub Issues
Cite EPM See Introduction