Skip to content
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 variable activation #247

Merged
merged 6 commits into from
Mar 23, 2021
Merged

Remove variable activation #247

merged 6 commits into from
Mar 23, 2021

Conversation

geofjamg
Copy link
Member

@geofjamg geofjamg commented Mar 19, 2021

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
No

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix

What is the current behavior? (You can also link to an open issue here)
Variable has a active property which allows a variable considered either as a variable or as a constant in an equation term. The problem is that it is not fully implemented (see the ugly FIXME in Variable.java). By luck when we change the active status of a variable, we always also change the active status of its term, so it works but this is really fragile...

What is the new behavior (if this is a feature change)?
That would be hard to support a robust variable active status. Instead it is simpler to just rework the equation design by just adding a new equation v = constant when we want the variable to become constant.

Does this PR introduce a breaking change or deprecate an API? If yes, check the following:

  • The Breaking Change or Deprecated label has been added
  • The migration guide has been updated in the github wiki (What changes might users need to make in their application due to this PR?)

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
Signed-off-by: Geoffroy Jamgotchian <[email protected]>
@geofjamg geofjamg requested review from annetill and flo-dup March 21, 2021 17:12
@geofjamg
Copy link
Member Author

@annetill @floriand-e2r this is the comeback a change I revert in the network listener PR :-). I added a description/explanation of the change in the PR, tell me if it is clear or not.

Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more robust and clearer indeed!

annetill and others added 3 commits March 23, 2021 11:36
Signed-off-by: Anne Tilloy <[email protected]>
# Conflicts:
#	src/main/java/com/powsybl/openloadflow/dc/equations/ClosedBranchSide1DcFlowEquationTerm.java
#	src/main/java/com/powsybl/openloadflow/dc/equations/ClosedBranchSide2DcFlowEquationTerm.java
Signed-off-by: Anne Tilloy <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

95.3% 95.3% Coverage
0.0% 0.0% Duplication

@annetill annetill merged commit 61e050b into master Mar 23, 2021
@annetill annetill deleted the remove_variable_activation branch March 23, 2021 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants