powsybl / powsybl-core

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

Make Adder code more reusable when nesting the creation of network objects. #3143

Open bc-rte opened 2 weeks ago

bc-rte commented 2 weeks ago

Describe the current behavior

The usual Adder logic can only be used when the parent object is created.

Currently, there are adders created from adders, but their implementation is not standardized (e.g. ReactiveCapabilityCurve's Points). Therefore, reusing their validation code somewhere else isn't easy.

Describe the expected behavior

Code to add a specific object should be usable when that adder can be summoned at different places. For instance, adding a CurrentLimit to a line should be doable from a created Line, but also from a LineAdder while creating the line.

The offered mechanism described in the picture linked is just one possible way to implement this.

Describe the motivation

No response

Extra Information

adder-system-issue-powsybl