-
Notifications
You must be signed in to change notification settings - Fork 2
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
Flow decomposition observers refactoring #171
Conversation
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
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.
Thank you for this PR !
flow-decomposition/src/main/java/com/powsybl/flow_decomposition/FlowDecompositionObserver.java
Outdated
Show resolved
Hide resolved
flow-decomposition/src/main/java/com/powsybl/flow_decomposition/FlowDecompositionObserver.java
Outdated
Show resolved
Hide resolved
flow-decomposition/src/main/java/com/powsybl/flow_decomposition/FlowDecompositionObserver.java
Outdated
Show resolved
Hide resolved
flow-decomposition/src/main/java/com/powsybl/flow_decomposition/FlowDecompositionObserver.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Caio Luke <caioluke97@gmail.com>
|
||
// Losses compensation | ||
compensateLosses(network); | ||
|
||
// DC load flow | ||
runDcLoadFlow(network); | ||
saveDcReferenceFlow(flowDecompositionResultsBuilder, network, xnecList); | ||
saveDcLoadFlowResults(flowDecompositionResultsBuilder, network, xnecList, loadFlowServiceAcResult); |
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.
Are you sure about using loadFlowServiceAcResult 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.
Ops, fixed it!
if (observers.isEmpty()) { | ||
return; | ||
} |
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.
I think some of those tests are not relevant anymore (line 86 and 96 for example)
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.
You are right, well spotted
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.
Could you test the loadFlowResult
? At least that they are not null ?
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.
Done!
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
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.
Thank you for this PR, I approve this !
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Feature
What is the current behavior?
Currently, while running a flow decomposition, we can only retrieve intermediate results for branches and nodes. We can't retrieve an intermediate state for a boundary node, for example.
What is the new behavior (if this is a feature change)?
Flow decomposition observers now have full access to the network after an AC LF and a DC LF. Therefore, the user can retrieve any information they need from the network at those states.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Implement the new methods from the FlowDecompositionObserver interface
As well as remove the old ones