Skip to content

Commit

Permalink
test: test initial values dependent on constants
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Oct 14, 2024
1 parent 486ae04 commit 34a8c8e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/constants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,16 @@ eqs = [D(x) ~ β]
simp = structural_simplify(sys)

@test isempty(MT.collect_constants(nothing))

@testset "Issue#3044" begin
@constants h = 1
@parameters τ = 0.5 * h
@variables x(t) = h
eqs = [D(x) ~ (h - x) / τ]

@mtkbuild fol_model = ODESystem(eqs, t)

prob = ODEProblem(fol_model, [], (0.0, 10.0))
@test prob[x] 1
@test prob.ps[τ] 0.5
end

0 comments on commit 34a8c8e

Please sign in to comment.