Skip to content

Commit 6846bba

Browse files
authored
Merge pull request #268 from SciML/myb/fix
Fix CI
2 parents 8abd6d7 + 767b637 commit 6846bba

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Blocks/continuous.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,10 @@ See also [`StateSpace`](@ref) which handles MIMO systems, as well as [ControlSys
626626
if nx == 0
627627
eqs = [y ~ d * u]
628628
else
629-
eqs = [D(x_scaled[1]) ~ (-a[2:na]'x_scaled + a_end * u) / a[1]
630-
D.(x_scaled[2:nx]) .~ x_scaled[1:(nx - 1)]
631-
y ~ ((bb[2:na] - d * a[2:na])'x_scaled) / a_end + d * u
632-
x .~ x_scaled ./ a_end]
629+
eqs = Equation[D(x_scaled[1]) ~ (-a[2:na]'x_scaled + a_end * u) / a[1]
630+
D.(x_scaled[2:nx]) .~ x_scaled[1:(nx - 1)]
631+
y ~ ((bb[2:na] - d * a[2:na])'x_scaled) / a_end + d * u
632+
x .~ x_scaled ./ a_end]
633633
end
634634
push!(eqs, input.u ~ u)
635635
push!(eqs, output.u ~ y)

test/Blocks/test_analysis_points.jl

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

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

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

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

0 commit comments

Comments
 (0)