-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve CGMES import and export of OperationalLimits #3139
Conversation
…imit subclass and OperationalLimitSet at CGMES import Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
… the same name for a given equipment side Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
…MES OperationalLimitSet with 1 IIDM LoadingLimits Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
…cted one during CGMES export Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
5ddd4f3
to
9916f5e
Compare
The operational limit sets for the same terminal are merged by name. Why not merge them by identifier of the operational limit set? (names in CGMES are not required to be unique, two different objects may have the same name), is there a strong reason for preferring the name? |
To my experience, TSOs always model CGMES OperationalLimitSet with the same subclass of OperationalLimit inside. Meaning if they have CurrentLimit and ActivePowerLimit for the same terminal, there would be two OperationalLimitSet. However, in IIDM, it is possible to model multiple limit kinds in the same OperationalLimitsGroup. In case of multiple OperationalLimitSet attached to the same end:
To be noticed, there is a slight evolution regarding the merging of limits (these cases are quite odd and could be regarded as modeling errors):
|
I understand your use case trying to create a single set of limits based on the name (i.e. WINTER, SUMMER, ...) BUT ... Now that we can have multiple groups in IIDM, I still have a concern about mapping multiple operational sets to a single group in IIDM (even if the name is the same). We are losing a separation that the modeller that created the CGMES data enforced. Separate operational sets with the same name may have been prepared for different situations: see DLR, dynamic line ratings, where different ratings can be calculated for different environmental conditions (https://www.entsoe.eu/Technopedia/techsheets/dynamic-line-rating-dlr). Also, if the modeller has decided to keep in different sets in CGMES limits of different class for the same terminal, I think we should respect it. In CGMES, there is no problem in defining multiple classes in the same set. By merging sets explicitly defined as separate in CGMES, we are losing the ability to activate in IIDM exactly one of the sets (and only that one) that was defined in CGMES, where the modeller created the network. |
I understand. But sometimes, the modeled data is not consistent and that wouldn't make sense to import it as is in IIDM. Typically when different sets (attached to the same end) have the same name.
In the case of DLR, from what I have seen in the vendor's implementation: there is no multiple set created in modelization. There is only one set modeled and the DLR application updates the limits value based on the actual conditions. |
The update of values for operational limits brings another argument to preserve the identifier. In CIM100 (CGMES3) we have the Eventually in the import we should be able to import a single EQ and then later update the IIDM Network with values read from SSH. If we have merged different sets based on |
Ok then, from that point of view that makes sense to map the CGMES OperationalLimitSet.rdfid to IIDM OperationalLimitsGroup.id, thus ensuring the id unicity and a strict 1:1 mapping. |
You are right in the point of having the name, and letting the user know about it. I think it is important too. |
…Group.id, ensuring the id's unicity and a strict 1:1 mapping. Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
… in properties attached to the equipment Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
The OperationalLimitSet rdfid and name are preserved in a property attached to the Branch/DanglingLine/ThreeWindingTransformer during CGMES import. The property has the following key/value: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely documented 🙏
...nversion/src/main/java/com/powsybl/cgmes/conversion/elements/OperationalLimitConversion.java
Show resolved
Hide resolved
...nversion/src/main/java/com/powsybl/cgmes/conversion/elements/OperationalLimitConversion.java
Show resolved
Hide resolved
...nversion/src/main/java/com/powsybl/cgmes/conversion/elements/OperationalLimitConversion.java
Outdated
Show resolved
Hide resolved
* If there is more than one element in the collection, do nothing. The identifiable's selectedGroup should then be set by the user after the conversion. | ||
* @param context The conversion's Context. | ||
*/ | ||
private void setSelectedOperationalLimitsGroup(Context context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that to avoid all these loops we could do the selection in LoadingLimitsMapping::addAll
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difficulty is that we should loop over all FlowsLimitsHolder to set the selected set, but there is no easy link to go from OperationalLimitsGroup which we have in LoadingLimitsMapping to FlowsLimitsHolder.
Just a minor comment: in IIDM we decided to use always mRIDs instead of the rdf:ID of the objects (the only difference is the prefix "_" in the rdf:IDs). If you decide to make this adjustment, you can get the limit set identifier from the |
I've verified the changes using real-world CGMES data in a network that defined several operational limit sets for many terminals, some of them with the same name by different identifiers. Checked it doing import-export and calculation of overloads. The limit sets (and their names) are correctly preserved. We do not preserve CGMES names for limit types, but it is ok for me. For example in the input data we found "Normal" and "Emergency" limits, that simply give a name for PATL and TATL 1800. We keep the right values, and export them as "PATL" and "TATL 1800". When multiple limit sets with the same name are found, they kept separated in the IIDM and in the export. I found some warnings for limits not mapped to IIDM, but all of them were ok:
Calculation of overloads for this real-world case gives the same results as the previous PowSyBl version (main branch) when the group with the most restrictive limit value is selected. My conclusion is: functionally the PR is ok. |
…th the OperationalLimitsGroups. Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
done |
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/LoadingLimitsMapping.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Signed-off-by: Romain Courtier <romain.courtier@rte-france.com>
Quality Gate passedIssues Measures |
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature.
What is the current behavior?
There are multiple concerns with the current CGMES import and export.
At export:
At import:
What is the new behavior (if this is a feature change)?
At export:
At import:
Does this PR introduce a breaking change or deprecate an API?
Other information:
In case of multiple OperationalLimitsGroup on the same terminal end, since the selected group must be set manually by the user, the Pypowsybl API should allow it.