-
Notifications
You must be signed in to change notification settings - Fork 49
Multi-dimensional batch calculation: list of update batch dataset as a cartesian product #1201
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
|
@mgovers @figueroa1395 @nitbharambe, The main part is almost finished. We still need to add general documentation and some notebook examples. I propose one of you to add this. This make sure we actually have the same understanding about how cartesian product of MD batch calculation works. |
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp
Show resolved
Hide resolved
power_grid_model_c/power_grid_model_c/include/power_grid_model_c/model.h
Outdated
Show resolved
Hide resolved
…_c/model.h Co-authored-by: Martijn Govers <martijn.govers@alliander.com> Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Good idea. I can probably pick this up. I'll bring it to Peter today so we allocate some time for it. Edit: No further comments from me. It looks good to me at this stage besides the additional stuff you pointed out. I would only also silence the Sonar Cloud warnings as I deem them false positives. |
power_grid_model_c/power_grid_model_c/include/power_grid_model_c/dataset.h
Outdated
Show resolved
Hide resolved
| } // namespace | ||
|
|
||
| // run calculation | ||
| void PGM_calculate(PGM_Handle* handle, PGM_PowerGridModel* model, PGM_Options const* opt, |
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 we sure that we want to do this logic here and not in the C++ job dispatch where it's easier to test and also better multi-thread-able? E.g. we could only create separate threads for the outermost dimensions.
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 can think about this kind of refactor/optimization in later stage. The C-API will not be affected.
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.
however, this is one of those things in which it's hard to refactor at a later stage. i'd much rather refactor now to ensure that we design for change.
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 do not think it is difficult to refactor in later stage. The current implementation is pretty separated in the C-API files. If we decide to migrate this into the core, we can just reset this change to the old C-API file and implement the MD batch in the core.
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.
then isn't it easier to do the migration now? we of course don't need to fully support the multi threading thing i thought of, but why not put it in the right location from the start?
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 have a working implementation now and well-defined user-API. I think the priority should be releasing this fast to the user and hear user experience feedback, before we do another round of internal refactoring.
At a later stage, if and how we are going to refactor this will depend on user business case.
power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp
Show resolved
Hide resolved
Co-authored-by: Martijn Govers <martijn.govers@alliander.com> Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
…_c/dataset.h Co-authored-by: Martijn Govers <martijn.govers@alliander.com> Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Co-authored-by: Martijn Govers <martijn.govers@alliander.com> Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
@TonyXiang8787 I can pick this up whenever you give me the green light and finish it off. |
@figueroa1395 it's ready now. So go ahead. |
|



Closes #1176
Let user to provide a list of update batch datasets, which are used as cartesian product to produce a multi-dimentional batch calculation.
The implementation is a cartesian product over a linked list.
check list