-
Notifications
You must be signed in to change notification settings - Fork 6
Description
It would be nice to be able to easily visualize the grid after updates have been performed to the PGM input data.
Currently, if I have some PGM input_data, I can easily visualize it by doing (assume correct imports for the sake of the discussion):
pgm_interface = PowerGridModelInterface(input_data=input_data)
input_grid = pgm_interface.create_grid_from_input_data()
visualize(input_grid)
This works fine, but sometimes we also want to be able to visualize a single update or multiple scenarios in a batch update, as it can help easily debug or go through an "evolving" grid, which isn't supported at the moment. Furthermore, because internally you make a copy of the input_data for the pgm_interface, not even doing permanent updates helps:
pgm_interface.update_model(single_scenario_update_data) # permanent update
updated_grid = pgm_interface.create_grid_from_input_data() # this modifies the internal pgm input_data, not your own copy
visualize(updated_grid) # the resulting visualization is the same as if we did visualize(input_grid)
This then makes it more difficult for the user, as I have to hack in ways to visualize the updated data.
A quick hack, which may serve as inspiration, is to use the "private" helper function in PGM:
from power_grid_model.validation.utils import _update_input_data
_update_input_data(input_data=input_data, update_data=some_update_data)
which I can now use to visualize different sets of updates.
Even though this hack works, _update_input_data is not intended to be used by users, hence this feature would be a nice to have and that function can serve as inspiration.
In summary, I am asking for a feature to be able to (possibly in an interactive way) visualize multiple scenarios without having to "hack" something in.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status