Predictive Heating Optimization Accelerator
Deploy-ready Databricks Asset Bundle for Model-Predictive-Control optimization of building/district-heating supply temperatures. Trains per-site thermal models, computes comfort-constrained optimal setpoints against a price signal with a real unit-tested NumPy MPC solver, and quantifies verified energy, cost, and CO2 savings. Fully generic and environment-agnostic.
⚙ Try the Live Demo interactive
Run the actual MPC optimizer in your browser: set a price curve and comfort band and watch it cut heating cost while holding comfort.
⚡ Open Interactive Optimizer📋 What's Inside 21 files
- ✓ README.md
- ✓ LICENSE
- ✓ manifest.json
- ✓ databricks.yml
- ✓ resources/jobs.yml
- ✓ src/models/train_thermal_model.py
- ✓ src/optimization/mpc_solver.py
- ✓ src/optimization/run_mpc.py
- ✓ src/savings/01_energy_savings.sql
- ✓ src/savings/02_emission_savings.sql
- ✓ src/monitoring/indoor_temperature.sql
- ✓ src/monitoring/comfort_compliance.sql
- ✓ configs/sites.example.yaml
- ✓ configs/optimization.example.yaml
- ✓ tests/test_mpc_solver.py
- ✓ conftest.py
- ✓ guide/01_what-you-get.md
- ✓ guide/02_getting-started.md
- ✓ guide/03_architecture.md
- ✓ guide/04_support.md
- ✓ guides/heating-optimization-methodology.md
📁 File Structure 21 files
├── README.md
├── LICENSE
├── manifest.json
├── databricks.yml
├── resources/
│ ├── jobs.yml
├── src/
│ ├── models/
│ │ ├── train_thermal_model.py
│ ├── optimization/
│ │ ├── mpc_solver.py
│ │ ├── run_mpc.py
│ ├── savings/
│ │ ├── 01_energy_savings.sql
│ │ ├── 02_emission_savings.sql
│ ├── monitoring/
│ │ ├── indoor_temperature.sql
│ │ ├── comfort_compliance.sql
├── configs/
│ ├── sites.example.yaml
│ ├── optimization.example.yaml
├── tests/
│ ├── test_mpc_solver.py
├── conftest.py
├── guide/
│ ├── 01_what-you-get.md
│ ├── 02_getting-started.md
│ ├── 03_architecture.md
│ ├── 04_support.md
├── guides/
│ ├── heating-optimization-methodology.md
📖 Documentation Preview README excerpt
Predictive Heating Optimization Accelerator
A deploy-ready **Databricks Asset Bundle (DAB)** that runs **Model Predictive
Control (MPC)** over district-heating substations — or any building portfolio
with supply-temperature control — to cut heating energy **5–15%** while keeping
every building inside its comfort band.
Everything is generic and environment-agnostic: you point the bundle at your
own catalog, schema, warehouse, and source tables via bundle variables and
deploy with one command. There are no organization-specific catalogs, table
names, timezones, currencies, or business logic baked in.
What makes this different
- **A real, working MPC solver** — `src/optimization/mpc_solver.py` is a
complete, dependency-light optimizer in pure NumPy (no scipy/cvxpy). It is
**unit-tested** (`tests/test_mpc_solver.py`, 8 passing tests) and runs
offline. This is not a "implement your own solver here" placeholder.
- **Verified savings, not estimated** — savings are computed against a
reference baseline, with a comfort-compliance guardrail proving comfort was
never sacrificed for savings.
- **One-command deploy** — a standard DAB with three scheduled jobs.
How it works
1. **Telemetry ingestion** — substation temperatures, setpoints, weather.
2. **Thermal model training** (daily) — a per-site first-order linear model:
`T_in(t+1) = alpha*T_in(t) + beta*u(t) + gamma*T_out(t) + delta*rad(t) + c0`
3. **MPC optimization** (every 15 min) — the solver computes the cost-optimal
supply-temperature trajectory against a price/marginal-cost signal, subject
to comfort and hardware bounds.
4. **Setpoint dispatch** — read `optimization_results` from your BMS/SCADA
integration and apply the first setpoint of each site's trajectory.
5. **Savings & emissions** (daily) — verified energy, cost, and CO2 savings.
Quickstart (30 minutes)
```bash
1. Install the Databricks CLI (>= 0.205.0)
curl -fsSL https://raw.githubusercontent.com/databricks/setup-cli/main/install.sh | sh
2. Configure a profile in ~/.databrickscfg (host + auth)
3. Set your variables in databricks.yml (catalog, schema, warehouse_id,
telemetry_source, weather_source, price_source, timezone)
... preview truncated, see full README in product download.