Skip to content

Save and restore only active power changes in Fast DC Security Analysis #1205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 11, 2025

Conversation

p-arvy
Copy link
Member

@p-arvy p-arvy commented Mar 18, 2025

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?

No, but the development is based on the collaborative work of #1169, aiming to improve the performance of the fast DC SA.

What kind of change does this PR introduce?

In fast DC SA, the application of LfContingency in cases where a load/generator is lost, preceding the calculation of the right-hand side override (before computing post-contingency states with WoodburyEngine) has been modified for better performance.

What is the current behavior?

In the current state of fast DC SA, when a contingency causes the loss of a generator/load, the associated LfContingency is applied before computing the right-hand side override (preceding the post-contingency state calculations).

To avoid disrupting subsequent computations, a NetworkState is saved before the application and restored afterward. This is done for each contingency. On an IGM FR with approximately 600 generator contingencies, this accounts for around 30% of the computation time.
24-per-cent-save
6-per-cent-restore

What is the new behavior (if this is a feature change)?
Only DC values related to generators, loads, and HVDCs need to be modified, and therefore saved and restored. The saving/restoring of a NetworkState is replaced by saving/restoring BusDcStates. The application of the LfContingency is also modified to change only these values.

Comparing against the same case, the post-contingency state computation time is reduced of ~20%.
comparison-before-after-bus-dc-states-only

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@p-arvy
Copy link
Member Author

p-arvy commented Mar 18, 2025

This PR should be merged only after #1192.

@p-arvy p-arvy changed the title Save and restore DC Bus States in Fast DC Security Analysis [WIP] Save and restore DC Bus States in Fast DC Security Analysis Mar 28, 2025
@p-arvy p-arvy changed the title [WIP] Save and restore DC Bus States in Fast DC Security Analysis Save and restore only active power changes in Fast DC Security Analysis Apr 4, 2025
@p-arvy p-arvy requested a review from Hadrien-Godard April 4, 2025 10:05
@p-arvy p-arvy self-assigned this Apr 4, 2025
Base automatically changed from connectivity-loss-in-connectivity-break-analysis to main April 7, 2025 10:17
p-arvy and others added 16 commits April 7, 2025 13:07
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: Hadrien <[email protected]>
Signed-off-by: Hadrien <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
Signed-off-by: p-arvy <[email protected]>
@p-arvy p-arvy force-pushed the save-and-restore-dc-states-in-fast-dc-sa branch from 7dcc81f to 33f85f8 Compare April 7, 2025 12:24
Hadrien-Godard
Hadrien-Godard previously approved these changes Apr 8, 2025
/**
* Process the power shifts due to the loss of loads, generators, and HVDCs.
* @param balanceType the property defining how to manage active distribution.
* @param updateAcParameters a boolean to indicate if voltage/reactive dependent parameters should be updated or not.
Copy link
Collaborator

@vidaldid-rte vidaldid-rte Apr 10, 2025

Choose a reason for hiding this comment

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

The name updateAcParameters is confusing. Parameters usually refers to parameters that alter the simulator behaviour.
Why not updateAcQuantities ?

(the comment applies to all similar uses of the term parameter in this file (in comments for example)

Copy link
Member

Choose a reason for hiding this comment

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

I agree

Copy link
Member Author

Choose a reason for hiding this comment

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

Applied. Thanks for the suggestion.

@vidaldid-rte vidaldid-rte merged commit 7abede4 into main Apr 11, 2025
8 checks passed
@vidaldid-rte vidaldid-rte deleted the save-and-restore-dc-states-in-fast-dc-sa branch April 11, 2025 13:11
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.

3 participants