PowerGridModel/power-grid-model

[FEATURE] Output buffer size/shape check

Opened this issue · 0 comments

Issue

When adding a buffer to output dataset during batch calculations, users can misuse/abuse the fact that there is no additional check between the user indicated output shape and the actual output shape. For example, in a pf calculation for 10 nodes with batch size 4, the user can add a buffer of 1x10, instead of 4x10. In return, only the first 10 nodes (from the first batch) will be filled to the buffer.

Possible solution

In the main core, functionalities should be put in place to verify whether both shapes match. In case of a smaller buffer being provided, warnings should be given clearly stating that the output result is in-complete. In the case of the opposite, message should be communicated accordingly that provided buffer is more than necessary.