Herman Sletmoen
Herman Sletmoen
Thanks! You are right. Making it a parameter makes everything work as expected: ```julia using ModelingToolkit using DifferentialEquations @parameters T D = Differential(T) # only difference from first example @variables...
I also want this. Here is a hacky solution I have cooked up: ```julia using ModelingToolkit using ModelingToolkit: t_nounits as t # transform a system with a function f while...
Thanks! For future reference, after https://github.com/SciML/ModelingToolkit.jl/pull/2995, evaluating the spline directly works great: ```julia using Test using ModelingToolkit using ModelingToolkit: t_nounits as t, D_nounits as D using DifferentialEquations using DataInterpolations ts...
Not quite, unfortunately. Doing ```julia using Test, ModelingToolkit, DifferentialEquations, DataInterpolations using ModelingToolkit: t_nounits as t, D_nounits as D ts = 0.0:0.1:1.0 Fspline_t² = CubicSpline(ts .^ 2, ts) # spline for...
Actually, this works 100%: ```julia using Test, ModelingToolkit, DifferentialEquations, DataInterpolations using ModelingToolkit: t_nounits as t, D_nounits as D ts = 0.0:0.1:1.0 Fspline_t² = CubicSpline(ts .^ 2, ts) # spline for...
More fundamentally, it is not possible to *make* (not remake) an `ODEProblem` with defaults involving the independent parameter: ```julia using ModelingToolkit using ModelingToolkit: t_nounits as t, D_nounits as D using...
I would expect ```julia prob = remake(oprob; u0 = [X => 2.0], use_defaults = true) @assert prob.ps[d] == 2.0 ``` to do what the original example tries to do. I'm...
Maybe I am missing something, but is there a common need for `parameter_dependencies`? Is not its use case already covered entirely by `defaults`? A system consists of a set of...
Regarding @TorkelE's example with ```julia oprob.ps[X0] = 3.0 # with default X = X0, should now oprob[X] == 3.0? ``` vs. ```julia oprob = remake(oprob; p = [X0 => 3.0],...
Thank you! I did not think of that use, and this clears up all my confusion. For reference, it sounds to me like the TL;DR of this thread is: *...