Integrations

SciML Integration

Agent Constructors

AlgebraicAgents.DiffEqAgentType
DiffEqAgent(name, problem[, alg]; observables=nothing, kwargs...)

Initialize DE problem algebraic wrap.

Keywords

  • observables: either nothing or a dictionary which maps keys to observable's positional index in u,
  • other kwargs will be passed to the integrator during initialization step.
source

AlgebraicDynamics.jl Integration

Agent Constructors

AlgebraicAgents.GraphicalAgentType
GraphicalAgent(name, model)

Initialize algebraic wrap of either an AbstractResourceSharer or a AbstractMachine.

The wrapped AbstractResourceSharer or AbstractMachine is stored as the property system.

Examples

GraphicalAgent("rabbit", ContinuousMachine{Float64}(1,1,1, dotr, (u, p, t) -> u))
source

Conversion to DiffEqAgent

AlgebraicAgents.DiffEqAgentMethod
DiffEqAgent(agent::GraphicalAgent, u0, tspan, p; alg, kwargs...)

Infer a problem type parametrized by agent.system, and create an appropriate DEProblem. Moreover, wrap this problem as an instance of DiffEqAgent; this contains agent's inner hierarchy.

Examples

DiffEqAgent(system, u0, tspan, params)
DiffEqAgent(system, u0, tspan, params; alg=Tsit5())
source

Sums

AlgebraicAgents.:⊕Method
⊕(system1, system2; diagram=pattern, name)
⊕([system1, system2]; diagram=pattern, name)
⊕(Dict(:system1 => system1, :system2 => system2); diagram=pattern, name)

Apply oapply(diagram, systems...) and wrap the result as a GraphicalAgent.

source

Agents.jl Integration

The integration can be loaded as:

Agent Constructors

AlgebraicAgents.ABMAgentType
ABMAgent(name, abm; kwargs...)

Initialize ABMAgent, incl. hierarchy of ABM's agents.

Configure the evolutionary step, logging, and step size by keyword arguments below.

Arguments

- any kwarg accepted by `Agents.run!`, incl. `adata`, `mdata`
- `when`, `when_model`: when to collect agents data, model data
true by default, and performs data collection at every step
if an `AbstractVector`, checks if `t ∈ when`; otherwise a function (model, t) -> ::Bool
- `step_size`: how far the step advances, either a float or a function (model, t) -> size::Float64
- `tspan`: solution horizon, defaults to `(0., Inf)`
source

Bindings

AlgebraicAgents.@aMacro
@a operation

Algebraic extension of add_agent!, kill_agent!.

Examples

@a add_agent!(model, 0.5)
@a disentangle!(agent, model)
source