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

Adding (random) IDs for dynamic nodes #22

Open
timziebart opened this issue Apr 1, 2019 · 0 comments
Open

Adding (random) IDs for dynamic nodes #22

timziebart opened this issue Apr 1, 2019 · 0 comments

Comments

@timziebart
Copy link
Member

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant