Library

Public Interface

The following functions are designed for public use

NetworkDynamics.network_dynamicsFunction
network_dynamics(vertices!, edges!, g; parallel = false)

Assembles the the dynamical equations of the network problem into an ODEFunction compatible with the DifferentialEquations.jl solvers. Takes as arguments an array of VertexFunctions vertices!, an array of EdgeFunctions edges! and a Graphs.jl object g. The optional argument parallel is a boolean value that denotes if the central loop should be executed in parallel with the number of threads set by the environment variable JULIA_NUM_THREADS.

source
NetworkDynamics.StaticVertexFunction
StaticVertex(; f, dim, sym)

Wrapper for ODEVertex with 0 mass matrix, i.e. static behaviour / algebraic constraint in mass matrix form.

f describes the local behaviour at a static node and has to respect the following calling syntax

f(v, edges, p, t) -> nothing

Here v, p and t are the usual arguments, while edges is an arrays containing the edges for which the described vertex is the destination (in-edges for directed graphs).

dim is the number of independent variables in the vertex equations and sym is an array of symbols for these variables.

For more details see the documentation.

source
NetworkDynamics.ODEVertexType
ODEVertex(; f, dim, mass_matrix, sym)

Wrapper that ensures compatibility of a mutating function f with the key constructor network_dynamics.

f describes the local behaviour at a dynamic node and has to respect the following calling syntax

f(dv, v, edges, p, t) -> nothing

Here dv, v, p and t are the usual ODE arguments, while edges is an Array containing the edges for which the vertex is the destination (in-edges for directed graphs).

dim is the number of independent variables in the vertex equations and sym is an array of symbols for these variables. mass_matrix is an optional argument that defaults to the identity matrix I. If a mass matrix M is given the system M * dv = f will be solved.

For more details see the documentation.

source
NetworkDynamics.DDEVertexType
DDEVertex(; f, dim, mass_matrix, sym)

Wrapper that ensures compatibility of a mutating function f with the key constructor network_dynamics.

f describes the local behaviour at a dynamic node and has to respect the following calling syntax

f(dv, v, edges, h, p, t) -> nothing

Here dv, v, p and t are the usual ODE arguments, while edges is an Arry of incoming edges. h is the history array for v.

  • dim is the number of independent variables in the edge equations and
  • sym is an array of symbols for these variables.
  • mass_matrix is an optional argument that defaults to the identity matrix I. If a mass matrix M is given the system M * de = f will be solved.

For more details see the documentation.

source
NetworkDynamics.StaticEdgeType
StaticEdge(; f, dim, coupling, sym)

Wrapper that ensures compatibility of a mutating function f with the key constructor network_dynamics.

f describes the local behaviour at a static edge and has to respect the following calling syntax

f(e, v_s, v_t, p, t) -> nothing

Here e, p and t are the usual arguments, while v_s and v_d are arrays containing the vertices which are the source and destination of the described edge.

  • dim is the number of independent variables in the edge equations and
  • sym is an array of symbols for these variables.
  • coupling is a Symbol describing if the EdgeFunction is intended for a directed graph (:directed) or for an undirected graph ({:undirected, :symmetric, :antisymmetric, :fiducial}). :directed is intended for directed graphs. :undirected is the default option and is only compatible with SimpleGraph. In this case f should specify the coupling from a source vertex to a destination vertex. :symmetric and :antisymmetric trigger performance optimizations, if f has that symmetry property. :fiducial lets the user specify both the coupling from src to dst, as well as the coupling from dst to src and is intended for advanced users, i.e. the edge gets passed a vector of 2dim edge states, where the first dim elements will be presented to the dst and the second dim elements will be presented to src,

For more details see the documentation.

source
NetworkDynamics.ODEEdgeType
ODEEdge(; f, dim, mass_matrix, sym)

Wrapper that ensures compatibility of a mutating function f with the key constructor network_dynamics.

f describes the local behaviour at a dynamic edge and has to respect the following calling syntax

f(de, e, v_s, v_t, p, t) -> nothing

Here de, e, p and t are the usual arguments, while v_s and v_d are arrays containing the vertices which are the source and destination of the described edge.

dim is the number of independent variables in the edge equations and sym is an array of symbols for these variables. For more details see the documentation. mass_matrix is an optional argument that defaults to the identity matrix I. If a mass matrix M is given the system M * de = f will be solved.

For more details see the documentation.

source
NetworkDynamics.StaticDelayEdgeType
StaticDelayEdge(; f, dim, coupling, sym)

Like a static edge but with extra arguments for the history of the source and destination vertices. This is NOT a DDEEdge.

source
NetworkDynamics.sum_coupling!Function
sum_coupling!(e_sum, dst_edges)

A small utility function for writing diffusion dynamics. It provides the sum of all incoming edges.

source