Skip to content

Migration guide v4.4.0

Florian Dupuy edited this page Sep 22, 2021 · 6 revisions

Migrate to IIDM/XIIDM 1.6

At this release, IIDM has been changed to version 1.6. Consequently, if you are using a XIIDM converter from powsybl-core v4.4.0 and above to write IIDM network files in version 1.6, you should use a XIIDM converter from powsybl-core v4.4.0 to read them as well without issues.

Please note that it is possible to read and write XIIDM files in previous IIDM-XML versions.

In order to write XIIDM files in previous versions (e.g. the version 1.0), you need to use the following configuration property:

import-export-parameters-default-value:
  iidm.export.xml.version: "1.0"

or use the Java object ExportOptions in your parameters with a suitable set version:

... // do something
ExportOptions options = new ExportOptions().setVersion("1.0");
NetworkXml.write(network, options, path);
... // do something

⚠️ Writing XIIDM files in previous versions will only be possible if the network you want to serialize has no new features or has only new features that can be interpreted in the previous versions.

Reading XIIDM files in previous versions does not require any particular configuration.

For more information about the new features, please read the documentation page on IIDM/IIDM-XML 1.6 evolutions.

These new features and changes include:

Traversers changes

Graph Traverser

The API Traverser::traverse in package com.powsybl.math.graph has changed, as the TraverseResult enum which should be returned has changed. The value TraverseResult.TERMINATE_TRAVERSER has been added to the enum, to allow the feature of stopping the traverser on all paths. As a consequence, for the sake of clarity, the enum TraverseResult.TERMINATE has been renamed to TraverserResult.TERMINATE_PATH.

NodeBreakerView Traverser change

The API VoltageLevel.NodeBreakerView.Traverser::traverse(int, Switch, int) has changed: it now expects a TraverseResult to be returned, instead of a boolean previously. The previous values true (resp. false) should be replaced by TraverseResult.CONTINUE (resp. TraverserResult.TERMINATE_PATH). Similarly to the graph traverser, this new API allows to stop the traverser on all paths, by returning the value TraverseResult.TERMINATE_TRAVERSER.

New NodeBreakerView traverse API to traverse the topology from several vertices

When starting a traverser for several nodes, one had to deal with an encountered array whereas there is already one in each graph traversal. To avoid that, the new API VoltageLevel.NodeBreakerView::traverse(int[] startingNodes, VoltageLevel.NodeBreakerView.Traverser traverser) can now be used. The topology will be traversed starting from each node, in a sequential manner, using the same array for vertices entountered. Therefore, a node encountered while traversing the topology starting from first node will stop the traversing when encountered later while traversing the topology starting from another node.

Clone this wiki locally