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

Deprecate creation of new LoadingLimits from Branch and FlowsLimitsHolder (should be done from OperationalLimitsGroup) #3212

Open
rcourtier opened this issue Nov 14, 2024 · 0 comments

Comments

@rcourtier
Copy link
Member

Describe the current behavior

It is currently possible to create a new current limits (or an active or apparent power limits) directly from the branch or from the flowslimitsholder itself. This is not a good practice as it conceals the operations performed on the OperationalLimitsGroup: its potential creation and/or its potential setting as selected.

Describe the expected behavior

From the Branch/FlowsLimitsHolder, it should be possible to manipulate easily OperationalLimitsGroup (and not LoadingLimits).
From the OperationalLimitsGroup, it should be possible to manipulate easily LoadingLimits.

That implies:

  • The creation of new LoadingLimits from the Branch/FlowsLimitsHolder should be deprecated.
  • Some methods overloads currently exist at Branch/FlowsLimitsHolder level but do not exist at OperationalLimitsGroup level (newCurrentLimits(CurrentLimits limits)...). They should be available there too.
  • Some methods could be added to facilitate the creation of an OperationalLimitsGroup like: getOrCreateSelectedOperationalLimitsGroup(String limitsGroupId), that would:
    • get OperationalLimitsGroup with limitsGroupId if it already exists
    • create it if it doesn't exist
    • in all cases set it as active
      (note: this is what is currently being done in FlowsLimitsHolder.newCurrentLimits with a default limitsGroupId)

Describe the motivation

Generic limits processing on Branch/FlowsLimitsHolder is not possible as depending on the identifiable, one would have to call 3 different methods (getCurrentLimits, getCurrentLimits1, getCurrentLimits2 // newCurrentLimits, newCurrentLimits1, newCurrentLimits2...).
By having this intermediate step where one can easily (in one method call) get or create a selected OperationalLimitsGroup, processing could then be factored (just getCurrentLimits // newCurrentLimits...).

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
Status: TODO
Development

No branches or pull requests

1 participant