Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Adding (random) IDs for dynamic nodes #22

@timziebart

Description

@timziebart

It is important to be able to distinguish different node instances even if they have the same parameter set. E.g. when using a power grid with 30 nodes and modeling the fall out of a single node, let's choose node 10 here, by reducing this node away, it is currently not possible in general to associate the 29 nodes after the fall out with the correct ones among the 30 nodes before. I.e. In general, it is impossible to identify node 15 in the first case with the node 14 in the second. This can be particularly problematic when plotting the combined solutions.

Currently, two nodes with the same parameter set are literally the same:

julia> construct_node_dynamics(SwingEqLVS(H=1., P=-1, D=1, Ω=50, Γ=20, V=1)) === construct_node_dynamics(SwingEqLVS(H=1., P=-1, D=1, Ω=50, Γ=20, V=1))
true

In order to distinguish dynamic nodes, I suggest to use IDs. That way one doesn't have to do the difficult counting from before but can simply use the comparison operator ==.

I would implement that simply by adding a field id to all subtypes of AbstractNodeParameters.

Opinions?

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