-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
featureNew feature or requestNew feature or request
Description
Considering I have a topology from power-grid-model in a dictionary, as from the power-grid-model-example below, I would like to have a simple interface/function to convert this to pgm-ds array objects. This would simplify the process of importing pgm topologies into pgm-ds.
Given the example below, the function should convert it to a dictionary of pgm-ds array objects. Optionally also supporting extension arrays if users have their own array objects.
I am happy to contribute to the implementation if needed.
from power_grid_model import ComponentType
from power_grid_model_ds import NodeArray, LineArray, LinkArray, TransformerArray, SourceArray
# PGM-topology
input_data = {
ComponentType.node: node,
ComponentType.line: line,
ComponentType.sym_load: sym_load,
ComponentType.source: source,
}
topology_pgm_ds = pgm_2_pgm_ds_converter(input_data, ...)
# PGM-DS topology
topology_pgm_ds = {
"node": NodeArray,
"line": LineArray,
"link": LinkArray,
"transformer": TransformerArray,
"source": SourceArray,
}
jaapschoutenalliander
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request