Skip to content

Commit 5f594d5

Browse files
Merge pull request #4503 from SciML/as/downstream-ci-reproducibility
test: make linearization DD test more robust
2 parents 95e9bff + ad9131e commit 5f594d5

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

test/downstream/linearization_dd.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import NonlinearSolve
1212
using Setfield: @set
1313

1414
using ControlSystemsMTK
15+
using ControlSystemsBase
1516
using ControlSystemsMTK.ControlSystemsBase: sminreal, minreal, poles
17+
using OrdinaryDiffEq
1618
connect = ModelingToolkit.connect
1719

1820
function rm_bindings(sys)
@@ -70,11 +72,11 @@ lsyss,
7072
allow_input_derivatives = true, allow_symbolic = true,
7173
)
7274

75+
integ = init(lin_fun.prob, Rodas5P())
76+
7377
lsyss2 = (;
74-
A = lin_fun.prob[lsyss.A], B = lin_fun.prob[lsyss.B],
75-
C = lin_fun.prob[lsyss.C], D = lin_fun.prob[lsyss.D],
78+
A = integ[lsyss.A], B = integ[lsyss.B],
79+
C = integ[lsyss.C], D = integ[lsyss.D],
7680
)
77-
@test lsyss2.A lsys.A
78-
@test lsyss2.B lsys.B
79-
@test lsyss2.C lsys.C
80-
@test lsyss2.D lsys.D
81+
82+
@test tf(ss(lsyss2...)) tf(ss(lsys...)) atol = 1e-8

0 commit comments

Comments
 (0)