channu07/microgrid-env
AI Custodire Resilience Engine for Next-Gen Microgrids
Why This Matters
Power grids are failing. Climate change brings unpredictable solar generation. EV adoption spikes demand overnight. A single fault can cascade into blackouts affecting millions. Today, human operators make split-second decisions about battery dispatch, load shedding, and fault isolation under pressure, with incomplete information.
AI Custodire trains RL agents to do this automatically. An agent that masters microgrid management could prevent blackouts, reduce energy waste, and accelerate the clean energy transition. This is not a toy problem - utilities like ERCOT, NTPC, and Adani Green face these exact challenges daily.
Environment Description
A simulated microgrid with solar generation, battery storage, variable load demand, and circuit switching. The agent acts as an autonomous grid operator, balancing power supply and demand while responding to faults and optimizing operational cost.
Action Space
Observation Space
Tasks
Reward Design
Rewards are dense every step - agents get continuous feedback, not just end-of-episode:
- load_balance: 0-1 per step based on balance quality. Penalizes load shedding and active faults
- fault_recovery: -0.4 per step with unhandled fault. +0.4 bonus for correct isolation. 0-0.6 for post-recovery stability
- optimal_dispatch: Stability score minus operational cost. Clamped to [0.0, 1.0]
Setup
pip install -e . uvicorn server.app:app --host 0.0.0.0 --port 7860 --reload
Docker
docker build -t microgrid-env . docker run -d -p 7860:7860 microgrid-env
