# pymgrid: An Open-Source Python Microgrid Simulator for Applied Artificial Intelligence Research

arXiv: https://arxiv.org/abs/2011.08004 · HTML: https://mlsanity.com/paper/2011.08004/

## Key facts

- Cited by 10 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 11 Nov 2020.

## Built on by (most cited first, 10 of 10)

- [Learning to run a Power Network Challenge: a Retrospective Analysis](https://mlsanity.com/paper/2103.03104/) (2021)
- [Reinforcement Learning for Selective Key Applications in Power Systems: Recent Advances and Future Challenges](https://mlsanity.com/paper/2102.01168/) (2021)
- [PowerGym: A Reinforcement Learning Environment for Volt-Var Control in Power Distribution Systems](https://mlsanity.com/paper/2109.03970/) (2021)
- [RL2Grid: Benchmarking Reinforcement Learning in Power Grid Operations](https://mlsanity.com/paper/2503.23101/) (2025)
- [CommonPower: A Framework for Safe Data-Driven Smart Grid Control](https://mlsanity.com/paper/2406.03231/) (2024)
- [Energy Pricing in P2P Energy Systems Using Reinforcement Learning](https://mlsanity.com/paper/2210.13555/) (2022)
- [Distributed Ensembles of Reinforcement Learning Agents for Electricity Control](https://mlsanity.com/paper/2208.14338/) (2022)
- [Decentralized Multi-agent Reinforcement Learning based State-of-Charge Balancing Strategy for Distributed Energy Storage System](https://mlsanity.com/paper/2308.15394/) (2023)
- [Towards Affordable Energy: A Gymnasium Environment for Electric Utility Demand-Response Programs](https://mlsanity.com/paper/2605.12462/) (2026)
- [PowerZooJax: A JAX-based Power System Benchmark for Reinforcement Learning](https://mlsanity.com/paper/2609.36052/) (2026)

## Abstract (arXiv)

Microgrids, self contained electrical grids that are capable of disconnecting from the main grid, hold potential in both tackling climate change mitigation via reducing CO2 emissions and adaptation by increasing infrastructure resiliency. Due to their distributed nature, microgrids are often idiosyncratic; as a result, control of these systems is nontrivial. While microgrid simulators exist, many are limited in scope and in the variety of microgrids they can simulate. We propose pymgrid, an open-source Python package to generate and simulate a large number of microgrids, and the first open-source tool that can generate more than 600 different microgrids. pymgrid abstracts most of the domain expertise, allowing users to focus on control algorithms. In particular, pymgrid is built to be a reinforcement learning (RL) platform, and includes the ability to model microgrids as Markov decision processes. pymgrid also introduces two pre-computed list of microgrids, intended to allow for research reproducibility in the microgrid setting.
