Setting parameters for `ReachabilityAnalysis`'s `@ivp`

I see in documentation for ReachabilityAnalysis that parameters are typically set in a function, as is the case in the duffing oscillator example. I’m working with a system where the ODEFunction was automatically generated with ModelingToolkit, so I didn’t “write” my ODEFunction. Can I somehow set the parameters in the @ivp with something like @ivp(..., p=[1,2,3])?

1 Like

That functionality that you mention, about hooking MTK generated functions with JuliaReach, is not implemented.

The @ivp macro cannot handle the params arg as you tried (seems like a good idea). But it is possible to pass params vectors through the solve function like this:

@taylorize function duffing2!(du, u, p, t)
    α, β, γ, δ = p
    x, v = u
    f = γ * cos(ω * t)
    du[1] = u[2]
    du[2] = - α*x - δ*v - β*x^3 + f
# ...
sol = solve(prob, T=10.0, alg=TMJets21a(), params=(-1.0, 1.0, 0.3, 0.37))