-
Notifications
You must be signed in to change notification settings - Fork 49
Migration guide v7.1.0
Downstream projects should:
-
Check in their versionable extensions' serializers/deserializers (classes extending AbstractVersionableNetworkExtensionSerDe) that a
SerDeVersionvalue supports the new version (1.15) (usually, at least aSerDeVersionhas itsmaxIidmVersionExcludedattribute set tonull. In this case, there is nothing to do the the SerDe.); -
Upgrade the version in their XIIDM / JIIDM unit test files corresponding to the current version:
-
For ".xiidm" or ".xml" files: replace
xmlns:iidm="http://www.powsybl.org/schema/iidm/1_14"withxmlns:iidm="http://www.powsybl.org/schema/iidm/1_15"; -
For ".json" or ".jiidm" files: replace
"version" : "1.14"with"version" : "1.15".
-
-
TerminalRefSerDe.resolve(String id, ThreeSides side, Network network)takes an additional (nullable)TerminalNumberparameter, used to referenceAcDcConverterAC terminals.- It is now
TerminalRefSerDe.resolve(String id, ThreeSides side, TerminalNumber number, Network network).
- It is now
The CgmesModel interface has been modified, a new method must now be implemented:
PropertyBags dcNodes();-
DCLinkUpdate.DefaultDatarecord has 2 new attributesdouble poleLosses1anddouble poleLosses2. - CGMES conversion's
com.powsybl.cgmes.conversion.elements.transformers.TapChangerclass has no moresetSolvedTapPosition(Integer)andInteger getSolvedTapPosition()methods.
Package com.powsybl.cgmes.shorcircuit was renamed into com.powsybl.cgmes.shortcircuit. (Fixes "short" )
The CGMES profile IDs are no more stored as properties of the network at the import. They were previously stored twice: as properties and in the CgmesMetadataModels extension.
If you relied on these properties, you can replace your usages:
String id = network.getProperty(Conversion.CGMES_PREFIX_ALIAS_PROPERTIES + profile + "_ID");by
CgmesMetadataModels models = network.getExtension(CgmesMetadataModels.class);
CgmesMetadataModel profileModel = models.getModelForSubset(CgmesSubset.valueOf(profile)).orElseThrow();
String id = profileModel.getId();The topology kind of the imported CGMES dataset is no more stored as properties of the network at the import. It was previously stored twice: as a property and in the CimCharacteristics extension.
If you relied on this property, you can replace your usages:
String topologyKind = network.getProperty(Conversion.NETWORK_PS_CGMES_MODEL_DETAIL);
// Possible values:
// - Conversion.NETWORK_PS_CGMES_MODEL_DETAIL_BUS_BRANCH (="bus-branch")
// - Conversion.NETWORK_PS_CGMES_MODEL_DETAIL_NODE_BREAKER (="node-breaker")by
CimCharacteristics cimCharacteristics = network.getExtension(CimCharacteristics.class);
CgmesTopologyKind topologyKind = cimCharacteristics.getTopologyKind();
// Possible values:
// - CgmesTopologyKind.NODE_BREAKER
// - CgmesTopologyKind.BUS_BRANCHAs a consequence, the following constants (which are now useless) have been removed:
-
Conversion.NETWORK_PS_CGMES_MODEL_DETAIL; -
Conversion.NETWORK_PS_CGMES_MODEL_DETAIL_BUS_BRANCH; -
Conversion.NETWORK_PS_CGMES_MODEL_DETAIL_NODE_BREAKER.
The deprecated ReportNodeAdderOrBuilder.withMessageTemplate(String key, String messageTemplate) method was removed.
If you still use it, you have two options:
You can internationalize your application/library. On this subject, see:
- the powsybl-core 6.7.0 migration guide, section "Report node V3 for i18n";
- the "Internationalization" page in ReadTheDocs.
When creating a new root report node, you should now use withMessageTemplate(templateKey) to use a template defined in your i18n bundle.
If you don't want to internationalize your application/library, you can use the ReportNode loose mode. To do this:
- at the root
ReportNodecreation, call.withStrictMode(false)on the builder. - every time
ReportNodeAdderOrBuilder.withMessageTemplate(String key, String messageTemplate)is used, remove the first parameter (String key).
When the loose mode is set on a ReportNode, the missing keys will be directly displayed (with the values replacement support) instead of being replaced by a "Missing key" message.
All classes from com.powsybl.contingency.contingency.list package have been moved to com.powsybl.contingency.list.
New contingency types have been added, users should now expect to get the following types of contingencies as well:
| ContingencyElementType | Contingency |
|---|---|
| VOLTAGE_SOURCE_CONVERTER | VoltageSourceConverterContingency |
| DC_LINE | DcLineContingency |
| DC_GROUND | DcGroundContingency |
| DC_NODE | DcNodeContingency |
LoadFlowProviders should now implement getRawSpecificParameters (new method) instead of getSpecificParameters.
getSpecificParameters is now meant to override values if a default loadflow parameter loader is available. The default implementation of the LoadFlowProvider interface honors the contract and is based on getRawSpecificParameters.
LoadFlowProvider implementations can just rename their old method getSpecificParameters to getRawSpecificParameters.
The ConnectedComponentMode enum has been replaced by ComponentMode.
The mapping between the 2 enums is the following:
| Before | After |
|---|---|
ConnectedComponentMode.MAIN |
ComponentMode.MAIN_CONNECTED |
ConnectedComponentMode.ALL |
ComponentMode.ALL_CONNECTED |
A new value was also introduced: ComponentMode.MAIN_SYNCHRONOUS.
The default (connected) component mode was previously stored in LoadFlowParameters.DEFAULT_CONNECTED_COMPONENT_MODE. This constant was replaced by LoadFlowParameters.DEFAULT_COMPONENT_MODE. Its value ensure that the default behavior is the same as before.
The corresponding accessor methods of LoadFlowParameters have been renamed and use the new enum now:
-
setConnectedComponentMode(...)becomespublic LoadFlowParameters setComponentMode(ComponentMode componentMode) -
getConnectedComponentMode()becomespublic ComponentMode getComponentMode()
In your LoadFlow parameters configuration files, you need to update the following parameters using this mapping:
| Before | After |
|---|---|
connectedComponentMode: MAIN |
componentMode: MAIN_CONNECTED |
connectedComponentMode: ALL |
componentMode: ALL_CONNECTED |
TimeSeries and DataChunk implementations now have to implement at least the methods TimeSeries.uncompressedStream() and DataChunk.uncompressedStream(TimeSeriesIndex index).
Since the default methods stream() and iterator() now defaults to there uncompressed version, users have to change to compressedStream() or compressedIterator() to get exactly the same behavior as before.
Custom IIDM implementations should adapt to the updated AC/DC Converters validation rules tested in IIDM TCK:
com.powsybl.iidm.network.tck.AbstractAcDcConverterTest#testCreationErrorcom.powsybl.iidm.network.tck.AbstractAcDcConverterTest#testTwoAcTerminals
If you defined your own IIDM implementation, you should:
- Write your own implementations of
DroopCurveandDroopCurveAdder - Implement the following methods in your
AcDcConverterimplementations:DroopCurveAdder newDroopCurve()DroopCurve getDroopCurve()
IIDM implementations should now implement the following new methods:
Generator.getEquivalentLocalTargetV()Generator.setTargetV(double targetV, double equivalentLocalTargetV)GeneratorAdder.setTargetV(double targetV, double equivalentLocalTargetV)
The classes implementing DcTerminal now have to implement the following new methods:
void traverse(TopologyTraverser traverser)void traverse(DcTerminal.TopologyTraverser traverser, TraversalType traversalType)boolean disconnect()