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

Temporary limits' same duration policy #3049

Open
olperr1 opened this issue May 31, 2024 · 0 comments
Open

Temporary limits' same duration policy #3049

olperr1 opened this issue May 31, 2024 · 0 comments

Comments

@olperr1
Copy link
Member

olperr1 commented May 31, 2024

Describe the current behavior

When adding a new temporary limit to a LoadingLimits, if another temporary limit has the same acceptable duration, it will be replaced by the new one.

Describe the expected behavior

A new method, LoadingLimitsAdder.useSameDurationPolicy(SameDurationPolicy policy) should be added to allow to chose the behavior to adopt when adding a new temporary limit having the same acceptable duration as another one.

The possible values are:

  • SameDurationPolicy.THROW: throw an exception when multiple temporary limits are detected with the same acceptable duration. This should be the default behavior;
  • SameDurationPolicy.LAST_ADDED: keep the last added temporary limit. This is the legacy behavior;
  • SameDurationPolicy.MIN_VALUE: keep the temporary limit which have the minimum value. When the 2 limits have the same value, the first added is kept (i.e. the limit is "updated" in the adder only if the new value is lower than the previous one).

Describe the motivation

It would be useful to be able to choose the behavior to adopt when adding a new temporary limit having the same acceptable duration as another one.

Motivation for the THROW policy:

Having 2 temporary limits with the same acceptable duration could be considered as a data problem which is hidden by the current behavior, and it could be legit to throw an exception when it is detected.

Motivation for the MIN_VALUE policy:

During CGMES import, before adding a new temporary limit, a test is made to detect if another temporary limit is already declared with the same acceptable duration. The new temporary limit is added only if its value is lower than the existing one, in order to keep the most constraining limit (see OperationalLimitConversion.addTatl(…)).
This behavior could be natively supported by the LoadingLimitsAdder.

Motivation for the LAST_ADDED policy:

The legacy behavior should still be supported.

Extra Information

No response

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

No branches or pull requests

1 participant