powsybl-core
powsybl-core copied to clipboard
Serialization of Network modifications
-
Do you want to request a feature or report a bug? Feature
-
What is the current behavior?
Network modifications are currently not serializable. It is also not possible to store all the modifications applied to a specific network component.
- What is the expected behavior?
A NetworkModificationData
(? name to be defined) should be defined for each network modification and contain all necessary parameters to re-create the network modification, not to different from a form. Additionally, a method should exist to do that in the object (toModification()
?).
All the parameters must be in a serializable form i.e. "flat" to allow the NetworkModificationData
to be serializable in JSON.
Two possibilities for NetworkModification
that can currently have different "flat" descriptions (e.g. CreateFeederBay
):
- several
NetworkModificationData
can call the sameNetworkModification
- only one
NetworkModificationData
byNetworkModification
(max.): an intermediaryNetworkModification
must be created for each one
The serialization of NetworkModificationData
should be versionable: some of them depends directly of IIDM version.
This mechanism will allow to store network modifications and re-apply them.
NB1 It would mean that the decision to store or serialize a network modification will depend on how the user is creating their network modification. If they do not use NetworkModificationData
, serialization cannot be used.
NB2 It will also mean adaptation of pypowsybl.
- What is the motivation / use case for changing the behavior?
We might have network modifications applied on multi platforms: it is useful to be able to relay them easily.
-
Please tell us about your environment:
- PowSyBl Version: 4.11.0-SNAPSHOT