-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow to use checkLimits methods with LimitReductions #3056
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EtienneLt
force-pushed
the
compute-limit-reductions
branch
4 times, most recently
from
June 5, 2024 06:52
dd8d4bf
to
e5fcd63
Compare
olperr1
requested changes
Jun 10, 2024
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/util/LimitViolationUtils.java
Outdated
Show resolved
Hide resolved
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/util/LimitViolationUtils.java
Outdated
Show resolved
Hide resolved
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/util/PermanentLimitOverload.java
Outdated
Show resolved
Hide resolved
...ity-analysis-api/src/main/java/com/powsybl/security/limitreduction/SimpleLimitsComputer.java
Outdated
Show resolved
Hide resolved
...ity-analysis-api/src/main/java/com/powsybl/security/limitreduction/SimpleLimitsComputer.java
Outdated
Show resolved
Hide resolved
...s-api/src/main/java/com/powsybl/security/limitreduction/computation/SimpleLimitsReducer.java
Show resolved
Hide resolved
...is/security-analysis-api/src/test/java/com/powsybl/security/LimitViolationDetectionTest.java
Outdated
Show resolved
Hide resolved
...curity-analysis-default/src/main/java/com/powsybl/security/impl/DefaultSecurityAnalysis.java
Outdated
Show resolved
Hide resolved
...curity-analysis-default/src/main/java/com/powsybl/security/impl/DefaultSecurityAnalysis.java
Outdated
Show resolved
Hide resolved
...curity-analysis-default/src/main/java/com/powsybl/security/impl/DefaultSecurityAnalysis.java
Outdated
Show resolved
Hide resolved
EtienneLt
force-pushed
the
compute-limit-reductions
branch
from
June 10, 2024 13:20
fc6b232
to
5ed113d
Compare
olperr1
requested changes
Jun 11, 2024
...is/security-analysis-api/src/test/java/com/powsybl/security/LimitViolationDetectionTest.java
Outdated
Show resolved
Hide resolved
...ity-analysis-api/src/main/java/com/powsybl/security/limitreduction/SimpleLimitsComputer.java
Outdated
Show resolved
Hide resolved
olperr1
requested changes
Jun 11, 2024
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/util/LimitViolationUtils.java
Show resolved
Hide resolved
Signed-off-by: Florian Dupuy <florian.dupuy@rte-france.com>
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
EtienneLt
force-pushed
the
compute-limit-reductions
branch
from
June 12, 2024 06:32
7bddf21
to
67fb0af
Compare
olperr1
changed the title
Compute limit reductions
Allow to use checkLimits methods with LimitReductions
Jun 12, 2024
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
olperr1
approved these changes
Jun 19, 2024
Quality Gate passedIssues Measures |
geofjamg
pushed a commit
that referenced
this pull request
Sep 18, 2024
* Move LimitViolationDetector interface in detectors dedicated package * Replace limitReductionValue by limitsComputer to detect violations * Restore old methods to prevent breaking changes * Optimize SimpleLimitsComputer + add a convenient method in Security Signed-off-by: Etienne LESOT <etienne.lesot@rte-france.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the new behavior (if this is a feature change)?
Add several methods in
LimitViolationUtils
andSecurity
taking aLimitsComputer
as parameter. This allows to use them with the LimitReduction API:LimitViolationUtils.checkTemporaryLimits(…)
;LimitViolationUtils.checkPermanentLimit(…)
;Security.checkLimits(…)
;Security.checkLimitsDc(…)
.Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information:
To detect limit violations using some
LimitReduction
s, you need to call one of these methods with an instace ofDefaultLimitReductionsApplier
, which is aLimitsComputer
handling theLimitReduction
s.For instance, if you want to call
Security.checkLimits(…)
with the 2LimitReductions
,limitReduction1
andlimitReduction2
, you can use the following code:By default, the reductions which will be applied are the ones defined for the pre-contingency state.
If you want to compute the violations for the state after a specific contingency, you will have to indicate it
For instance, if after the pre-contingency state, you want to compute the post-contingency state for
contingency1
, you can use the following code:Note that you don't have to recreate a new
DefaultLimitReductionsApplier
. I fact, it is more performant to reuse the same object. ThisLimitsComputer
's implementation manages an internal cache and it won't recompute reduced limits if it detects that the reductions applicable for a network element are the same as for the previously studied contingency.