Skip to content

Migration guide v3.3.0

MioRtia edited this page Feb 25, 2020 · 26 revisions

Migrate to IIDM/XIIDM 1.2

At this release, IIDM has been changed to version 1.2. Consequently, if you are using a XIIDM converter from powsybl-core v3.2.0 and above to write IIDM network files in version 1.2, you should use a XIIDM converter from powsybl-core v3.2.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.1"

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

... // do something
ExportOptions options = new ExportOptions().setVersion("1.1");
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.

The new features of IIDM/XIIDM 1.1 are:

Regulation for ShuntCompensator

Shunt compensators can now be regulated. New attributes (regulation (boolean), targetV (double), targetDeadband (double) and regulatingTerminal (Terminal)) have been added to ShuntCompensator and can be set and accessed. However, to serialize or deserialize a shunt compensator with any of these attributes with a non-default value, IIDM-XML version 1.1 must be used. Otherwise, the serialization and deserialization will fail.

To know more about these attributes and their default values, go to the documentation page of ShuntCompensator.

targetDeadband attribute in RatioTapChanger and PhaseTapChanger

The attribute targetDeadband in RatioTapChanger and PhaseTapChanger is now required if RatioTapChanger.regulating is set to true or PhaseTapChanger.regulationMode is not set to FIXED_TAP.

If targetDeadband is not defined in these cases, an exception will be thrown. Hence, add the line:

tapChangerAdder.setTargetDeadband(0.0);

to keep the same behavior as before. Of course, you can also add another value if it is more appropriate to your use case. At any rate, in the cases described above, targetDeadband should not be Double.NaN.

Clone this wiki locally