Skip to content

Commit ca1f389

Browse files
test: test initialization for unsimplified systems
1 parent 4724540 commit ca1f389

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/initializationsystem.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,3 +1354,10 @@ end
13541354
@test final_x(0.3) 0.8 # should be 0.8
13551355
@test ForwardDiff.derivative(final_x, 0.3) 1.0
13561356
end
1357+
1358+
@testset "Issue#3330: Initialization for unsimplified systems" begin
1359+
@variables x(t) [guess = 1.0]
1360+
@mtkbuild sys = ODESystem(D(x) ~ x, t; initialization_eqs = [x^2 ~ 4])
1361+
prob = ODEProblem(sys, [], (0.0, 1.0))
1362+
@test prob.f.initialization_data !== nothing
1363+
end

0 commit comments

Comments
 (0)