NonlinearSystem

System Constructors

ModelingToolkit.NonlinearSystemType
struct NonlinearSystem <: ModelingToolkit.AbstractSystem

A nonlinear system of equations.

Fields

  • eqs

    Vector of equations defining the system.

  • states

    Unknown variables.

  • ps

    Parameters.

  • pins

  • observed

  • name

    Name: the name of the system

  • systems

    systems: The internal systems

Examples

@variables x y z
@parameters σ ρ β

eqs = [0 ~ σ*(y-x),
       0 ~ x*(ρ-z)-y,
       0 ~ x*y - β*z]
ns = NonlinearSystem(eqs, [x,y,z],[σ,ρ,β])
source

Composition and Accessor Functions

  • sys.eqs or equations(sys): The equations that define the nonlinear system.
  • sys.states or states(sys): The set of states in the nonlinear system.
  • sys.parameters or parameters(sys): The parameters of the nonlinear system.

Transformations

Applicable Calculation and Generation Functions

calculate_jacobian
generate_jacobian
jacobian_sparsity

Problem Constructors

DiffEqBase.NonlinearProblemType
function DiffEqBase.NonlinearProblem{iip}(sys::NonlinearSystem,u0map,tspan,
                                          parammap=DiffEqBase.NullParameters();
                                          jac = false, sparse=false,
                                          checkbounds = false,
                                          linenumbers = true, parallel=SerialForm(),
                                          kwargs...) where iip

Generates an NonlinearProblem from a NonlinearSystem and allows for automatically symbolically calculating numerical enhancements.

source