Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
LfAction refactoring and area interchange target action support #1172
base: main
Are you sure you want to change the base?
LfAction refactoring and area interchange target action support #1172
Changes from all commits
63c0019
eff560e
fead01e
fafd78c
7e8f945
ffc7981
517baf6
33f1a45
bc36fa5
2f71d8a
e5db242
91da360
579f2e9
9eb1169
bed4820
3ec6d46
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
Why don(t you return an optional ? The previous code could help detect NOOP actions for the network by returning an empty value if the element did not exist.
You now loose the ability to detect actions that do nothing on a given LfNetwork.
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.
The old code was returning an optional but actually did not do anything with the "empty" information and just silently ignored the action.
Same checks are done in the apply method with a boolean return and a warning is logged (to be discussed maybe).
Ultimately I think the operator strategy result API should hold the info of what action was applied successfully, this is also why I designed it like this, but this a change of API to be seen in the futur..
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.
Thanks for the explanation.
But isn't there a functional change ?
In current code, I suppose there is no LF run if the list of LF actions is empty for a strategy. Is it the same here .
The point of reporting the missing action is a good point but:
Should be done in a report (users won't look at the log)
May not be relevant in the (rare ?) case of contingency and actions covering different network component.
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.
In the current code, even if the list of lfAction converted from iidm actions is empty there is always a load flow done and an operator strategy result is produced (see AbstractSecurityAnalysis.runSimulations usage of lfActionById).
Whether that is a good thing is probably a good question but there is no functionnal change here as far as I can see.
Furthermore we still have the checkActions method that do some additional checks and raise an exception if there is some inconsistency. This one is still there.
Ok for putting the missing action in the report, good idea!
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.
Oh... You a right ! So let-s consider the fact that the LF is run even when there is no action something not ideal, but independant from this work....
I'll close that thread when the report is there.