Skip to content

[FEATURE] Allow creating an ExtendedGrid directly from an existing base Grid #226

@juliettegiraud-2004

Description

@juliettegiraud-2004

Hello everyone!

Today, PowerGridModelInterface.create_grid_from_input_data() creates a base Grid from PGM input data (standard conversion step from the Power Grid Model engine input into a PGM‑DS Grid).

In many workflows, we want to work with an extended grid (Extended_Grid(Grid)) to add specific attributes (for example an extended LinkArray with a field like link_type) while keeping the rest of the grid unchanged. The documentation shows that PGM‑DS is explicitly designed to support grid extensions by subclassing arrays and the Grid dataclass.

However, from what I’ve understood, starting from a base Grid produced by create_grid_from_input_data() and converting it into an Extended_Grid is currently not implemented, and thus requires manually reconstructing / appending many arrays one-by-one. Having a direct base→extended conversion would avoid manual reconstruction and makes these workflows much easier to implement correctly.

What would be great is a built-in way to take the base Grid created from PGM input data and then promote/extend it into an Extended_Grid by only providing the extended parts, e.g. only node/line/link replaced by Node_Extended_Array, Line_Extended_Array, Link_Extended_Array, while all other component arrays (transformers, loads, sensors, etc.) are reused as-is.

Maybe it exists such functions but I haven't found them, so if you have more informations it would be great!

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions