We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75fd953 commit 6d98bffCopy full SHA for 6d98bff
test/split_parameters.jl
@@ -6,6 +6,7 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
6
using ModelingToolkit: MTKParameters, ParameterIndex, NONNUMERIC_PORTION
7
using SciMLStructures: Tunable, Discrete, Constants
8
using StaticArrays: SizedVector
9
+using SymbolicIndexingInterface: is_parameter
10
11
x = [1, 2.0, false, [1, 2, 3], Parameter(1.0)]
12
@@ -229,11 +230,13 @@ end
229
230
@mtkbuild sys = ODESystem(D(x) ~ fn(x), t, [x], [fn])
231
@test is_parameter(sys, fn)
232
@test ModelingToolkit.defaults(sys)[fn] == _f1
233
+
234
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0))
235
@test_broken @inferred prob.ps[fn]
236
@test_broken @inferred prob.f(prob.u0, prob.p, prob.tspan[1])
237
sol = solve(prob; abstol = 1e-10, reltol = 1e-10)
238
@test sol.u[end][] ≈ exp(2.0)
239
240
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0), [fn => Foo()])
241
242
0 commit comments