Skip to content

Commit a08e4dd

Browse files
test: fix remake tests for time-independent value providers
1 parent 0f1d47f commit a08e4dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/remake_tests.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ u0 = [1.0; 2.0; 3.0]
1515
tspan = (0.0, 100.0)
1616
p = [10.0, 20.0, 30.0]
1717
sys = SymbolCache([:x, :y, :z], [:a, :b, :c], :t)
18+
indep_sys = SymbolCache([:x, :y, :z], [:a, :b, :c])
1819
fn = ODEFunction(lorenz!; sys)
1920
for T in containerTypes
2021
push!(probs, ODEProblem(fn, u0, tspan, T(p)))
@@ -64,7 +65,7 @@ function loss(x, p)
6465
return sum(du)
6566
end
6667

67-
fn = OptimizationFunction(loss; sys)
68+
fn = OptimizationFunction(loss; sys = indep_sys)
6869
for T in containerTypes
6970
push!(probs, OptimizationProblem(fn, u0, T(p)))
7071
end
@@ -73,7 +74,7 @@ function nllorenz!(du, u, p)
7374
lorenz!(du, u, p, 0.0)
7475
end
7576

76-
fn = NonlinearFunction(nllorenz!; sys)
77+
fn = NonlinearFunction(nllorenz!; sys = indep_sys)
7778
for T in containerTypes
7879
push!(probs, NonlinearProblem(fn, u0, T(p)))
7980
end

0 commit comments

Comments
 (0)