powsybl / powsybl-open-rao

A toolbox based on powsybl framework dedicated to power systems coordinated capacity calculation and security analysis projects
Mozilla Public License 2.0
15 stars 6 forks source link

Unify onConstraint usage rules in API #1025

Closed bqth29 closed 4 months ago

bqth29 commented 4 months ago

Please check if the PR fulfills these requirements

Does this PR already have an issue describing the problem? Fixes #991

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) The OnAngleConstraint, OnFlowConstraint and OnVoltageConstraint usage rules (and their respective adders) have been removed and replaced by a single OnConstraint usage rule that acts as a generified version of these 3 previous usage rules.

JSON CRAC verison is now 2.4. For JSON CRAC files with version <= 2.3, "onAngleConstraintUsageRules", "onFlowConstraintUsageRules" and "onVoltageConstraintUsageRules" are still supported by the CRAC deserializer but will be imported as OnConstraint usage rules in the Java API.