Skip to content

add init_pq option for PandaModels opf warm starts#2985

Merged
vogt31337 merged 6 commits into
e2nIEE:developfrom
jerelang:pandamodels_init_p_q
Jul 4, 2026
Merged

add init_pq option for PandaModels opf warm starts#2985
vogt31337 merged 6 commits into
e2nIEE:developfrom
jerelang:pandamodels_init_p_q

Conversation

@jerelang

Copy link
Copy Markdown
Contributor
  • PandaModels opf warm starts were only directly supported for voltage angle and magnitude, for active/reactive power warm starts creating the callback file was necessary
  • adds optional init_pq parameter to the PandaModels opf runpm wrappers for active/reactive power starts
  • when init_pq="results", adds pg_start and qg_start values to the PowerModels generator data from the net result tables
  • also removes the unused init="flat" option from the PandaModels opf _add_opf_options calls

@codecov

codecov Bot commented Apr 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.75610% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.29%. Comparing base (0c6a1f0) to head (c348b1a).

Files with missing lines Patch % Lines
pandapower/converter/pandamodels/to_pm.py 13.33% 26 Missing ⚠️
pandapower/runpm.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2985      +/-   ##
===========================================
- Coverage    72.34%   72.29%   -0.05%     
===========================================
  Files          353      353              
  Lines        38828    38856      +28     
===========================================
+ Hits         28089    28091       +2     
- Misses       10739    10765      +26     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

vogt31337
vogt31337 previously approved these changes May 5, 2026
@vogt31337

Copy link
Copy Markdown
Contributor

@jerelang , thanks for the PR. Can you add a line to the changelog? And can you change the tests to use np.isclose for float comparison? Thanks!

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

Comment thread pandapower/test/opf/test_pandamodels_init_pq.py Outdated
@vogt31337 vogt31337 merged commit 02815ea into e2nIEE:develop Jul 4, 2026
24 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants