[BUG] SOC→NC warm-start condition is inverted, and NC results are adopted without checking the termination status

オープン
#696 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
backend, databases

調査の方向性

Start with eDisGo_OPF.jl/Main.jl and trace the soc_tight, warm_start, and method="nc" paths in pm_optimize. Check how the solver termination and primal status are represented before update_data! adopts a result. Done means non-tight SOC results trigger NC rescue, and unsuccessful NC runs in either path fall back to the SOC solution with a loud warning.

索引モデルが issue の本文から書いたものです。

説明

area: opf bug correctness priority: high

Intended behaviour (two-stage solve)

Stage 1: SOC relaxation (Gurobi). If the SOC solution is tight, it is already AC-feasible —
done, no NC solve needed. If it is not tight, the relaxed solution is physically infeasible
and stage 2 should rescue feasibility: solve the exact non-convex model (Ipopt) warm-started
from the SOC solution. (This is also what the SOCBFPowerModelEdisgo docstring describes.)

Actual behaviour (eDisGo_OPF.jl/Main.jl)

  1. Condition inverted: if soc_tight & warm_start — the NC polish runs only in the tight
    case (where it is unnecessary), and is skipped exactly when the SOC solution is not tight.
    A non-tight relaxed solution is returned to eDisGo as the result (only a violations JSON is
    written to opf_solutions/).
  2. No termination-status check on the NC result: result_nc_ws is adopted unconditionally
    via update_data!. If Ipopt ends LOCALLY_INFEASIBLE/ITERATION_LIMIT, a worse-than-SOC
    solution is silently returned. The same unconditional adoption exists in the method="nc"
    cold-start path.
  3. Rescue gated behind an opt-in flag: warm_start defaults to False in pm_optimize,
    so out of the box a non-tight solution is never rescued.

Fix

  • Run the NC rescue when !soc_tight (regardless of the warm_start flag); skip the NC solve
    when the SOC solution is tight.
  • Check the NC termination/primal status: on success adopt the NC solution, otherwise fall back
    to the SOC solution and log a loud warning. Apply the same status check to method="nc".
主要言語
Python
スター
48
フォーク
22
平均マージ
1日 7時間
マージ済み PR(30日)
38

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openego/eDisGo のほかの issue

openego/eDisGo の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。