Skip to content

[FEATURE] import topology to pgm-ds arrays from dictonary of pgm ComponentTypeΒ #27

@Bramtimm

Description

@Bramtimm

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,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions