-
Couldn't load subscription status.
- Fork 15
Description
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) # generalAdditionally, 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
