|
20 | 20 | @named sys = ODESystem([D(x) ~ -x + u], t) # both u and x are unbound |
21 | 21 | @named sys1 = ODESystem([D(x) ~ -x + v[1] + v[2]], t) # both v and x are unbound |
22 | 22 | @named sys2 = ODESystem([D(x) ~ -sys.x], t, systems = [sys]) # this binds sys.x in the context of sys2, sys2.x is still unbound |
23 | | -@named sys21 = ODESystem([D(x) ~ -sys.x], t, systems = [sys1]) # this binds sys.x in the context of sys2, sys2.x is still unbound |
| 23 | +@named sys21 = ODESystem([D(x) ~ -sys1.x], t, systems = [sys1]) # this binds sys.x in the context of sys2, sys2.x is still unbound |
24 | 24 | @named sys3 = ODESystem([D(x) ~ -sys.x + sys.u], t, systems = [sys]) # This binds both sys.x and sys.u |
25 | | -@named sys31 = ODESystem([D(x) ~ -sys.x + sys1.v[1]], t, systems = [sys1]) # This binds both sys.x and sys1.v[1] |
| 25 | +@named sys31 = ODESystem([D(x) ~ -sys1.x + sys1.v[1]], t, systems = [sys1]) # This binds both sys.x and sys1.v[1] |
26 | 26 |
|
27 | 27 | @named sys4 = ODESystem([D(x) ~ -sys.x, u ~ sys.u], t, systems = [sys]) # This binds both sys.x and sys3.u, this system is one layer deeper than the previous. u is directly forwarded to sys.u, and in this case sys.u is bound while u is not |
28 | 28 |
|
|
43 | 43 | @test is_bound(sys2, sys.x) |
44 | 44 | @test !is_bound(sys2, sys.u) |
45 | 45 | @test !is_bound(sys2, sys2.sys.u) |
46 | | -@test is_bound(sys21, sys.x) |
| 46 | +@test is_bound(sys21, sys1.x) |
47 | 47 | @test !is_bound(sys21, sys1.v[1]) |
48 | 48 | @test !is_bound(sys21, sys1.v[2]) |
49 | 49 | @test is_bound(sys31, sys1.v[1]) |
|
0 commit comments