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?
Bug fix
What is the current behavior?
PR https://github.com/powsybl/powsybl-open-rao/pull/987 introduced a new way of filtering on contingency before applying an RA that is available after a constraint in a given country. The new behavior made the usage rule be validated against constraints on CNECs linked to that contingency.
However, no check was made as to what state the RA is being applied in. Thus, if applying in one state while having a flow result containting CNECs from other states, the RA can be applied after a contingency it was not meant for.
What is the new behavior (if this is a feature change)?
Now the RA is only available if the state of application corresponds to its contingency.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
PR https://github.com/powsybl/powsybl-open-rao/pull/987 introduced a new way of filtering on contingency before applying an RA that is available after a constraint in a given country. The new behavior made the usage rule be validated against constraints on CNECs linked to that contingency.
However, no check was made as to what state the RA is being applied in. Thus, if applying in one state while having a flow result containting CNECs from other states, the RA can be applied after a contingency it was not meant for.
What is the new behavior (if this is a feature change)? Now the RA is only available if the state of application corresponds to its contingency.