Back to Projects
Danfoss Heat Optimizer

Danfoss Heat Production Optimizer

Overview

A desktop engineering tool built in collaboration with Danfoss to automate and optimize district heating production for around 1,600 buildings. The system runs hour-by-hour calculations across two-week seasonal periods to find the cheapest unit configuration while factoring in volatile and negative electricity market prices. Built in C# and .NET using Avalonia UI and the MVVM architecture, it replaces error-prone manual spreadsheets with an interactive simulation interface.

The Problem

Operators previously scheduled district heating units entirely by hand. Comparing operational costs, heat output, fuel usage, and emissions while tracking fluctuating hourly power prices was tedious and inefficient. When market electricity prices dropped into negative territory, manual calculations struggled to adapt quickly to turn electric boilers into profitable heat sources. Danfoss needed an automated tool capable of selecting the most cost-effective production units instantly without human calculation errors.

How It Works

  • Follows a strict MVVM pattern in Avalonia UI to cleanly separate complex mathematical optimization from interface rendering.
  • Handles two distinct operational setups, toggling between gas/oil boilers and hybrid configurations featuring electric boilers and gas motors.
  • Calculates hourly net production costs and weights profit-generating units, prioritizing units that consume cheap or negative-price electricity.
  • Provides an interactive maintenance scheduler that locks individual units offline for 30 to 60 hours while recalculating production loads in real time.
  • Uses OxyPlot with ReactiveUI data bindings to chart heat demand, production curves, emissions, and expenses with instant visual updates.
  • Manages local JSON and CSV pipelines through dedicated, isolated loaders that enforce invariant decimal parsing and cache configuration data.

Engineering & Team Process

  • Delivered across six two-week Scrum sprints in a cross-functional international team using Jira and GitHub.
  • Adopted rotating Scrum Master and meeting coordinator roles alongside pair programming to keep code standards aligned across frontend and backend modules.
  • Enforced strict clean-code guidelines, capping method nesting to three layers and extracting shared time-series logic across managers.
  • Covered data integrity and business rules with xUnit, using headless UI testing and sequential collection execution to prevent concurrency conflicts.

Tech Stack

  • C#, .NET, Avalonia UI, XAML
  • ReactiveUI, CommunityToolkit.MVVM, OxyPlot
  • xUnit, Avalonia.Headless.XUnit, CsvHelper
  • Scrum, Jira, Git
VIEW REPOSITORY