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] Multiple TATLs and 3 curatives instants #958

Merged
merged 41 commits into from
May 24, 2024

Conversation

bqth29
Copy link
Collaborator

@bqth29 bqth29 commented Apr 4, 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 kind of change does this PR introduce?

  • Automatic creation of three curative instants when importing CRAC from CSA Profiles (respectively named curative 1, curative 2 and curative 3)
  • Curative remedial actions are created for all three curative instants
  • New FlowCNEC instant definition based on all the TATLs (see docs for more details)
  • Extension of CSA CRAC creation parameters to account the new TATL-instant association algorithm (application time of each curative batch, choice for each TSO whether to use the PATL in the final state)
{
  "crac-factory" : "CracImplFactory",
  "extensions" : {
    "CsaCracCreatorParameters" : {
      "capacity-calculation-region-eic-code": "10Y1001C--00095L",
      "sps-max-time-to-implement-threshold-in-seconds": 0,
      "use-patl-in-final-state": {
        "REE": false,
        "REN": true,
        "RTE": true
      },
      "cra-application-window": {
        "curative 1": 300,
        "curative 2": 600,
        "curative 3": 1200
      }
    }
  }
}

What is the current behavior?

  • Only one curative instant
  • Instant of FlowCNEC is simply determined by limit type (PATL / TATL) and duration:
    • 0 = curative
    • ]0, 60] = outage
    • ]60, 900] = auto
    • 900+ = curative

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

  • Three curative instants (curative remedial actions are systematically created for all three)
  • Instant of FlowCNEC is determined by all available limits (see docs) thanks to a helper class FlowCnecInstantHelper
  • One FlowCNEC is created for each side (a single FlowCNEC created from CSA profiles can no longer have thresholds on both sides)

This behavior is to account for interconnection lines that may have different limits on both sides and thus thresholds of different instants

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

  • Yes
  • No

Other information:
Small refactoring of the FlowCnecCreator class.

@pet-mit pet-mit added the feature New feature or request label Apr 4, 2024
bqth29 added 17 commits April 4, 2024 17:05
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
# 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/parameters/CsaCracCreationParameters.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/parameters/JsonCsaCracCreationParameters.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/parameters/JsonCsaCracCreationParametersTest.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/PstRangeActionCreationTest.java
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
@bqth29 bqth29 marked this pull request as ready for review April 10, 2024 13:32
@bqth29 bqth29 requested review from phiedw and pet-mit April 10, 2024 13:43
bqth29 added 3 commits April 10, 2024 18:24
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
@bqth29 bqth29 added the PR: waiting-for-review This PR is waiting to be reviewed label Apr 11, 2024
bqth29 added 3 commits April 11, 2024 16:30
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/CsaProfileSsiTest.java
bqth29 added 6 commits April 12, 2024 11:01
Signed-off-by: Thomas Bouquet <[email protected]>
Signed-off-by: Thomas Bouquet <[email protected]>
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/CsaProfileRemedialActionsCreator.java
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/CsaProfileCnecCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/FlowCnecCreator.java
#	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 <[email protected]>
jipea
jipea previously approved these changes Apr 25, 2024
@MartinBelthle
Copy link
Collaborator

miam les conflits

bqth29 added 2 commits April 26, 2024 09:56
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/CsaProfileCracCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/CsaProfileCnecCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/FlowCnecCreator.java
#	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/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/AngleCnecCreationTest.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/FlowCnecCreationTest.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/VoltageCnecCreationTest.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/GroupRemedialActionTest.java
#	data/crac-creation/crac-creator-csa-profiles/src/test/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/remedialaction/RemedialActionCreationTest.java
Signed-off-by: Thomas Bouquet <[email protected]>
bqth29 added 3 commits April 29, 2024 16:50
# Conflicts:
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/CsaProfileCracCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/CsaProfileCnecCreator.java
#	data/crac-creation/crac-creator-csa-profiles/src/main/java/com/powsybl/openrao/data/craccreation/creator/csaprofile/craccreator/cnec/FlowCnecCreator.java
#	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 <[email protected]>
@bqth29 bqth29 changed the title Multiple TATLs and 3 curatives instants [CSA] Multiple TATLs and 3 curatives instants May 15, 2024
Copy link
Collaborator

@phiedw phiedw left a comment

Choose a reason for hiding this comment

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

misclicked last review

@phiedw phiedw added PR: waiting-for-correction This PR is waiting to be corrected by its author and removed PR: waiting-for-review This PR is waiting to be reviewed labels May 23, 2024
@bqth29 bqth29 requested a review from phiedw May 24, 2024 07:33
@bqth29 bqth29 merged commit 5019409 into main May 24, 2024
9 checks passed
@phiedw phiedw deleted the feature/multiple_tatls_with_instants branch May 24, 2024 11:56
MartinBelthle pushed a commit that referenced this pull request May 28, 2024
* Create CSA CRAC with 3 curatives instants

Signed-off-by: Thomas Bouquet <[email protected]>

* Fix instants check for onConstraints URs

Signed-off-by: Thomas Bouquet <[email protected]>

* Update CRAC creation parameters

Signed-off-by: Thomas Bouquet <[email protected]>

* Create FlowCnecInstantHelper + check CRAC creation parameters

Signed-off-by: Thomas Bouquet <[email protected]>

* Association algorithm draft

Signed-off-by: Thomas Bouquet <[email protected]>

* Update with new main commits

Signed-off-by: Thomas Bouquet <[email protected]>

* Tests for association map

Signed-off-by: Thomas Bouquet <[email protected]>

* Add TODOs

Signed-off-by: Thomas Bouquet <[email protected]>

* Handle limits durations not in map

Signed-off-by: Thomas Bouquet <[email protected]>

* Create on CNEC per side

Signed-off-by: Thomas Bouquet <[email protected]>

* New FlowCNEC instant association

Signed-off-by: Thomas Bouquet <[email protected]>

* Log in context when branch has not TATL but PATL should not be used

Signed-off-by: Thomas Bouquet <[email protected]>

* Remove useless comment

Signed-off-by: Thomas Bouquet <[email protected]>

* Refactor FlowCnecCreator

Signed-off-by: Thomas Bouquet <[email protected]>

* Doc for TATLs

Signed-off-by: Thomas Bouquet <[email protected]>

* Doc for TATLs (more detailed)

Signed-off-by: Thomas Bouquet <[email protected]>

* Update doc for import

Signed-off-by: Thomas Bouquet <[email protected]>

* Better TATL graphs

Signed-off-by: Thomas Bouquet <[email protected]>

* Better no TATL 600 graph

Signed-off-by: Thomas Bouquet <[email protected]>

* TATL 600

Signed-off-by: Thomas Bouquet <[email protected]>

* Fix import bug on groups

Signed-off-by: Thomas Bouquet <[email protected]>

* Fix after merge

Signed-off-by: Thomas Bouquet <[email protected]>

* Merge main

Signed-off-by: Thomas Bouquet <[email protected]>

* Merge main

Signed-off-by: Thomas Bouquet <[email protected]>

* Fix after comments

Signed-off-by: Thomas Bouquet <[email protected]>

---------

Signed-off-by: Thomas Bouquet <[email protected]>
Co-authored-by: phiedw <[email protected]>
Signed-off-by: belthlemar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request PR: waiting-for-correction This PR is waiting to be corrected by its author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants