A C# application that optimises heat production across 4 assets using Google OR-Tools,
minimising cost while satisfying demand — built in collaboration with Danfoss.
BSc Software Engineering · SEP2 Semester Project
The Danfoss Heat Utility System (HUS) is a semester project developed in collaboration with Danfoss, a global leader in engineering solutions for heating, cooling, and energy management.
The system solves a real operational problem in district heating: given 4 heating assets with different capacities and running costs, and a time-varying heat demand and electricity price curve, determine the optimal production schedule that meets demand at minimum cost.
This is modelled as a linear programming / mixed-integer optimisation problem and solved with Google OR-Tools.
The system ingests:
- Heat demand forecast (MWh per time slot)
- Electricity spot prices (DKK/MWh, e.g. from Nord Pool)
- Asset specifications — capacity (MW), production cost functions, on/off constraints
It then solves for the optimal dispatch schedule: how much heat each asset should produce in each time slot to satisfy demand while minimising total operating cost.
Minimise: Σ (cost_i × output_i) for each asset i, each time slot t
Subject to: Σ output_i ≥ demand_t (demand always met)
0 ≤ output_i ≤ capacity_i (physical limits)
The result is a production plan that avoids running expensive assets when demand or price is low, and prioritises cheaper assets at peak times.
- Optimisation engine — Google OR-Tools LP/MIP solver dispatching across 4 heating units
- Price-aware scheduling — responds to electricity spot price signals to minimise cost
- Demand satisfaction constraint — total production always meets or exceeds required heat output
- Automated testing —
HUS.Testsproject validates the optimisation logic and constraint handling - CI pipeline — GitHub Actions validates every commit; the build must pass before merge
| Component | Technology |
|---|---|
| Language | C# (.NET) |
| Optimisation | Google OR-Tools (linear/mixed-integer programming) |
| Architecture | Layered — domain models, solver logic, presentation |
| Testing | Unit + integration tests via HUS.Tests |
| CI/CD | GitHub Actions (.github/workflows) |
Danfoss-Heat-Utility-System/
├── HUS/ # Core application — asset models, solver, scheduler, UI
├── HUS.Tests/ # Unit and integration tests
└── .github/workflows/ # CI pipeline
Prerequisites: .NET SDK 6.0+, Visual Studio or JetBrains Rider
git clone https://github.com/aIex-personal/Danfoss-Heat-Utility-System.git
dotnet build # restore and build
dotnet test # run the test suiteThis project followed a professional Git workflow enforced by CI:
- Every feature developed on its own branch, created directly from the GitHub issue
- Pull requests required a passing CI pipeline before merge
- Commits follow a consistent convention:
ADDED [...] functionality/UPDATED [...] functionality - Branch always synced from
mainbefore starting new work
Group project following agile practices with peer code review on all pull requests, built to the professional standards expected for an industry-partnered semester project with Danfoss.