Skip to content

Commit

Permalink
test: fix DiscreteProblem initialization in mtk-remake tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jun 7, 2024
1 parent 88dd51e commit b1c999f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/downstream/modelingtoolkit_remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ k = ShiftIndex(t)
# Roundabout method to avoid having to specify values for previous timestep
fn = DiscreteFunction(discsys)
ps = ModelingToolkit.MTKParameters(discsys, p)
discu0 = Dict([u0..., x(k-1) => 0.0, y(k-1) => 0.0, z(k-1) => 0.0])
push!(syss, discsys)
push!(probs, DiscreteProblem(fn, [1.0, 0.0, 0.0, 0.0, 0.0, 0.0], (0, 10), ps))
push!(probs, DiscreteProblem(fn, getindex.((discu0,), unknowns(discsys)), (0, 10), ps))

for (sys, prob) in zip(syss, probs)
@test parameter_values(prob) isa ModelingToolkit.MTKParameters
Expand Down

0 comments on commit b1c999f

Please sign in to comment.