mesmo-dev / mesmo

MESMO - Multi-Energy System Modeling and Optimization
https://mesmo-dev.github.io/mesmo
MIT License
44 stars 11 forks source link

Raise errors for invalid scenario definitions #7

Open stroitzsch opened 3 years ago

stroitzsch commented 3 years ago

Introduce checks in data_interface such that definition issues are caught early and raise clear error messages.

Typical issues (Please add / edit):

stroitzsch commented 3 years ago

@tomschelo @cdesmond - I'll need your feedback here, since you have some experiences in defining FLEDGE scenarios! I believe you can edit directly the list above. @cdesmond @j-pang - This will be a good issue where I could use your help!

tomschelo commented 3 years ago

3-phase vs. symmetric 1-phase equivalent --> check if is_single_phase_equivalent is set to '0' / False, then all necessary data (line_type_matrices) must be available.

For isolated nodes, lines, etc. it might make sense to use the networkX package, it supports wide range of graph analysis. In plots.py, electric_grid_model is already transformed to a networkX graph object, so it should be easy.

I believe your list is already quite good, I actually cannot think of another error currently, but I will pay attention in the future.

What could also help debugging a scenario is in the end of a simulation printing a short summary to the console:

--> This will help to make sure that the user did not mix up anything, as there are so many parameters that can be manipulated.