Skip to content

[IMPROVEMENT] Add source node when Sn node is parsed in Grid.from_txtΒ #134

@wwadman

Description

@wwadman

Describe the problem

Suppose we create a grid from text with a source node like this:

grid = Grid.from_txt(
    "S1 2",
    "S1 3 link",
    "3 4 transformer"
)

Then source node S1 does not show up in grid.source, which is confusing.

Improvement proposal

I guess the procedure under https://power-grid-model-ds.readthedocs.io/en/stable/examples/model/grid_examples.html#adding-a-source should be when an "Sn" node is found in the Grid.from_txt method?

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