-
Notifications
You must be signed in to change notification settings - Fork 8
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
Remove EquationUtil #447
Remove EquationUtil #447
Conversation
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
# Conflicts: # src/main/java/com/powsybl/openloadflow/network/BusState.java
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
@@ -112,6 +109,9 @@ private void calculatePostContingencySensitivityValues(List<LfSensitivityFactor< | |||
LoadFlowParameters lfParameters, OpenLoadFlowParameters lfParametersExt, | |||
String contingencyId, int contingencyIndex, SensitivityValueWriter valueWriter, | |||
Reporter reporter, boolean hasTransformerBusTargetVoltage) { | |||
for (LfBranch branch : lfContingency.getBranches()) { |
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.
@annetill we can safely replace by LfContingency.apply ?
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.
It is on my TODO list, I think it should work but I need to add some tests and to perform real tests. My question is: in an AC sensitivity analysis, do you need to support transformers control such as voltage or active power control ? Do we need to support shunt voltage control ?
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.
For a sensitivity analysis, everything regarding control does not make really sense.
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
# Conflicts: # src/main/java/com/powsybl/openloadflow/sensi/AcSensitivityAnalysis.java
equationSystem.getEquation(bus.getNum(), AcEquationType.BUS_TARGET_V) | ||
.orElseThrow() | ||
.setActive(false); | ||
bus.getVoltageControl().ifPresent(voltageControl -> AcEquationSystem.updateGeneratorVoltageControl(voltageControl, equationSystem)); |
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.
Do you miss controllerBus.getReactivePowerControl().ifPresent
here?
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.
Yes, fixed
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@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 restNo
What 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)
The
EquationUtil
allows to save and restore equations state change because of a contingency.What is the new behavior (if this is a feature change)?
We don't use
EquationUtil
anymore but only relies on bus/branch disabling. It means that there is no more direct access to equation system from LF/AS/Sensi. We always interact with theLfNetwork
which automatically reflects changes to the equation system.Does this PR introduce a breaking change or deprecate an API? If yes, check the following:
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)