These accessors include the contributions of all subsystems, namespaced
by the subsystem names, as the functions of the same names in
ModelingToolkit. *_toplevel variants return only the system's own
entries. For a system returned by mtkcompile(), unknowns() are the
states that remain after simplification and observed() gives the
eliminated variables.
Usage
equations(sys)
equations_toplevel(sys)
unknowns(sys)
unknowns_toplevel(sys)
parameters_toplevel(sys)
observed(sys)
observables(sys)
independent_variables(sys)
initialization_equations(sys)
full_equations(sys)
costs(sys)
cost(sys)
constraints(sys)
jumps(sys)
inputs(sys)
outputs(sys)
assertions(sys)
diff_equations(sys)
alg_equations(sys)
has_diff_equations(sys)
has_alg_equations(sys)
get_diff_eqs(sys)
get_alg_eqs(sys)
has_diff_eqs(sys)
has_alg_eqs(sys)Examples
t <- t_nounits; D <- D_nounits
variables("x(t)"); parameters("k")
sys <- System(list(D(x) ~ -k * x), t, name = "decay")
equations(sys); unknowns(sys); parameters(sys)
#> [[1]]
#> Derivative(x(t), t) ~ -k*x(t)
#>
#> [[1]]
#> x(t)
#>
#> [[1]]
#> k
#>