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

Refacto lhs #1147

Merged
Merged

Conversation

vidaldid-rte
Copy link
Collaborator

@vidaldid-rte vidaldid-rte commented Dec 9, 2024

Please check if the PR fulfills these requirements

  • 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?
This is another approach to fix #1137

What kind of change does this PR introduce?
Clairify the equation model:

 evallhs = target - rhs

and
eval = evallhs - rhs

evallhs is used to solve equations
eval is used to get the equation or term quantity

What is the current behavior?
Errors seen with non impedant branches in DC near a PST or an HVDC in AC emulation with P0 non null.

Potental inconsitenscies each time a non null RHS is used

What is the new behavior (if this is a feature change)?
Error fixed

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • [ X No

Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
default double eval(StateVector sv) {
throw new UnsupportedOperationException("Not implemented");
default double evalLhs() {
return eval() + (hasRhs() ? rhs() : 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be - rhs instead of + rhs ?

Suggested change
return eval() + (hasRhs() ? rhs() : 0);
return eval() - (hasRhs() ? rhs() : 0);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right. Done.

Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
@vidaldid-rte vidaldid-rte merged commit 93bad2d into bugfix/pst-non-impedant-branch-bus-imbalance Dec 11, 2024
8 checks passed
@vidaldid-rte vidaldid-rte deleted the refacto_lhs branch December 11, 2024 09:38
vidaldid-rte added a commit that referenced this pull request Dec 11, 2024
Signed-off-by: Didier Vidal <didier.vidal_externe@rte-france.com>
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.

2 participants