Skip to content
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

[CSA] [Import] Reorder usage rules definition #972

Merged
merged 10 commits into from
Apr 25, 2024

Conversation

bqth29
Copy link
Collaborator

@bqth29 bqth29 commented Apr 17, 2024

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)

What is the new behavior (if this is a feature change)?

Usage rules are created by decreasing order or restriction:

  1. first, the OnConstraint usage rules are created
  2. then, if the RA is linked to no AE, OnContingencyState usage rules are created
  3. finally, if the RA is linked to no AE and no CO, the OnInstant usage rules are created

If some AEs have the isCombinableWithRemedialAction set to true, OnConstraint usage rules can be created too. The reason for this is to avoid undesired behaviors of a TSO defining an AE combinable with remedial actions that would make the RA of another TSO less available than what is was designed for (ex: onFlowConstraint instead of onInstant)

If a RA is linked to contingencies and assessed elements (implicitly or explicitly), OnConstraint usage rules are created only for the CNECs that are defined for these very contingencies

bqth29 added 5 commits April 16, 2024 16:08
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/CsaProfileRemedialActionsCreator.java
Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
@bqth29 bqth29 requested review from benrejebmoh and phiedw April 17, 2024 13:48
@bqth29 bqth29 added bug Something isn't working PR: waiting-for-review This PR is waiting to be reviewed cleaning This issue or pull request only concerns improving the overall state of the code labels Apr 18, 2024
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/CsaProfileRemedialActionsCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/ElementaryActionsHelper.java
@bqth29 bqth29 requested a review from benrejebmoh April 25, 2024 11:21
@benrejebmoh benrejebmoh merged commit 9f7ea35 into main Apr 25, 2024
9 checks passed
@benrejebmoh benrejebmoh deleted the csa/reorder_usage_rules_definition branch April 25, 2024 14:14
MartinBelthle pushed a commit that referenced this pull request May 28, 2024
* Add usage rules by constraining order

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>

* Unit tests for usage method helpers

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>

* Remove useless field in query

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>

* Add comprehensive tests with CSA profiles

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>

* Update after comments

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>

---------

Signed-off-by: Thomas Bouquet <thomas.bouquet@rte-france.com>
Signed-off-by: belthlemar <martin.belthle@rte-france.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cleaning This issue or pull request only concerns improving the overall state of the code PR: waiting-for-review This PR is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants