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

Consider sides when applying limitReductions with IdentifiableCriterion #3050

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

olperr1
Copy link
Member

@olperr1 olperr1 commented Jun 3, 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)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When a LimitReduction is defined using an IdentifiableCriterion (to define a reduction on a voltage level for instance), the reduction is applied on each side of the network element if one of its sides verify the criterion.

What is the new behavior (if this is a feature change)?
For IdentifiableCriterion, the reduction is applied only on the side(s) verifying the criterion.

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
@annetill annetill requested a review from flo-dup June 4, 2024 09:06
Comment on lines 20 to 22
* <p>Criterion checking that one of side of the network element belongs to a country defined in a list.</p>
* <p>When <code>filter</code> is called with a non-null <code>side</code>, only the country on this particular side
* is checked. Else, the validation is performed on whichever side.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

"on whichever side" does not reflect what's written in the code.

Suggested change
* <p>Criterion checking that one of side of the network element belongs to a country defined in a list.</p>
* <p>When <code>filter</code> is called with a non-null <code>side</code>, only the country on this particular side
* is checked. Else, the validation is performed on whichever side.</p>
* <p>Criterion checking that one of the sides of the network element belongs to a country defined in a list.</p>
* <p>When {@link #filter(NetworkElement, ThreeSides)}} is called with a non-null <code>side</code>, only the country on this particular side
* is checked.</p>

Copy link
Contributor

Choose a reason for hiding this comment

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

The AtLeast name is a bit unexpected now that there is this sides consideration.

olperr1 added 2 commits June 11, 2024 12:46
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
Copy link

@annetill annetill merged commit a9ed4ac into main Jun 12, 2024
7 checks passed
@annetill annetill deleted the criteria_apply_with_side branch June 12, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants