-
Notifications
You must be signed in to change notification settings - Fork 43
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
[WIP] Add a check on minQ <= maxQ #3314
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sophie Frasnedo <[email protected]>
|
Yes this is a breaking change as you won't be able to load old files without any exception. You can add this kind of change BUT only in a new version of IIDM and keeping old behaviour (do nothing) for other IIDM versions. |
if (minQ > maxQ) { | ||
throw new IllegalStateException("minQ should be inferior or equal to maxQ"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a related TODO written in 2017 (to plan it for IIDM v1.1!!) in the corresponding adder, and a @Disabled
in a unit test in AbstractReactiveCapabilityCurveTest. Could you remove them?
This should be only activated for next IIDM version. There should be a check in the importer based on the IIDM version to flip or not.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Quality
Does this PR introduce a new Powsybl Action implying to be implemented in simulators or pypowsybl?
What is the current behavior?
There is no check to ensure minQ <= maxQ in a ReactiveCapabilityCurve Point.
What is the new behavior (if this is a feature change)?
A check is added to ensure minQ <= maxQ in a ReactiveCapabilityCurve Point.
An excpetion is thrown when minQ > maxQ.
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: