-
Notifications
You must be signed in to change notification settings - Fork 49
Migration guide v6.8.0
-
NetworkReports.parentHasBothRatioAndPhaseTapChanger(ReportNode reportNode, String parentMessage)was replaced byNetworkReports.transformerHasBothRatioAndPhaseTapChanger(ReportNode reportNode, String id). -
NetworkReports.parentHasDuplicatePointForActivePower(ReportNode reportNode, String ownerMessage, Double p)was replaced byNetworkReports.parentHasDuplicatePointForActivePower(ReportNode reportNode, String id, Double p).
PowsyblCoreTestReportResourceBundle has been renamed to PowsyblTestReportResourceBundle.
Downstream projects should:
- Update their classes extending
AbstractVersionableNetworkExtensionSerDeto add an entry for the new version (1.14) in the first map of the call tosuper(...); - 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_13"withxmlns:iidm="http://www.powsybl.org/schema/iidm/1_14"; - For ".json" or ".jiidm" files: replace
"version" : "1.13"with"version" : "1.14".
- For ".xiidm" or ".xml" files: replace
Importer of other grid formats such as CGMES, UCTE-DEF, PSS/E etc. must ensure that regulation is enabled only on TapChangers with loadTapChangingCapabilities set to true.
Network simulators implementing simulation of ratio or tap phase tap control do not need to check the loadTapChangingCapabilities status anymore, since iIDM validation ensures regulation can be enabled only for tap changers with on load tap changing capability.
For backward compatibility of existing external code, PhaseTapChangerAdder assumes a default value of true (unlike RatioTapChangerAdder in which default is false).
ValidationUtil.checkPhaseTapChangerRegulation(...) now takes an additional boolean loadTapChangingCapabilities parameter.
Phase tap changer regulation mode RegulationMode.FIXED_TAP was removed.
Retro compatibility exists to still handle older IIDM versioned files (<1.14) with FIXED_TAP mode. The mode in IIDM will then be CURRENT_LIMITER with regulating=false so an import/export round trip with FIXED_TAP regulation mode at the beginning will fail but functionnally there should be no impact.
If you used FIXED_TAP mode:
- to disable the regulation on an already existing phase tap changer, you should call
phaseTapChanger.setRegulating(false)instead. - to initialize a phase tap changer, you should set regulating to false, and use another regulation mode (default one is
CURRENT_LIMITER).
RegulationMode.OFF was removed. If you used it:
- to disable the regulation on an already existing StaticVarCompensator, you should call
svc.setRegulating(false)instead and set the regulationMode toVOLTAGEorREACTIVE_POWER. - to initialize a StaticVarCompensator, you should set
regulatingtofalse, and use another regulation mode (default one isVOLTAGE).
Globally:
- in a check, you should now use
svc.isRegulating() - when creating a StaticVarCompensator, it is now mandatory to explicitly set the
regulatingattribute. If not the validation will fail. - if you want to set regulating to
truethen you should set its regulating set point (reactive power or voltage setpoint) and its consequentlyRegulationModebefore setting the regulating value as some controls are made to check that the regulation is correctly set before activating the regulation.
Loadflow runs compute the tap positions of tap changers and the section counts of compensators. But with the previous IIDM versions, the loadflow models replaced the original values with the resulting values. This was a problem because running another loadflow on the same network may give different results. To avoid this, new attributes were introduced in IIDM v1.14:
TapChanger.getSolvedTapPosition()ShuntCompensator.getSolvedSectionCount()
New methods were also introduced to replace the original values with the solved values, if they have a value:
-
Networks.applySolvedValues(Network network): perform the replacement on a whole network:- For transformers: copy
solvedTapPositionintapPosition. - For shunt compensators: copy
solvedSectionCountinsectionCount. - For batteries: copy terminal's
pandqrespectively intargetPandtargetQ. - For generators: copy terminal's
pandqrespectively intargetPandtargetQ, and bus'vintargetV. - For dangling lines: copy terminal's
pandqrespectively intargetPandtargetQ, and bus'vintargetV. - For loads: copy terminal's
pandqrespectively inp0andq0.
- For transformers: copy
-
applySolvedValueson all these network elements, if you want to copy only the solved values for a single network element. -
applySolvedTapPositionAndSolvedSectionCount(Network network): perform the replacement on the whole network, but only forsolvedTapPosition(for transformers) andsolvedSectionCount(for shunt compensators) fields.
As not all load flow models may support these new fields, if you want to maintain the same behavior as before, simply call the applySolvedTapPositionAndSolvedSectionCount(Network network) method after your load flow has run.
The boolean throwException parameter of ValidationUtil.validate(...) was replaced by an enum value.
If you used this method, you can use one of the following values:
-
ValidationUtil.ActionOnError.THROW_EXCEPTION: throw an exception if an error is detected - corresponds to olderthrowException=true); -
ValidationUtil.ActionOnError.LOG_ERROR: report all the errors in the given reportNode and on the console - corresponds to olderthrowException=false); -
ValidationUtil.ActionOnError.IGNORE: ignore all the errors (no exception, no logs and no reports)
The methods newCurrentLimits, newApparentPowerLimits and newActivePowerLimits on Branch and FlowsLimitsHolder are now deprecated.
Their use should be replaced by the call to the new method getOrCreateSelectedOperationalLimitsGroup() (that creates anOperationalLimitsGroup and set it as selected, if needed) followed by a call to the limits' creation on the group.
Basically, replace myDanglingLine.newCurrentLimits() by myDanglingLine.getOrCreateSelectedOperationalLimitsGroup().newCurrentLimits()
Note that previously, the deprecated methods only created the default group - if needed - at the limits' creation (during the call to add() on the resulting limits adder). Now, the default group is created by the deprecated methods. Therefore, the group is created even if add() is never called on the resulting adder.
When validating a PhaseTapChanger by calling ValidationUtil.checkPhaseTapChangerRegulation(Validable validable, PhaseTapChanger.RegulationMode regulationMode, double regulationValue, boolean regulating, Terminal regulationTerminal, Network network, ValidationLevel validationLevel, ReportNode reportNode) method with STEADY_STATE_HYPOTHESIS validationLevel, a ValidationException is now thrown if regulationMode=CURRENT_LIMITER and regulationValue is negative.
With this new rule, manually creating or modifying a PhaseTapChanger will throw an exception when it is configured in CURRENT_LIMITER regulation with a negative regulation value.
At CGMES or IIDM import, when a negative regulation value is encountered for a phase tap changer in CURRENT_LIMITER regulation, its sign will be changed (the value will be considered as positive).
Users should replaces calls of ContingencyElement.of(Identifiable<?> identifiable) to ContingencyElementFactory.create(Identifiable<?> identifiable)
- The JSON serialization of
IdWithWildcardsNetworkElementIdentifiernow contains awildcardattribute. When reading a JSON without this attribute, the default wildcard (?) is used. - As a consequence, the serializations of the following elements (which can contain a
IdWithWildcardsNetworkElementIdentifier) are potentially impacted. Their serialization version numbers were increased:
| Category | Element | Previous version | New version |
|---|---|---|---|
| Action list | ActionList |
1.1 |
1.2 |
| Contingency list | IdentifierContingencyList |
1.2 |
1.3 |
| Contingency list | ListOfContingencyLists |
1.0 |
1.1 |
Also, this change of serialization versions can have an impact on your unit tests (if you use a JSON serialized object as a reference).
- CIM 14 CGMES files are not supported anymore. Please use CIM16 (2.4.15) or CIM100 (3.0) files.
- As a direct consequence, the followings were removed:
-
CgmesModel.CIM_14_NAMESPACE, -
CgmesModel.CIM_14, -
CgmesOnDataSource.existsCim14(): now it would have always returnedfalse, -
CgmesModel.Cim.hasProfiles(): now it would have always returnedtrue.
-
- The
CgmesModelinterface was also modified. The methodmodelProfilesis no longer a default method, meaning that you have now to implement it if you designed your own implementation of the interface. - The public constant
CIM_LISTfrom theCgmesNamespaceclass has gone fromList.of(CIM_14, CIM_16, CIM_100)toList.of(CIM_16, CIM_100) - Deleted CIM14 network files are available in previous releases (
$vX.Y.Z \leq v6.7.0$ ) if needed.
-
The
CgmesModelinterface has been modified with:- 2 additions:
PropertyBags dcSwitches()PropertyBags dcGrounds()
- 1 deletion:
CgmesDcTerminal dcTerminal(String dcTerminalId)
- 2 additions:
-
Context.getDc() was removed.
-
The
com.powsybl.cgmes.conversion.elements.hvdcpackage was removed and replaced by a newcom.powsybl.cgmes.conversion.elements.dcpackage.
CGMES import parameter CgmesImport.PROFILE_FOR_INITIAL_VALUES_SHUNT_SECTIONS_TAP_POSITIONS ("iidm.import.cgmes.profile-for-initial-values-shunt-sections-tap-positions") was removed.
Now that there are distinct attributes for initial values (sectionCount and tapPosition) and solved values (resp. solvedSectionCount and solvedTapPosition), this parameter was no more pertinent.
If you need to have the SV values in the initial values' attributes (which corresponds to the "SV" value of the removed parameter), you can copy the solved values in the initial values' attributes by calling
Networks.applySolvedTapPositionAndSolvedSectionCount(network);
The following methods of CgmesConformity1ModifiedCatalog, were removed:
smallNodeBreakerHvdcDcLine2Inverter1Rectifier2()smallNodeBreakerHvdcDcLine2BothConvertersTargetPpcc1inverter2rectifier()smallNodeBreakerHvdcDcLine2BothConvertersTargetPpcc1rectifier2inverter()smallNodeBreakerHvdcVscReactiveQPcc()smallNodeBreakerHvdcNanTargetPpcc()smallNodeBreakerHvdcMissingDCLineSegment()smallNodeBreakerHvdcMissingAcDcConverters()smallNodeBreakerHvdcTwoDcLineSegments()smallNodeBreakerHvdcTwoDcLineSegmentsOneTransformer()smallNodeBreakerHvdcTwoAcDcConvertersOneDcLineSegments()smallNodeBreakerHvdcWithTransformers()smallNodeBreakerHvdcWithTwoTransformers()smallNodeBreakerHvdcWithDifferentConverterTypes()smallNodeBreakerHvdcWithVsCapabilityCurve()smallNodeBreakerVscConverterRemotePccTerminal()smallNodeBreakerHvdcTwoAcDcConvertersTwoDcLineSegments()smallNodeBreakerHvdcTwoAcDcConvertersTwoDcLineSegmentsNoAcConnectionAtOneEnd()
They were used for unit testing, but they relied on big CGMES files ; this slowed the tests execution. If you still need to use them, you can retrieve the methods at this URL and the corresponding CGMES files in this directory.
Starting from this release, the previously deprecated Equipments class has been removed from iidm API. If you were using getConnectionInfoInBusBreakerView(Terminal t), use the following code instead:
connected = t.getBusBreakerView().getBus();
bus = Optional.ofNullable(t.getBusBreakerView().getBus()).orElse(t.getBusBreakerView().getConnectableBus());Replace every import javax.annotation.Nullable; with import org.jspecify.annotations.Nullable;
Custom IIDM implementation maintainers should implement the following method in their ThreeWindingsTransformer's implementations:
Terminal getTerminal(String voltageLevelId);Custom IIDM implementations' maintainers should implement the following methods in their OperationalLimitsGroup implementations:
public boolean hasProperty()public boolean hasProperty(String key)public String getProperty(String key)public String getProperty(String key, String defaultValue)public String setProperty(String key, String value)public boolean removeProperty(String key)public Set<String> getPropertyNames()
Custom IIDM implementations' maintainers should implement the following methods:
-
in their
Branchimplementations:OperationalLimitsGroup getOrCreateSelectedOperationalLimitsGroup1();OperationalLimitsGroup getOrCreateSelectedOperationalLimitsGroup2();
-
In their
FlowsLimitsHolderimplementations:OperationalLimitsGroup getOrCreateSelectedOperationalLimitsGroup();
Custom IIDM implementations' maintainers should implement the following methods:
- in
StaticVarCompensator's implementations:boolean isRegulating()StaticVarCompensator setRegulating(boolean regulating)
- in
StaticVarCompensatorAdder's implementations:StaticVarCompensatorAdder setRegulating(boolean regulating)
In their StaticVarCompensatorAdder implementations, they should set:
-
regulatingto false when it isnullinEQUIPMENTlevel; -
regulationModetoVOLTAGEwhen it isnull.
In their RegulatingPoint implementations, they should:
- have
regulatingdepending on the variant; - initialize
regulatingtoVOLTAGEby default.
Custom IIDM implementations' maintainers should implement the following methods:
- in their
ShuntCompensator's implementations:Integer getSolvedSectionCount()ShuntCompensator setSolvedSectionCount(int solvedSectionCount)ShuntCompensator unsetSolvedSectionCount()
- in their
ShuntCompensatorAdder's implementations:ShuntCompensatorAdder setSolvedSectionCount(Integer solvedSectionCount)
Custom IIDM implementations' maintainers should implement the following methods:
- In
PhaseTapChanger's implementations (noted asCbelow):C setLoadTapChangingCapabilities(boolean loadTapChangingCapabilities)boolean hasLoadTapChangingCapabilities()
- In
PhaseTapChangeAdder's implementations (noted asSbelow):S setLoadTapChangingCapabilities(boolean loadTapChangingCapabilities)
Custom IIDM implementations' maintainers should change the default regulationMode value to CURRENT_LIMITER in their PhaseTapChangerAdder's implementations.
Custom IIDM implementations' maintainers should implement the following methods:
- in their
TapChanger's implementations:Integer getSolvedTapPosition()C setSolvedTapPosition(int solvedTapPosition)C unsetSolvedTapPosition()S getSolvedCurrentStep();
- in their
TapChangerAdder's implementations:S setSolvedTapPosition(Integer solvedTapPosition)
If you defined your own IIDM implementation, you should implement the following methods:
-
in your
Networkimplementations:- DcNode
DcNodeAdder newDcNode()Iterable<DcNode> getDcNodes()Stream<DcNode> getDcNodeStream()int getDcNodeCount()DcNode getDcNode(String id)
- DcLine
DcLineAdder newDcLine()Iterable<DcLine> getDcLines()Stream<DcLine> getDcLineStream()int getDcLineCount()DcLine getDcLine(String id)
- DcSwitch
DcSwitchAdder newDcSwitch()Iterable<DcSwitch> getDcSwitchs()Stream<DcSwitch> getDcSwitchStream()int getDcSwitchCount()DcSwitch getDcSwitch(String id)
- DcGround
DcGroundAdder newDcGround()Iterable<DcGround> getDcGrounds()Stream<DcGround> getDcGroundStream()int getDcGroundCount()DcGround getDcGround(String id)
- LineCommutatedConverter
Iterable<LineCommutatedConverter> getLineCommutatedConverters()Stream<LineCommutatedConverter> getLineCommutatedConverterStream()int getLineCommutatedConverterCount()LineCommutatedConverter getLineCommutatedConverter(String id)
- VoltageSourceConverter
Iterable<VoltageSourceConverter> getVoltageSourceConverters()Stream<VoltageSourceConverter> getVoltageSourceConverterStream()int getVoltageSourceConverterCount()VoltageSourceConverter getVoltageSourceConverter(String id)
- DcConnectable
Iterable<DcConnectable> getDcConnectables()Stream<DcConnectable> getDcConnectableStream()int getDcConnectableCount()DcConnectable getDcConnectable(String id)
- DcNode
-
in your
VoltageLevelimplementation:- LineCommutatedConverter
LineCommutatedConverterAdder newLineCommutatedConverter()Iterable<LineCommutatedConverter> getLineCommutatedConverters()Stream<LineCommutatedConverter> getLineCommutatedConverterStream()int getLineCommutatedConverterCount()
- VoltageSourceConverter
VoltageSourceConverterAdder newVoltageSourceConverter()Iterable<VoltageSourceConverter> getVoltageSourceConverters()Stream<VoltageSourceConverter> getVoltageSourceConverterStream()int getVoltageSourceConverterCount()
- LineCommutatedConverter
-
in your
TopologyVisitorimplementation:void visitAcDcConverter(AcDcConverter<?> converter, TwoSides side)
Users which were using a custom IIDM implementation need to return a MessageHeader instead of a String for getMessageHeader method in the classes implementing Validable.
If you called one of these methods, you should use their new signatures instead (old signatures are now deprecated):
CgmesAnalogPostProcessor.process(...)CgmesDiscretePostProcessor.process(...)
They both now take a Map<String, PropertyBag> idToBayBag instead of a PropertyBags bays.