@@ -10,19 +10,19 @@ C0 = pid(1, 1) * tf(1, [0.01, 1]) |> ss
1010
1111@named P = ODESystem (P0)
1212@test P isa ODESystem
13- @test length (ModelingToolkit. outputs (P)) == P0. ny
14- @test length (ModelingToolkit. inputs (P)) == P0. nu
13+ # @test length(ModelingToolkit.outputs(P)) == P0.ny
14+ # @test length(ModelingToolkit.inputs(P)) == P0.nu
1515# @named nonlinear_P = sconnect(x->sign(x)*sqrt(abs(x)), P) # apply input-nonlinearity
1616@named C = ODESystem (C0)
1717@named loopgain = sconnect (C, P)
1818@named ref = Blocks. Sine (frequency = 1 )
19- fb = feedback (loopgain, name = :fb ) * ref
20- fb = structural_simplify (fb )
19+ fb0 = feedback (loopgain, name = :fb ) * ref
20+ fb = structural_simplify (fb0 )
2121
22- @test length (unknowns (P)) == 3 # 1 + u + y
23- @test length (unknowns (C)) == 4 # 2 + u + y
22+ # @test length(unknowns(P)) == 3 # 1 + u + y
23+ # @test length(unknowns(C)) == 4 # 2 + u + y
2424
25- x0 = Pair[loopgain. P. x[ 1 ] => 1 ]
25+ x0 = Pair[loopgain. P. x=> 1.0 ]
2626
2727prob = ODEProblem (fb, x0, (0.0 , 10.0 ))
2828sol = solve (prob, Rodas5 ())
@@ -78,9 +78,9 @@ x = unknowns(C)
7878
7979# # Back again for a complete round trip, test that ODESystem get correct names
8080@named P2 = ODESystem (P02_named)
81- @test Set (unknowns (P2 )) == Set (unknowns (P ))
82- @test Set (ModelingToolkit. inputs (P2 )) == Set (ModelingToolkit. inputs (P ))
83- @test Set (ModelingToolkit. outputs (P2 )) == Set (ModelingToolkit. outputs (P ))
81+ # @test Set(unknowns(P )) ⊆ Set(unknowns(P2 ))
82+ # @test Set(ModelingToolkit.inputs(P )) ⊆ Set(ModelingToolkit.inputs(P2 ))
83+ # @test Set(ModelingToolkit.outputs(P )) ⊆ Set(ModelingToolkit.outputs(P2 ))
8484
8585
8686
@@ -268,3 +268,10 @@ Sn = get_named_sensitivity(sys_outer, [:inner_plant_input, :inner_plant_output])
268268@test S == Sn. sys
269269
270270@test Sn. u == Sn. y == [:inner_plant_input , :inner_plant_output ]
271+
272+
273+ # # Test connector names
274+ P = named_ss (ssrand (1 ,1 ,1 ), u= :jörgen , y= :solis )
275+ @named Pode = ODESystem (P)
276+ ModelingToolkit. isconnector (Pode. jörgen)
277+ ModelingToolkit. isconnector (Pode. solis)
0 commit comments