Skip to content

[BUG] Heat-pump balance slacks (phss, phps2) are free in opf_version 1/3 — heat demand can be served by costless phantom power #695

Description

@joda9

Details

  • variable_slack_heat_pump_storage (→ phss, phps2, both ≥ 0, no upper bound) is
    created for all opf_versions (src/prob/opf_bf.jl).
  • The heat-pump balance holds in all versions (src/core/constraint.jl):
    cop·(php + phps2) == pd + phss − phs.
  • The penalty term 1e4·Σ(phss + phps2) exists only in the objectives of version 2 and 4
    (objective_min_losses_slacks, ..._OG). The version 1/3 objectives
    (objective_min_line_loading_max, ..._OG) contain no term for them.

Consequence

In opf_version 1/3 (1 is the default), phps2/phss are free degrees of freedom: the optimizer
sets php = 0 (heat pump off — less load means fewer losses and lower loading, so this is
optimal) and "serves" the entire heat demand via phps2 — phantom electrical power that never
appears in any power balance. The returned "optimized" heat-pump schedule is thermally
meaningless while looking electrically plausible.

Intended semantics / fix

These slacks are a data-consistency valve (heat demand exceeding heat pump + storage
capability), not a grid-restriction slack — the risk they guard against is independent of the
opf_version. Fix accordingly:

  1. Penalize phss/phps2 very expensively in all four objectives (big-M style, like the
    existing 1e4 in v2/4), so they are used only when physically unavoidable.
  2. Emit a warning whenever the valve is used beyond numerical tolerance (heat pump, time
    step, missing energy) — silent absorption is explicitly unwanted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: opfOptimal power flow / Julia side (eDisGo_OPF.jl, powermodels_io)bugcorrectnessSilently produces wrong numeric results (no crash) — high-value to fixpriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions