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 LightGraph.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.
  • coupling is a Symbol describing if the EdgeFunction is intended for a directed graph (:directed) or for an undirected graph ({:undirected, :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. :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.
  • 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, 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.

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