Skip to content

[IMPROVEMENT] Remove hardcoded list of pgm arrays #112

@vincentkoppen

Description

@vincentkoppen

Describe the problem

Currently we use a hardcoded list to determine which arrays to convert.
Instead it would be nice if we loop over ComponentType from PGM and use these to get the arrays.

Current implementation:

PGM_ARRAYS = [
"node",
"line",
"link",
"transformer",
"three_winding_transformer",
"sym_load",
"sym_gen",
"source",
"transformer_tap_regulator",
"sym_power_sensor",
"sym_voltage_sensor",
"asym_voltage_sensor",
]

The enum from PGM:

https://github.com/PowerGridModel/power-grid-model/blob/a9e3d3c24f6ce03c4a69525a232476ccdc97b421/src/power_grid_model/_core/dataset_definitions.py#L46-L76

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprovement on internal implementation

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions