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

Modified exception message when initial LF fails in AC Sensi #1170

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SylvestreSakti
Copy link
Contributor

@SylvestreSakti SylvestreSakti commented Jan 15, 2025

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?
No

What kind of change does this PR introduce?
Misleading exception message was thrown when load flow fails in AC sensi analysis. A correction is done to this message.

What is the current behavior?
When running an AC sensitivity analysis, if the first load flow fails because of UNSTABLE outer loop status, a PowsyblException is thrown with message : "Load flow ended with status CONVERGED"

What is the new behavior (if this is a feature change)?
A correct exception message is thrown depending on Load flow result.

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

  • Yes
  • No

Other information:

Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
Signed-off-by: PRABAKARAN Sylvestre <sylvestre.prabakaran@rte-france.com>
throw new PowsyblException("Load flow ended with outer loop status " + result.getOuterLoopResult().statusText());
} else {
throw new PowsyblException("Load flow ended with solver status " + result.getSolverStatus());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The message can still be improved by specifying that this is the load flow of the N case
(failures for contingencies don't interrupt the analysis)

For this you can also rename the parameter from throwsExceptionIfNoConvergence to something like runBaseSituation (te clarify its meaning since now the message would depend on this param) , and make the message more precise.

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