@@ -4,23 +4,23 @@ using ModelingToolkit
44@variables t w (t) x (t) y (t) z (t)
55
66@testset " separate_terms" begin
7- @testset " separate_terms full" begin
8- vars = [x, y, z]
9- exprs = [3.0 x + 4.5 y + 6.0
10- 2.0 z + 3.4 w + 7.0 + sin (x)
11- 9.8 + x * (1.0 - y)
12- 5.6 y + 1.3 z^ 2 ]
13- A, c, n = ModelOrderReduction. separate_terms (exprs, vars, t)
14- @test size (A) == (length (exprs), length (vars))
15- @test A == [3.0 4.5 0.0
16- 0.0 0.0 2.0
17- 0.0 0.0 0.0
18- 0.0 5.6 0.0 ]
19- @test length (c) == length (exprs)
20- @test isequal (c, [6.0 , 3.4 w + 7.0 , 9.8 , 0.0 ])
21- @test length (n) == length (exprs)
22- @test isequal (n, [0.0 , sin (x), x * (1.0 - y), 1.3 z^ 2 ])
23- end
7+ # @testset "separate_terms full" begin
8+ # vars = [x, y, z]
9+ # exprs = [3.0x + 4.5y + 6.0
10+ # 2.0z + 3.4w + 7.0 + sin(x)
11+ # 9.8 + x * (1.0 - y)
12+ # 5.6y + 1.3z^2]
13+ # A, c, n = ModelOrderReduction.separate_terms(exprs, vars, t)
14+ # @test size(A) == (length(exprs), length(vars))
15+ # @test A == [3.0 4.5 0.0
16+ # 0.0 0.0 2.0
17+ # 0.0 0.0 0.0
18+ # 0.0 5.6 0.0]
19+ # @test length(c) == length(exprs)
20+ # @test isequal(c, [6.0, 3.4w + 7.0, 9.8, 0.0])
21+ # @test length(n) == length(exprs)
22+ # @test isequal(n, [0.0, sin(x), x * (1.0 - y), 1.3z^2])
23+ # end
2424
2525 @testset " separate_terms empty exprs" begin
2626 vars = [x, y, z]
0 commit comments