File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 90
90
@test matrices. D[] == 0
91
91
end
92
92
end
93
+
94
+ @testset " Outside input to inside input connection" begin
95
+ @mtkmodel Inner begin
96
+ @variables begin
97
+ x (t), [input = true ]
98
+ y (t), [output = true ]
99
+ end
100
+ @equations begin
101
+ y ~ x
102
+ end
103
+ end
104
+ @mtkmodel Outer begin
105
+ @variables begin
106
+ u (t), [input = true ]
107
+ v (t), [output = true ]
108
+ end
109
+ @components begin
110
+ inner = Inner ()
111
+ end
112
+ @equations begin
113
+ connect (u, inner. x)
114
+ connect (inner. y, v)
115
+ end
116
+ end
117
+ @named sys = Outer ()
118
+ ss = toggle_namespacing (sys, false )
119
+ eqs = equations (expand_connections (sys))
120
+ @test issetequal (eqs, [ss. u ~ ss. inner. x
121
+ ss. inner. y ~ ss. inner. x
122
+ ss. inner. y ~ ss. v])
123
+ end
You can’t perform that action at this time.
0 commit comments