-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cgmes export fix tap changer control issue #2716
Cgmes export fix tap changer control issue #2716
Conversation
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
@@ -308,6 +309,86 @@ public static <C extends Connectable<C>> void setCgmesTapChangerType(C eq, Strin | |||
} | |||
} | |||
|
|||
// tap changer is exported as it is modelled in IIDM, always at end 1 | |||
public static void addTapChangerExtensionsNecessaryForExporting(TwoWindingsTransformer twt) { |
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.
naming suggestion: use addUpdateCgmesTapChangerExtension
instead of addTapChangerExtensionsNecessaryForExporting
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.
Done
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
} | ||
|
||
private static boolean regulatingControlIsDefined(RatioTapChanger rtc) { | ||
return !Double.isNaN(rtc.getTargetV()) && rtc.getTargetV() > 0.0; |
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.
we should also check that regulating terminal is not null
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.
and/or verify the flag for load tap changing capabilities
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.
Done. Only the regulating terminal checking is needed
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Merging |
For power flow analysis we need only to export It is true that the tap changer control data is still not exported, but we have to consider that this will only happen if there are two tap changer controls in the transformer, one on each end. That is, the transformer is able to regulate changing positions in two tap changers. If there is only one tap changer control in the transformer, we keep it as the "main" tap changer, and the other tap changer (without control) will be the "hidden" one. |
Import and export are consistent, and our power flow cannot handle this kind of rare configuration. So I agree to not support that. |
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: José Antonio Marqués <marquesja@aia.es> (cherry picked from commit 94577c3)
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
Fixes one of the items of #2707 (TapChangerControl missing (phase control and voltage control))
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
The information required to export a tap changer control to CGMES is stored in the
CgmesTapChanger
extension in IIDM.Starting from an IIDM Network not imported from CGMES, or making changes to the tap changer control after importing from CGMES, may result in the extension not being created or incomplete.
What is the new behavior (if this is a feature change)?
Before export, it is ensured that all required information about tap changer regulation exists in the
CgmesTapChanger
extension.Does this PR introduce a breaking change or deprecate an API?
Other information: