-
Notifications
You must be signed in to change notification settings - Fork 43
Migration guide v4.0.0
Contingency.setId
method has been removed
Contingency.checkValidity
usage has been replaced by ContingencyList.getValidContingencies
. This method is deprecated and will be removed in a future release.
ContingenciesProvider
usage has been replaced by List<Contingency>
in the PR #1553.
Several methods of the SensitivityAnalysis
class have changed. You must change your code to use the new API, and avoid compilation issues.
Respectively use:
CompletableFuture<SensitivityAnalysisResult> run(Network network,
String workingStateId,
SensitivityFactorsProvider factorsProvider,
List<Contingency> contingencies,
SensitivityAnalysisParameters parameters,
ComputationManager computationManager);
instead of
CompletableFuture<SensitivityAnalysisResult> run(Network network,
String workingStateId,
SensitivityFactorsProvider factorsProvider,
ContingenciesProvider contingenciesProvider,
SensitivityAnalysisParameters parameters,
ComputationManager computationManager);
If you were using EmptyContingenciesProvider
, you can use Collections.emptyList()
instead
At this release, IIDM has been changed to version 1.5. For more information about the new features, please read the documentation page about IIDM/IIDM-XML 1.5 evolutions.
If you are using a custom implementation of IIDM API (different from the one available in powsybl-iidm-impl
), please be sure to update your implementation in order not to throw UnsupportedOperationException
when a new method is used.
If you are using a XIIDM converter from powsybl-core v3.7.0 and above to write IIDM network files in version 1.5, you should use a XIIDM converter from powsybl-core v3.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
Reading XIIDM files in previous versions does not require any particular configuration.
All powsybl-iidm-util
classes have been moved to powsybl-iidm-api
with in same package. As powsybl-iidm-util
depends on powsybl-iidm-api
, the only thing to do for migration is to replace powsybl-iidm-util
dependency by powsybl-iidm-api
if it's not already present in your pom.xml
.
- All powsybl-iidm-api extensions have been moved to powsybl-iidm-extensions in the same package (SlackTerminal and LoadDetail)
- Extensions implementations of powsybl-iidm-extensions have been moved to powsybl-iidm-impl
- Extensions XML serializers of powsybl-iidm-extensions have been moved to powsybl-iidm-xml-converter
The XmlWriterContext::getExtensionsWriter()
has been deprecated and will be removed in a next release. Please replace the usage of this method:
XmlUtil.writeFloat("rdp", xnode.getRdp(), context.getExtensionsWriter());
by
XmlUtil.writeFloat("rdp", xnode.getRdp(), context.getWriter());