-
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
Improve logging, reporting and LF results for components without generators #919
Conversation
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
a29c812
to
4fb4121
Compare
Quality Gate failedFailed conditions 87.5% Coverage on New Code (required ≥ 90%) |
# Conflicts: # src/main/java/com/powsybl/openloadflow/network/LfNetwork.java
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.
Minor typo
@@ -580,6 +597,21 @@ public void fix(boolean minImpedance, double lowImpedanceThreshold) { | |||
} | |||
|
|||
private void validateBuses(LoadFlowModel loadFlowModel, ReportNode reportNode) { | |||
// DC or AC, if no generator, network is dead |
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.
we might want to add an option to allow computing islands without generators in DC
Quality Gate passedIssues Measures |
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.
@jeandemanged ok for me to merge it as it is but:
- maybe in the future we might have some users feeback to calculate DC components even without any generator. In that case we will add a parameter to allow it.
- for our needs we will probably soon enrich components calculation criteria with additional checks like if slack distribution is on generator we need at least generator participating, if slack distribution is on loads we need at least one load etc.
public static ReportNode createLfNetworkReportNode(ReportNode reportNode, ReportNode lfNetworkReportNode, int networkNumCc, int networkNumSc) { | ||
ReportNode newReportNode = reportNode.newReportNode() | ||
.withMessageTemplate("lfNetwork", "Network CC${networkNumCc} SC${networkNumSc}") | ||
.withUntypedValue(NETWORK_NUM_CC, networkNumCc) | ||
.withUntypedValue(NETWORK_NUM_SC, networkNumSc) | ||
.add(); | ||
newReportNode.include(lfNetworkReportNode); | ||
return newReportNode; |
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.
this will need to be revisited at next powsybl-core bump because of powsybl/powsybl-core#3007
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.
This is done in #1034.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
Feature
What is the current behavior?
Synchronous Components (islands) without any generator connected are causing many ERROR logs to be raised, and many report entries created which are just noise.
Hundreds of errors are logged & reported on real case large networks when OLF configured to solve all components which is quite inconvenient, and not really an error.
What is the new behavior (if this is a feature change)?
Network post-loading validation now:
Only relevant logs & reports are now produced.
For islands without any generator, only one log & one report entry is produced reporting the total number of islands where no calculation will be made.
With new LoadFlowResult API (see powsybl/powsybl-core#2767) and #918 we now are able to report new NO_CALCULATION status for "dead" islands without any generator.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
n/a
What changes might users need to make in their application due to this PR? (migration steps)
n/a
Other information:
n/a