You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reading the docs for ODESystem, I am somewhat puzzled by the use of the term parameter for time t. In the "hello world" example
using ModelingToolkit
@parameters t σ ρ β
@variablesx(t) y(t) z(t)
@derivatives D'~t
eqs = [D(x) ~ σ*(y-x),
D(y) ~ x*(ρ-z)-y,
D(z) ~ x*y - β*z]
de =ODESystem(eqs,t,[x,y,z],[σ,ρ,β])
the time t is defined as a parameter (using @parameter), and yet in the documentation for ODESystem(), the second input argument is named as
iv independent variable.
Do I understand it correctly that we use @parameters for true "physical" parameters (such as σ, ρ, β that do not change during simulation) AND the independent variable (perhaps mostly time t in ODEs), and we use @variables for the dependent variables (functions of the independent variable)?
EDIT: Now I see that the independent variable (time) t is cast as a variable in the section on Derivatives.
@variables t
@derivatives D'~t
This is indeed somewhat confusing. Many thanks for clarification.
The text was updated successfully, but these errors were encountered:
t can be a variable. It's just for the automated system definition, i.e. de = ODESystem(eqs), and could possibly be removed since it's one of the archaic things that hasn't really added much value in any recent versions.
Reading the docs for ODESystem, I am somewhat puzzled by the use of the term
parameter
for timet
. In the "hello world" examplethe time
t
is defined as a parameter (using@parameter
), and yet in the documentation forODESystem()
, the second input argument is named asDo I understand it correctly that we use
@parameters
for true "physical" parameters (such asσ, ρ, β
that do not change during simulation) AND the independent variable (perhaps mostly timet
in ODEs), and we use@variables
for the dependent variables (functions of the independent variable)?EDIT: Now I see that the independent variable (time)
t
is cast as a variable in the section on Derivatives.This is indeed somewhat confusing. Many thanks for clarification.
The text was updated successfully, but these errors were encountered: