Skip to content

Commit 923e414

Browse files
committed
Add LTE and PRE tests
1 parent 2dbb8c2 commit 923e414

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
version:
19-
# - '1.8'
20-
# - '1.9'
19+
- "lts"
2120
- '1'
2221
# - 'nightly'
22+
- 'pre'
2323
os:
2424
- ubuntu-latest
2525
#- windows-latest

test/test_model_matching.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ G = rss(n1,p,m); F = rss(n2,pf,m);
203203
@time X, info = glasol(G, F; nehari = true, atol = 1.e-7); info
204204
@test abs(glinfnorm(X*G-F)[1] - info.mindist) < 0.01 && (!info.nonstandard && isstable(X))
205205

206-
# discrete-time, both G and F unstable #fails
206+
# discrete-time, both G and F unstable
207207
n1 = 3; n2 = 2; m = 3; p = 2; pf = 1;
208208
G = rss(n1,p,m,disc=true); F = rss(n2,pf,m,disc=true);
209209
@time X, info = glasol(G, F; reltol=0.0001, atol = 1.e-9); info
@@ -241,18 +241,17 @@ G = rss(n1,p,m,stable=true); F = rss(n2,pf,m,stable=true);
241241
@time X, info = glasol(G, F; nehari = true, atol = 1.e-7); info
242242
@test abs(glinfnorm(X*G-F)[1] - info.mindist) < 0.01 && (!info.nonstandard && isstable(X))
243243

244-
# exact solution exists, no free poles
245-
n1 = 3; n2 = 2; m = 3; p = 2; pf = 1;
246-
G = rss(n1,p,m); X0 = rss(n2,pf,p,stable=true); F = X0*G;
247-
@time X, info = glasol(G, F, offset = 1.e-13, atol = 1.e-7); info
248-
@test abs(glinfnorm(X*G-F)[1] - info.mindist) < 1.e-5 && (!info.nonstandard && isstable(X))
249-
250244
# exact solution exists, free poles exist
251245
n1 = 3; n2 = 2; m = 2; p = 3; pf = 1;
252246
G = rss(n1,p,m,stable=true); X0 = rss(n2,pf,p,stable=true); F = X0*G;
253247
@time X, info = glasol(G, F, atol = 1.e-7, poles = [-2, -3], sdeg = -1); info
254248
@test abs(glinfnorm(X*G-F)[1] - info.mindist) < 1.e-7 && (!info.nonstandard && isstable(X))
255249

250+
# exact solution exists, no free poles
251+
n1 = 3; n2 = 2; m = 3; p = 2; pf = 1;
252+
G = rss(n1,p,m); X0 = rss(n2,pf,p,stable=true); F = X0*G;
253+
@time X, info = glasol(G, F, offset = 1.e-13, atol = 1.e-7); info
254+
@test abs(glinfnorm(X*G-F)[1] - info.mindist) < 1.e-5 && (!info.nonstandard && isstable(X))
256255

257256
n1 = 3; n2 = 2; m = 2; p = 3; pf = 1;
258257
G = rss(n1,p,m,stable=true); X0 = rss(n2,pf,p,stable=true); F = X0*G;

0 commit comments

Comments
 (0)