Skip to content

Migration guide v4.9.0

miovd edited this page Jun 27, 2022 · 8 revisions

PlatformConfig changes

  • PlatformConfig::moduleExists and PlatformConfig::getModuleConfig have been deprecated, the PlatformConfig::getOptionalModuleConfig should be used instead.
  • Similary ModuleConfigRepository::moduleExists has been deprecated, please refer to the Optional returned by ModuleConfigRepository::getModuleConfig.
  • PlatformConfig::getConfigDir now returns an Optional<Path> instead of a Path.

IIDM identifiers for CGMES imports: CGMES mRID or CGMES rdf:ID

Starting from 4.9.0 release, IIDM identifiers are equal to CGMES mRIDs (Master Resource Identifiers). Nonetheless, the 4.9.1 release introduced a configuration parameter for CGMES Import, which allows the source for IIDM identifiers to be set to rdf:ID (Resource Description Framework Identifiers). RDF identifiers are built from CGMES mRIDs prefixed with a _ character.

The name of the new parameter is iidm.import.cgmes.source-for-iidm-id. Its possible values are: mRID, rdfID. Case is not relevant in the parameter value.

Below is an example to set IIDM identifiers to rdf:ID:

Properties importParams = new Properties();
importParams.put(CgmesImport.SOURCE_FOR_IIDM_ID, CgmesImport.SOURCE_FOR_IIDM_ID_RDFID);
Network network = Importers.loadNetwork(Path.of("pathToFile"), LocalComputationManager.getDefault(), ImportConfig.load(), importParams);

CGMES Utils

CgmesExportUtil.getTerminalSide(Terminal, Connectable) has been deprecated. Use getTerminalSequenceNumber(Terminal) instead.

Move GL CGMES conversion into core

The CGMES import post-processor allowing GL conversion has been moved into core repository. Your dependency might require to be changed in order to work.

Possible values for import/export parameters

For some importers' and exporters' parameters, the scope of possible values has been defined. For example, in CGMES exporter, the parameter iidm.export.cgmes.profiles can only contain EQ, TP, SSH and SV values. Any other value will throw an exception.

These restrictions have been listed below:

importer/exporter name possible values
CGMES exporter iidm.export.cgmes.profiles EQ TP SSH SV
XML exporter iidm.export.xml.extensions All extensions available in path
XML importer iidm.import.xml.extensions All extensions available in path

Deleted ConversionParameters

The final class ConversionParameters has been deleted. Use Parameter and its new static methods instead.

Throw exception when trying to access component of removed equipment

Trying to access a component (parent, terminal, etc) of a removed equipment used to return null. It now throws an exception.

Migrate to IIDM/XIIDM 1.8

At this release, IIDM has been changed to version 1.8. Consequently, if you are using a XIIDM converter from powsybl-core v4.9.0 and above to write IIDM network files in version 1.8, you should use a XIIDM converter from powsybl-core v4.9.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.8 evolutions.

These new features and changes include:

Clone this wiki locally