Skip to content

Commit d4c27ff

Browse files
YingboMaAayushSabharwal
authored andcommitted
Fix broken tests
1 parent 7502efe commit d4c27ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Blocks/test_analysis_points.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ closed_loop = ODESystem(connections, t, systems = [model, pid, filt, sensor, r,
206206
name = :closed_loop)
207207

208208
prob = ODEProblem(structural_simplify(closed_loop), Pair[], (0.0, 4.0))
209-
sol = solve(prob, Rodas4())
209+
sol = solve(prob, Rodas5P(), reltol = 1e-6, abstol = 1e-9)
210210
# plot(
211211
# plot(sol, vars = [filt.y, model.inertia1.phi, model.inertia2.phi]),
212212
# plot(sol, vars = [pid.ctr_output.u], title = "Control signal"),
@@ -218,7 +218,7 @@ lsys = ss(matrices...) |> sminreal
218218
@test lsys.nx == 8
219219

220220
stepres = ControlSystemsBase.step(c2d(lsys, 0.001), 4)
221-
@test stepres.y[:]sol(0:0.001:4, idxs = model.inertia2.phi) rtol=1e-4
221+
@test Array(stepres.y[:])Array(sol(0:0.001:4, idxs = model.inertia2.phi)) rtol=1e-4
222222

223223
# plot(stepres, plotx=true, ploty=true, size=(800, 1200), leftmargin=5Plots.mm)
224224
# plot!(sol, vars = [model.inertia2.phi], sp=1, l=:dash)

0 commit comments

Comments
 (0)