-
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
TwoWindings and ThreeWindings new Cgmes conversion #1066
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>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
…(step 1: generators) Signed-off-by: Luma Zamarreño <zamarrenolm@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>
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> # Conflicts: # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/RegulatingControlMapping.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/RegulatingControlMappingForGenerators.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/RegulatingControlMappingForTransformers.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/ExternalNetworkInjectionConversion.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/PhaseTapChangerConversion.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/RatioTapChangerConversion.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/SynchronousMachineConversion.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/TwoWindingsTransformerConversion.java
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>
… enabled. Signed-off-by: José Antonio Marqués <marquesja@aia.es>
…rsion_svcRegulatingControl Signed-off-by: José Antonio Marqués <marquesja@aia.es> # Conflicts: # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/RegulatingControlMapping.java # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/elements/StaticVarCompensatorConversion.java
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
…rsion_svcRegulatingControl
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
…rsion_regulatingControlUniformization Signed-off-by: José Antonio Marqués <marquesja@aia.es> # Conflicts: # cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/RegulatingControlMappingForStaticVarCompensators.java
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>
Done |
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
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.
Some minor remarks.
Could you also rename TapChanger
, TapChangerBuilder
, RatioTapChangerBuilder
and PhaseTapChangerBuilder
respectively as CgmesTapChanger
, CgmesTapChangerBuilder
, CgmesRatioTapChangerBuilder
and CgmesPhaseTapChangerBuilder
?
@@ -0,0 +1,54 @@ | |||
package com.powsybl.cgmes.conversion.elements.transformers; |
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.
Add copyright (2020)
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. I have not change TapChanger
to CgmesTapChanger
as it is used also in interpreted and converted models and will be confusing.
...sion/src/main/java/com/powsybl/cgmes/conversion/elements/transformers/TapChangerBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/powsybl/cgmes/conversion/elements/transformers/RatioTapChangerBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/powsybl/cgmes/conversion/elements/transformers/RatioTapChangerBuilder.java
Outdated
Show resolved
Hide resolved
...sion/src/main/java/com/powsybl/cgmes/conversion/elements/transformers/ConvertedT3xModel.java
Outdated
Show resolved
Hide resolved
static class CgmesEnd { | ||
final double g; | ||
final double b; | ||
final TapChanger ratioTapChanger; | ||
final TapChanger phaseTapChanger; | ||
final double ratedU; | ||
final String terminal; | ||
|
||
CgmesEnd(PropertyBag bagEnd, double x, Context context) { | ||
this.g = bagEnd.asDouble(CgmesNames.G, 0); | ||
this.b = bagEnd.asDouble(CgmesNames.B); | ||
this.ratioTapChanger = TapChanger.ratioTapChangerFromEnd(bagEnd, context); | ||
this.phaseTapChanger = TapChanger.phaseTapChangerFromEnd(bagEnd, x, context); | ||
this.ratedU = bagEnd.asDouble(CgmesNames.RATEDU); | ||
this.terminal = bagEnd.getId(CgmesNames.TERMINAL); | ||
} | ||
} | ||
} |
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 CgmesT2xModel.CgmesEnd
and CgmesT3xModel.CgmesEnd
could be fused in one unique class CgmesEnd
, what do you think?
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 prefer to keep them separated since in twoWindingsTransformers
to build the phaseTapChanger
you need the reactance of the transformer and this reactance is not always the reactante of the CgmesEnd
.
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.
Okay!
...src/main/java/com/powsybl/cgmes/conversion/elements/transformers/PhaseTapChangerBuilder.java
Outdated
Show resolved
Hide resolved
...src/main/java/com/powsybl/cgmes/conversion/elements/transformers/PhaseTapChangerBuilder.java
Outdated
Show resolved
Hide resolved
I approved this PR since all the comments I made are minor. Regarding the refactoring of |
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 approve this PR, just a small comment to improve the comment of "conversion.java".
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
Kudos, SonarCloud Quality Gate passed!
|
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restWhat kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
Current Tx Cgmes conversion is done in two steps. In the first step transformer attributes are assigned to all transformers. In the second step the
ratioTapChanger
andphaseTapChanger
Cgmes conversion is done for all tapChangers.What is the new behavior (if this is a feature change)?
Cgmes conversion of each transformer (Two and Three windings) is concentrated in one step.
Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Both, current and new Cgmes conversion are maintained in the code at the moment and it is possibly to switch between them. Deprecated label has been added to current Cgmes conversion non-private methods.
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)
CurrentCgmesConversion is defined in the following four files:
TwoWindingsTransformerConversion.java
ThreeWindingsTransformerConversion.java
RatioTapChangerConversion.java
PhaseTapChangerConversion.java
.At the end of the process the four files will be deleted.
NewCgmesConversion is defined in the next files:
NewTwoWindingsTransformerConversion.java
. New Cgmes conversion for two windings transformers.NewThreeWindingsTransformerConversion.java
. New Cgmes conversion for three windings transformers.AbstractTransformerConversion.java
. Common methods used in previous classes.TapChangerConversion.java
. Class to record Cgmes attributes of atapChanger
(ratio or phase)After deleting the currentCgmesConversion
NewTwoWindingsTransformerConversion
andNewThreeWindingsTransformerConversion
will be renamedTwoWindingsTransformerConversion
andThreeWindingsTransformerConversion
The NewCgmesConversion of each transformer is divided in four steps:
load
. Cgmes attributes are collected.interpret.
Cgmes data is interpreted according to the configured alternative.convert
. Cgmes data is converted to IIDM.set
. Transformer IIDM model is set.Brief description of the changed files:
Context.java
ratio and phase tapChanger tables are cached.Conversion.java
. Switch between both Cgmes conversions. Methods to configure the different alternatives supported in the interpretation process.RegulatingControlMappingForTransformers.java
. Extend regulating control to all possible tapChangers in a threeWindingsTransformer.ConversionTester.java
. Temporary modification of the test to compare newCgmesConversion and currentCgmesConversion.Comparison.java, Differences.java, DifferencesFail.java, DifferencesReport.java
. Improve buses comparison to support node breaker models.CgmesModel.java, CgmesModelTripleStore.java, CIM16.sparql, FakeCgmesModel.java
. Add phaseTapChanger tables pointsBranchData.java
. Add phaseAngleClock.TwtData.java
. Add phaseAngleClock, g and b in all legs and ratedU0.TwtTestData.java
. Adjust g, b in all legs, phaseAngleClock and ratedU0.ThreeWindingsTransformerImpl.java
Extend some methods to all possible tapChangers.LoadflowValidation and LoadflowResultsCompletion files
. Add phaseAngleClock, ratedU0 and g and b in all legs.