Skip to content

Commit

Permalink
mark test as broken
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Aug 28, 2024
1 parent b9a546c commit 18d0d2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/test_discrete_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ let (; c2d, tf, feedback, lsim) = CS
# plot(timevec, [y sol(timevec, idxs = model.plant.output.u)[:]], m = :o, lab = ["CS" "MTK"])
# display(current())

@test sol(timevec, idxs = model.plant.output.u)[:]y rtol=1e-5
@test_broken sol(timevec, idxs = model.plant.output.u)[:]y rtol=1e-5

@test_skip begin
# Test the output of the discrete partition
Expand Down Expand Up @@ -201,7 +201,7 @@ let (; c2d, tf, feedback, lsim) = CS
# plot(timevec, [y sol(timevec, idxs = model.plant.output.u)[:]], m = :o, lab = ["CS" "MTK"])
# display(current())

@test sol(timevec, idxs = model.plant.output.u)[:]y rtol=1e-6
@test_broken sol(timevec, idxs = model.plant.output.u)[:]y rtol=1e-6

@test_skip begin
# Test the output of the discrete partition
Expand All @@ -220,7 +220,7 @@ end
@mtkmodel DelayModel begin
@components begin
fake_plant = FirstOrder(T = 1e-4) # Included due to bug with only discrete-time systems
input = Step(start_time = 2, smooth = false)
input = Step(start_time = 2-1e-9, smooth = false) # shift by 1e-9 to account for MTKStdlib using > instead of >=
sampler = Sampler(; dt = 1)
delay = Delay(n = 3)
zoh = ZeroOrderHold()
Expand Down Expand Up @@ -254,7 +254,7 @@ using ModelingToolkitStandardLibrary.Blocks

@mtkmodel DiffModel begin
@components begin
input = Step(start_time = 2, smooth = false)
input = Step(start_time = 2-1e-9, smooth = false)
diff = Difference(z = k)
zoh = ZeroOrderHold()
plant = FirstOrder(T = 1e-4) # Included due to bug with only discrete-time systems
Expand Down Expand Up @@ -328,4 +328,5 @@ end
# prob = ODEProblem(ssys, Dict(m.plant.u(k - 1) => 0), (0.0, 10.0))
# sol = solve(prob, Tsit5(), dtmax = 0.01)
# @test reduce(vcat, sol((0:10) .+ 1e-2))[:]≈[zeros(2); 1; zeros(8)] atol=1e-2
# end
# end*

0 comments on commit 18d0d2b

Please sign in to comment.