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
It would be very nice of one could initialize t from an unknown, observed or parameter in the initialization system, just like one can already do for other variables:
using ModelingToolkit, Test
using ModelingToolkit: t_nounits as t, D_nounits as D
@variablesx(t)
@named sys =ODESystem([D(x) ~0.0], t; defaults = [t =>1/x])
sys =structural_simplify(sys)
prob =ODEProblem(sys, [x =>2.0], (NaN, 1.0), [])
@testsolve(prob).t[begin] ≈0.5
prob2 =remake(prob; u0 = [x =>4.0])
@testsolve(prob2).t[begin] ≈0.25
The text was updated successfully, but these errors were encountered:
It would be very nice of one could initialize
t
from an unknown, observed or parameter in the initialization system, just like one can already do for other variables:The text was updated successfully, but these errors were encountered: