Library
Public Interface
The following functions are designed for public use
NetworkDynamics.DDEVertexNetworkDynamics.ODEEdgeNetworkDynamics.ODEVertexNetworkDynamics.StaticDelayEdgeNetworkDynamics.StaticEdgeNetworkDynamics.StaticVertexNetworkDynamics.idx_containingNetworkDynamics.network_dynamicsNetworkDynamics.sum_coupling!NetworkDynamics.syms_containing
NetworkDynamics.network_dynamics — Functionnetwork_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.
NetworkDynamics.StaticVertex — FunctionStaticVertex(; 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) -> nothingHere 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.
NetworkDynamics.ODEVertex — TypeODEVertex(; 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) -> nothingHere 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.
NetworkDynamics.DDEVertex — TypeDDEVertex(; 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) -> nothingHere 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.
dimis the number of independent variables in the edge equations andsymis an array of symbols for these variables.couplingis a Symbol describing if the EdgeFunction is intended for a directed graph (:directed) or for an undirected graph ({:undirected, :fiducial}).:directedis intended for directed graphs.:undirectedis 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.:fiduciallets 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_matrixis an optional argument that defaults to the identity matrixI. If a mass matrix M is given the systemM * de = fwill be solved.
For more details see the documentation.
NetworkDynamics.StaticEdge — TypeStaticEdge(; 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) -> nothingHere 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.
dimis the number of independent variables in the edge equations andsymis an array of symbols for these variables.couplingis a Symbol describing if the EdgeFunction is intended for a directed graph (:directed) or for an undirected graph ({:undirected, :symmetric, :antisymmetric, :fiducial}).:directedis intended for directed graphs.:undirectedis 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.:symmetricand:antisymmetrictrigger performance optimizations, iff!has that symmetry property.:fiduciallets 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.
NetworkDynamics.ODEEdge — TypeODEEdge(; 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) -> nothingHere 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.
NetworkDynamics.StaticDelayEdge — TypeStaticDilayEdge(; 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.
NetworkDynamics.syms_containing — Functionsyms_containing(nd, expr)Find all symbols present in a network_dynamics that contain the string, regex or symbol expr.
NetworkDynamics.idx_containing — Functionidx_containing(nd, expr)Find all indices of variables with symbols containing the string, regex or symbol expr
NetworkDynamics.sum_coupling! — Functionsum_coupling!(e_sum, dst_edges)A small utility function for writing diffusion dynamics. It provides the sum of all incoming edges.