-
Notifications
You must be signed in to change notification settings - Fork 52
Migration guide v4.7.0
During CGMES import, all target flows are now set by SSH profile and all calculated flows are set by SV profile.
In CGMES import, the parameter iidm.import.cgmes.profile-used-for-initial-state-values has been deprecated and now has the same behaviour as the new parameter iidm.import.cgmes.profile-for-initial-values-shunt-sections-tap-positions and only defines if shunt sections and tap positions are defined by SSH or SV profiles.
From this release, the CGMES update mechanism is not supported anymore. You are now able to generate CGMES files from any network by using the CGMES exporter. By default, all profiles are exported (EQ, TP, SSH and SV) but you can modify the configuration if you want to export specific profiles.
For example, if you wish to export only the SSH and SV profiles, add this to your configuration:
import-export-parameters-default-value:
iidm.export.cgmes.profiles:
- SSH
- SVYou can also pass a Properties object containing this configuration:
Properties properties = new Properties();
properties.put("iidm.export.cgmes.profiles", List.of("SSH", "SV"));
new CgmesExport().export(network, properties, dataSource);Methods in BranchObservability and InjectionObservability setting the redundant attribute of ObservabilityQuality sub-objects, such as setQualityP1(double standardDeviation, boolean redundant), do not pass a Boolean anymore but a boolean, preventing null object to be passed.
Transformers created directly in the network (not in a substation) must now have all of their legs directly in the network as well (not in a substation). In parallel, transformers created in a substation must now have all of their legs in this substation. Transformers with part of their legs directly in the network and part of their legs in a substation are now forbidden.
At this release, IIDM has been changed to version 1.7. Consequently, if you are using a XIIDM converter from powsybl-core v4.7.0 and above to write IIDM network files in version 1.7, you should use a XIIDM converter from powsybl-core v4.7.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 somethingReading 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.7 evolutions.
These new features and changes include:
A new artifact has been introduced in this release: powsybl-iidm-modification. The API ModificationTask in powsybl-contingency-api artifact has been renamed to NetworkModification and moved to this package. Besides, the ModificationTask::modify method has been renamed to NetworkModification::apply. Note that new apply methods have also been introduced, but with default implementations to ensure backward compatibility.
All inheriting classes of ModificationTask have been moved, from powsybl-action-util and from powsybl-contingency-api to that artifact. Some renaming occured at the same time, as the "task" keyword was removed but also for some classes to clarify the corresponding modification:
-
Contingency::toTaskrenamed intoContingency::toModification -
ContingencyElement::toTaskrenamed intoContingencyElement::toModification(which returns aTrippinginstead of anAbstractTrippingTask) -
CompoundModificationTaskrenamed intoNetworkModificationList -
CloseSwitchTaskrenamed intoCloseSwitch -
OpenSwitchTaskrenamed intoOpenSwitch -
GeneratorModificationTaskrenamed intoGeneratorModification -
PhaseShifterOptimizerTaskrenamed intoPhaseShifterOptimizeTap -
PhaseShifterFixedTapTaskrenamed intoPhaseShifterSetAsFixedTap -
PhaseShifterTapTaskrenamed intoPhaseShifterShiftTap -
AbstractTrippingTaskrenamed intoAbstractTripping -
ContingencyTopologyTraverserrenamed intoTrippingTopologyTraverser
In groovy scripts used with powsybl-action, you can use the new keyword modifications instead of the previous tasks keyword, but tasks is still supported.
simulShunt and all associated methods in LoadFlowParameters have been replaced by shuntCompensatorVoltageControlOn.
All previous methods have been deprecated and call new methods.
All SecurityAnalysis::runAsync and SecurityAnalysis::run methods with no ContingenciesProvider have been removed (a security analysis with no contingencies is of limited interest).
For a similar reason, the arguments order has been changed for methods SecurityAnalysis::runAsync and SecurityAnalysis::run:
- from
(Network, String, LimitViolationDetector, LimitViolationFilter, ComputationManager, SecurityAnalysisParameters, ContingenciesProvider, List<SecurityAnalysisInterceptor>, List<StateMonitor>)to(Network, String, ContingenciesProvider, SecurityAnalysisParameters, ComputationManager, LimitViolationFilter, LimitViolationDetector, List<SecurityAnalysisInterceptor>, List<StateMonitor>) - from
(Network, String, LimitViolationDetector, LimitViolationFilter, ComputationManager, SecurityAnalysisParameters, ContingenciesProvider, List<SecurityAnalysisInterceptor>)to(Network, String, ContingenciesProvider, SecurityAnalysisParameters, ComputationManager, LimitViolationFilter, LimitViolationDetector, List<SecurityAnalysisInterceptor>)
A sensitivity analysis is based on a Network called network here.
Use SensitivityFactor class to describe a sensitivity factor you want to compute. For example, if you want to evaluate the impact of a generator targetP increase on the active power of a branch, without any contingency, you can simply write:
SensitivityFactor factor = new SensitivityFactor(SensitivityFunctionType.BRANCH_ACTIVE_POWER, "NHV1_NHV2_1", SensitivityVariableType.INJECTION_ACTIVE_POWER, "GEN", false, ContingencyContext.none());
where NHV1_NHV2_1 is the id of the monitored branch and GEN the id of the generator. Note that boolean false just says if this factor is a variable set or not. A SensitivityVariableSet is used to describe what is usually called GLSK (Generation and Load Shift Keys). A SensitivityVariableSet is a simple class with an id (that cannot be already in the network) and a list of WeightedSensitivityVariable. A weighted variable only has an id that refers to the variable id (a load or a generator id for example) and a weight. As we can compute several variable sets, you should provide a list of SensitivityVariableSet, called variableSets here, that could be empty.
If you want to simulate contingencies, just provide a list of contingencies as List<Contingency>.
Then, to run a sensitivity analysis, just do:
SensitivityAnalysisResult result = SensitivityAnalysis.run(network, VariantManagerConstants.INITIAL_VARIANT_ID, List.of(factor), contingencies, variableSets, parameters, computationManager, Reporter.NO_OP);
The following extensions' attributes have been made multi-variant in iidm-impl:
-
targetQandenabledinRemoteReactivePowerControl -
droopandparticipateinActivePowerControl -
qPercentinCoordinatedReactiveControl -
p0,droopandenabledinHvdcAngleDroopActivePowerControl -
oprFromCS1toCS2andoprFromCS2toCS1inHvdcOperatorActivePowerRange
Please note that these attributes can now vary from one variant to another.