Skip to content

Migration guide v2.3.0

Florian Dupuy edited this page Sep 30, 2021 · 1 revision

Migrate powsybl-core version to v4.3.1

In this release, powsybl-core version has been updated from version 4.2.0 to 4.3.1. This does not create any migration issue with powsybl-line-diagram, but if you are also using powsybl-core directly, please refer to powsybl-core migration guide to fix any issue due to that migration.

Automatic discovery of component libraries

Component libraries are now defined through their own class with the annotation @AutoService(ComponentLibrary.class) to enable automatic discovery of all the available component libraries. Therefore, please use new ConvergenceComponentLibrary() instead of new ResourcesComponentLibrary("/ConvergenceLibrary"). We also recommend you to do the same for your own component libraries.

CCS and SVG

Previously one had to choose between CSS content inserted in the SVG or CSS files referenced in the SVG with LayoutParameters.setCssInternal(isCssInternal). It's now possible to have neither of those, which is useful if the CSS is already included beforehand in the html file. Hence, LayoutParameters::setCssInternal has been replaced by LayoutParameters::setCssLocation, which expects one the 3 values of the CssLocation enum: INSERTED_IN_SVG, EXTERNAL_IMPORTED, EXTERNAL_NO_IMPORT.

Winding transformer component type

  • The component type for two-windings transformer leg nodes (class Feeder2WTLegNode) has been changed from LINE to TWO_WINDINGS_TRANSFORMER_LEG.
  • Similarly, the component type for three-windings transformer leg nodes (class Feeder3WTLegNode) has been changed from LINE to THREE_WINDINGS_TRANSFORMER_LEG.

Two notes, to clarify the winding transformer legs:

  • For two-windings transformers, the FeederNode is either:

    • a Feeder2WTLegNode if both side of the transformer are displayed in the diagram (meaning that the transformer is drawn on a snakeline through a Middle2WTNode),
    • a Feeder2WTNode if the other side is not displayed in the diagram (then the transformer is drawn on that FeederNode).
  • On the opposite, for three-windings transformers, the FeederNode in a voltage level is always a Feeder3WTLegNode, but representing either:

    • the leg node of the current voltage level, if the other voltage levels are displayed in the diagram (meaning that the transformer is drawn on a snakeline).
    • the leg node of one of the two other voltage levels, if that voltage level is not displayed in the diagram (meaning that the transformer is drawn within the voltage level),