← Back to all products

Predictive Heating Optimization Accelerator

$2990

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.

📁 21 files🏷 v1.0.0
Production-readyUnit-testedDatabricks Asset Bundle
✓ Instant download✓ Lifetime updates✓ MIT licensed✓ Secure checkout (Stripe)

⚙ 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

predictive-heating-optimization/
├── 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.

📄 Code Sample .py preview

src/models/train_thermal_model.py# Predictive Heating Optimization Accelerator: Thermal Model Training # =================================================================== # Trains a per-site linear thermal model that predicts indoor temperature # from recent history + weather. Coefficients feed the MPC solver. # # Fully generic: all catalog/schema/table names come from bundle variables. # Adapt only the source column names to match your telemetry schema. # Databricks notebook source import numpy as np import pandas as pd from datetime import datetime from sklearn.linear_model import Ridge # COMMAND ---------- # Configuration from bundle variables catalog = spark.conf.get("bundle.var.catalog") schema = spark.conf.get("bundle.var.schema") # COMMAND ---------- # Load telemetry for all sites (last 30 days). # Expected columns (rename to match your source): # site_id, timestamp, indoor_temperature, supply_water_temperature, # outdoor_temperature, solar_radiation telemetry = spark.sql(f""" SELECT site_id, timestamp, indoor_temperature, supply_water_temperature, outdoor_temperature, solar_radiation FROM IDENTIFIER('{catalog}.{schema}.substation_telemetry') WHERE timestamp >= DATEADD(DAY, -30, CURRENT_TIMESTAMP()) """).toPandas() # COMMAND ---------- # Train one Ridge thermal model per site. The model is intentionally a # first-order linear form so its coefficients map directly onto the # ThermalModel used by the MPC solver: