# CivicGrid-AI, microgrid forecasting and power allocation

> CivicGrid-AI, built by Rishabh Kataria, forecasts renewable supply for city microgrids and uses linear programming to always power emergency loads first.

**CivicGrid-AI** is a forecasting and power-allocation engine for city microgrids, built by **Rishabh Kataria**.

## The problem

City microgrids run on renewable energy that rises and falls. When supply drops, critical loads like clinics and emergency lighting cannot be left to chance.

## What it does

- **Forecasts supply** with regression models for solar output and for power from piezoelectric floor tiles that harvest energy from foot traffic.
- **Allocates power** with a linear-programming model in PuLP that must fully serve life-safety loads before anything else.
- **Shares the surplus** with streetlights and EV chargers.
- Shows everything on an interactive **Streamlit dashboard** with Plotly charts.

**Result:** emergency loads received 100% of their demand in every tested scenario.

Want to build something similar? Rishabh explains the approach step by step in [linear programming for microgrids with PuLP](/guides/linear-programming-microgrid-pulp/).

## Stack

Python, Scikit-learn, PuLP, Streamlit, Plotly and Pandas.

Links: [code](https://github.com/nova-rishabh/civicgrid-ai)
