Skip to content

Conversation

@SylvestreSakti
Copy link
Member

@SylvestreSakti SylvestreSakti commented Oct 21, 2025

This PR cannot be merged before #1286 (Change of parameter name in core connectedComponentMode -> componentMode)

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
#1279 (powsybl-open-loadflow)
powsybl/powsybl-core#3577 (powsybl-core)

What kind of change does this PR introduce?
This PR support the new introduced mode componentMode=MAIN_SYNCHRONOUS

What is the current behavior?
Only MAIN_CONNECTED and ALL_CONNECTED are supported. But for a main connected component that has multiple synchronous components, it is not possible to compute only the main synchronous component.

What is the new behavior (if this is a feature change)?
MAIN_CONNECTED, ALL_CONNECTED and MAIN_SYNCHRONOUS are supported

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

cphili and others added 3 commits October 8, 2025 11:36
Signed-off-by: Clement Philipot <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
@SylvestreSakti SylvestreSakti changed the base branch from main to new_openloadflow_mainsynchronous October 21, 2025 16:33
@alicecaron alicecaron moved this from TODO to In Progress in Release 12/2025 Nov 3, 2025
@alicecaron alicecaron linked an issue Nov 3, 2025 that may be closed by this pull request
@vidaldid-rte vidaldid-rte changed the title [WIP] Run load flow with main synchronous component mode Run load flow with main synchronous component mode Nov 18, 2025
@vidaldid-rte vidaldid-rte marked this pull request as ready for review November 18, 2025 15:27
@vidaldid-rte vidaldid-rte force-pushed the new_openloadflow_mainsynchronous branch from bf25059 to a00e87b Compare November 26, 2025 14:08
Base automatically changed from new_openloadflow_mainsynchronous to ci/core-7.1.0-SNAPSHOT November 26, 2025 14:11
.setBreakers(breakers)
.setPlausibleActivePowerLimit(lfParametersExt.getPlausibleActivePowerLimit())
.setComputeMainConnectedComponentOnly(true)
.setComponentMode(lfParameters.getComponentMode())
Copy link
Collaborator

@vidaldid-rte vidaldid-rte Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you change the behaviour on purpose ?
Per line 404 (in analyze) the DC sensitivity analysis seems to only run analysis on the main synchronous in reality.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is indeed a mistake to be fixed, thanks.

Network network = HvdcNetworkFactory.createVsc();
LoadFlow.Runner loadFlowRunner = new LoadFlow.Runner(new OpenLoadFlowProvider(new DenseMatrixFactory()));
LoadFlowParameters parameters = new LoadFlowParameters();

Copy link
Collaborator

@vidaldid-rte vidaldid-rte Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test would provide more coverage if there was a disconnected component (ALL_COMPONENTS != MAIN_CONNECTED)

assertEquals(4, lfResultMainConnected.getComponentResults().size()); // 4 SCs
assertEquals(1, lfResultMainSynchronous.getComponentResults().size()); // 1 SC

var saResultMainSynchronous = runSecurityAnalysis(network, Collections.emptyList(), createNetworkMonitors(network), lfParametersMainConnected);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to run the test with lfParametersMainConnected although the result is called main Synchronous ?

Also, in addition to checking the result count, can you get at Bus result with a bus name that nelongs to the expected component, to be sure the computation occured on the expected component ?

Copy link
Collaborator

@vidaldid-rte vidaldid-rte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few minor changes (on DC sensi, and on tests).
Will need the RC available, and Sonar and coverage result for final approval.

@github-project-automation github-project-automation bot moved this from In Progress to Waiting for review in Release 12/2025 Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Waiting for review

Development

Successfully merging this pull request may close these issues.

Allow to run a power flow on only the synchronous component

4 participants