Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Multilevel networks #149

Open
hexaeder opened this issue Oct 7, 2024 · 0 comments
Open

Feature: Multilevel networks #149

hexaeder opened this issue Oct 7, 2024 · 0 comments

Comments

@hexaeder
Copy link
Member

hexaeder commented Oct 7, 2024

image

Multilayer networks would allow to have multiple "network layers". A network layer is a part of the network with

  • homogenous edge inputs (the outputs of the vertices)
  • homogenous edge output (the inputs for the vertices)
  • homogeneous aggregation function for edge states [1]

For example, a AC network with u_r, u_i as edge inputs and i_r, i_ias edge outputs. Multiple network layers would allow you to define another coupling for a different part of the network, for example a DC network withuas edge inputs andi` as edge outputs.

The node indices are unique and span all network layers. In the example above, both network layers would have 6 vertices and 4 edges. However not every node needs to have a dynamic in both network layers.

Essentially, we'd need to define a layer_membership for every VertexFunction, which would probably default to (1,) for normal vertices. The vertex function interface would have the following form:

f(du, u, esum, p, t) # single membership vertices
f(du, u, esum1, esum2, p, t) # vertex with membership (1, 2)
f(du, u, [esum for esum in membership layers]..., p, t) # general

Additionally, we need to properly define the "public" states. Thus we need something like output_idxs(vertexf, i) which retrieves the indices of the "public"/"output" states for the given edge layer i. For example, a multilayer vertex in a mixed AC/DC network might have the state ordering

[:u_r, :u_i, :u_dc, :x1, :x2, :x3]

Thus output_idx(vf, 1) == 1:2 and output_idx(vf, 2) == 3:3 would retrieve the outputs for layers 1 and 2. The xi states are additional internal states.

I think it should be possible to code everything we need for that in a completely generic way, such that single layer vertices are just a special case of multilayer vertices with layer_membership = (1,). A "standard" NetworkDynamics object would be the same as a multilayer network which happens to have only one layer. This could be hidden for normal users by sensible defaults for layer membership and so on.

[1] Note that this aggregation function prevents us from using multilayer networks for communication purposes. For communication between vertices see #150

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

No branches or pull requests

1 participant