Skip to content

Migration guide v6.7.0

Olivier Perrin edited this page Jan 30, 2025 · 7 revisions

Breaking Change Breaking changes for all users

UCTE

New UCTE naming strategy

If you have a custom UCTE naming strategy (i.e. a class implementing com.powsybl.ucte.converter.NamingStrategy), you should implement the following method:

  • void initializeNetwork(Network network);

By default, the "Default" naming strategy is used when exporting a network in UCTE. If you want to use the new naming strategy, you should define the following property in your configuration: - `ucte.export.naming-strategy`: `Counter`

CGMES

Replacing CGMES.switchType property

Any access to the CGMES.switchType property should be replaced with CGMES.originalClass property. For instance:

String cgmesSwitchType = network.getSwitch("someSwitchUUID").getProperty("CGMES.switchType");

should be replaced by:

String cgmesSwitchType = network.getSwitch("someSwitchUUID").getProperty(Conversion.PROPERTY_CGMES_ORIGINAL_CLASS);

Similarly, any network saved to a serialized IIDM file should be updated by replacing all occurences of CGMES.switchType with CGMES.originalClass property, in case the network needs to be exported to CGMES and the original CGMES switch types are needed. You could do this with following code:

for (Switch s : network.getSwitches()) {
    String cgmesSwitchType = s.getProperty("CGMES.switchType");
    if (cgmesSwitchType != null) {
        s.setProperty("CGMES.originalClass", cgmesSwitchType);
    }
}

Refactor grouped queries

Methods removed from CgmesModel:

  • Map<String, PropertyBags> groupedTransformerEnds()
  • List<String> ratioTapChangerListForPowerTransformer(String powerTransformerId)
  • PropertyBags ratioTapChangerTable(String tableId)
  • List<String> phaseTapChangerListForPowerTransformer(String powerTransformerId)
  • PropertyBags phaseTapChangerTable(String tableId)
  • PropertyBags nonlinearShuntCompensatorPoints(String shuntId)

Have been replaced by these methodes in Context:

  • public PropertyBags transformerEnds(String transformerId)
  • public PropertyBags ratioTapChangers(String transformerId)
  • public PropertyBags ratioTapChangerTablePoints(String tableId)
  • public PropertyBags phaseTapChangers(String transformerId)
  • public PropertyBags phaseTapChangerTablePoints(String tableId)
  • public PropertyBags nonlinearShuntCompensatorPoints(String shuntId)

Also, in CgmesModel, the following methods have been renamed for more consistency:

  • ratioTapChangerTablesPoints() into ratioTapChangerTablePoints()
  • phaseTapChangerTablesPoints() into phaseTapChangerTablePoints()

Unit tests refactoring

The following methods of CgmesConformity1ModifiedCatalog, were removed:

  • miniNodeBreakerLoadBreakSwitch()
  • miniNodeBreakerProtectedSwitch()
  • miniNodeBreakerInternalLineZ0()
  • miniNodeBreakerTerminalDisconnected()
  • microGridBaseCaseNLSwitchWithoutName()
  • microGridBaseCaseNLSwitchTypePreserved()
  • miniGridNodeBreakerSwitchTypePreserved()

They were used for unit testing, but they relied on big CGMES files ; this slowed the tests execution. If you still need to use them, you can retrieve the methods at this URL and the corresponding CGMES files in this directory.


Custom IIDM Impl Notice for custom IIDM implementations maintainers

Initialize an adder with an existing object

Custom IIDM implementation maintainers should add the following methods:

  • in their Network implementations:
    • LineAdder newLine(Line line).
  • in their Substation implementations:
    • TwoWindingsTransformerAdder newTwoWindingsTransformer(TwoWindingsTransformer twoWindingsTransformer).

Test Data Change Changes in the test data

Clone this wiki locally