powsybl / powsybl-core

A framework to build power system oriented software
https://www.powsybl.org
Mozilla Public License 2.0
122 stars 39 forks source link

Operational limit setters #3060

Closed colinepiloquet closed 2 weeks ago

colinepiloquet commented 3 months ago

Describe the current behavior

There are no setters for TemporaryLimits which means that to modify one value the whole limit must be recreated.

Describe the expected behavior

I think it would we useful to be able to set some of the attributes of the temporary limits, especially the value.

Describe the motivation

It would be useful to correct faulty data without having to store all the temporary limits and recreate the whole limit.

Extra Information

No response

colinepiloquet commented 3 months ago

@annetill, @HugoKulesza, a good first issue.

nao1345678 commented 2 months ago

To correct an already existing limit, we have to make sure the new value fits logically in between the already existing other temporary limits. For instance, if the new value is greather than the next one, shouldn't we change the acceptable duration too ? Or should we change the limits' order ?

colinepiloquet commented 2 months ago

Maybe it's enough to check the other values and if the new limit does not fit logically then the correction would not work ?

olperr1 commented 1 month ago

When a LoadingLimits is created, we only log warnings when the temporary limits' values are not consistent (see ValidationUtil.checkTemporaryLimits(...)). I think that we can adopt the same principle: allow the inconsistent values, but log warnings in that case.