You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request essential for your project?
Not essential, but would serve to improve the workflow of multiple different projects.
Describe the workflow you want to enable
I wish I could check whether a Grid object that is being loaded from outside of PowerSimData code (e.g. from a matfile, from a set of CSVs, or from another source) is internally consistent and contains all required information. By 'internally consistent', I mean:
Every bus is connected to at least one branch or DC line.
Every bus ID that is present in the branch, plant, or DC line tables should be present in the bus table.
Every bus should be present in the bus2sub table.
AC lines should only connect between buses of the same voltage, within the same interconnect.
Transformers should only connect between buses within the same substation.
Interpreting the AC branches as edges of a graph, there should be exactly one connected component per interconnection.
The plant and gencost tables should have identical indices.
etc.
Describe your proposed implementation
There should be a new function that takes a Grid object as input, and raises a ValueError if any of the internal consistency checks fails.
Additional context
This project would serve the validation of new grid models (so that we can tell that there is a problem before sending the grid and profiles to the simulation engine) as well as interpreting results from tools besides production cost models (e.g. a capacity expansion model run).
The text was updated successfully, but these errors were encountered:
How far should we go? Do we want to make sure first that the complete set of CSVs is available and that each of them has the right number of columns and the columns have the right name/type? I could see having a module in powersimdata.network that accomplishes this job and a module in powersimdata.input that goes through the consistency check you listed.
How far should we go? Do we want to make sure first that the complete set of CSVs is available and that each of them has the right number of columns and the columns have the right name/type? I could see having a module in powersimdata.network that accomplishes this job and a module in powersimdata.input that goes through the consistency check you listed.
For this particular feature, I'm envisioning a check on the object itself, which could come from CSVs or elsewhere. I agree that we should also check for the presence of all required attributes and all required columns in each data frame. I think it could also be useful to have a check on a folder of CSVs, to ensure that all the required files are present with the right columns.
I think I remember going through some code recently and thinking that we've got lists of column names scattered throughout the codebase, and I think as part of this effort we could decide on one place to have them, and refactor all other places to point to the single source of truth.
🚀
Not essential, but would serve to improve the workflow of multiple different projects.
Describe the workflow you want to enable
I wish I could check whether a Grid object that is being loaded from outside of PowerSimData code (e.g. from a matfile, from a set of CSVs, or from another source) is internally consistent and contains all required information. By 'internally consistent', I mean:
bus2sub
table.Describe your proposed implementation
There should be a new function that takes a Grid object as input, and raises a ValueError if any of the internal consistency checks fails.
Additional context
This project would serve the validation of new grid models (so that we can tell that there is a problem before sending the grid and profiles to the simulation engine) as well as interpreting results from tools besides production cost models (e.g. a capacity expansion model run).
The text was updated successfully, but these errors were encountered: