@@ -15,7 +15,7 @@ an integrator with a constant input is often used together with the system under
1515 @named c = Constant (; k = 1 )
1616 @named int = Integrator (x = 1 )
1717 @named iosys = ODESystem (connect (c. output, int. input), t, systems = [int, c])
18- sys = structural_simplify (iosys)
18+ sys = mtkcompile (iosys)
1919 prob = ODEProblem (sys, Pair[], (0.0 , 1.0 ))
2020 sol = solve (prob, Rodas4 ())
2121 @test sol. retcode == Success
3434 ],
3535 t,
3636 systems = [int, source, der])
37- sys = structural_simplify (iosys)
37+ sys = mtkcompile (iosys)
3838 prob = ODEProblem (sys, Pair[int. x => 0.0 ], (0.0 , 10.0 ))
3939 sol = solve (prob, Rodas4 ())
4040 @test sol. retcode == Success
4848 @named c = Constant (; k = 1 )
4949 @named pt1 = FirstOrder (; k = k, T = T)
5050 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
51- sys = structural_simplify (iosys)
51+ sys = mtkcompile (iosys)
5252 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
5353 sol = solve (prob, Rodas4 ())
5454 @test sol. retcode == Success
5757 # Test highpass feature
5858 @named pt1 = FirstOrder (; k = k, T = T, lowpass = false )
5959 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
60- sys = structural_simplify (iosys)
60+ sys = mtkcompile (iosys)
6161 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
6262 sol = solve (prob, Rodas4 ())
6363 @test sol. retcode == Success
8181 @named c = Constant (; k = 1 )
8282 @named pt2 = SecondOrder (; k = k, w = w, d = d)
8383 @named iosys = ODESystem (connect (c. output, pt2. input), t, systems = [pt2, c])
84- sys = structural_simplify (iosys)
84+ sys = mtkcompile (iosys)
8585 prob = ODEProblem (sys, [unknowns (sys) .=> 0.0 ... ; pt2. xd => 0.0 ], (0.0 , 100.0 ))
8686 sol = solve (prob, Rodas4 ())
8787 @test sol. retcode == Success
100100 ],
101101 t,
102102 systems = [ss, c])
103- sys = structural_simplify (model)
103+ sys = mtkcompile (model)
104104 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
105105 sol = solve (prob, Rodas4 ())
106106 @test sol. retcode == Success
120120 ],
121121 t,
122122 systems = [ss, c])
123- sys = structural_simplify (model)
123+ sys = mtkcompile (model)
124124 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
125125 sol = solve (prob, Rodas4 ())
126126 @test sol. retcode == Success
160160 ],
161161 t,
162162 systems = [pi_controller, plant, ref, fb])
163- sys = structural_simplify (model)
163+ sys = mtkcompile (model)
164164 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
165165 sol = solve (prob, Rodas4 ())
166166 @test sol. retcode == Success
183183 ],
184184 t,
185185 systems = [pid_controller, plant, ref, fb])
186- sys = structural_simplify (model)
186+ sys = mtkcompile (model)
187187 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
188188 sol = solve (prob, Rodas4 ())
189189 @test sol. retcode == Success
201201 ],
202202 t,
203203 systems = [pid_controller, plant, ref, fb])
204- sys = structural_simplify (model)
204+ sys = mtkcompile (model)
205205 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
206206 sol = solve (prob, Rodas4 ())
207207 @test sol. retcode == Success
220220 ],
221221 t,
222222 systems = [pid_controller, plant, ref, fb])
223- sys = structural_simplify (model)
223+ sys = mtkcompile (model)
224224 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
225225 sol = solve (prob, Rodas4 ())
226226 @test sol. retcode == Success
254254 ],
255255 t,
256256 systems = [pi_controller, plant, ref, fb, sat])
257- sys = structural_simplify (model)
257+ sys = mtkcompile (model)
258258 prob = ODEProblem (sys, Pair[], (0.0 , 20.0 ))
259259 sol = solve (prob, Rodas4 ())
260260 end
271271 ],
272272 t,
273273 systems = [pi_controller_lim, plant, ref, fb, sat])
274- sys = structural_simplify (model)
274+ sys = mtkcompile (model)
275275 prob = ODEProblem (sys, Pair[], (0.0 , 20.0 ))
276276 sol = solve (prob, Rodas4 ())
277277 end
303303 ],
304304 t,
305305 systems = [pid_controller, plant, ref])
306- sys = structural_simplify (model)
306+ sys = mtkcompile (model)
307307 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
308308 sol = solve (prob, Rodas4 ())
309309
324324 ],
325325 t,
326326 systems = [pid_controller, plant, ref])
327- sys = structural_simplify (model)
327+ sys = mtkcompile (model)
328328 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
329329 sol = solve (prob, Rodas4 ())
330330
345345 ],
346346 t,
347347 systems = [pid_controller, plant, ref])
348- sys = structural_simplify (model)
348+ sys = mtkcompile (model)
349349 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
350350 sol = solve (prob, Rodas4 ())
351351
367367 ],
368368 t,
369369 systems = [pid_controller, plant, ref])
370- sys = structural_simplify (model)
370+ sys = mtkcompile (model)
371371 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
372372 sol = solve (prob, Rodas4 ())
373373
389389 ],
390390 t,
391391 systems = [pid_controller, plant, ref])
392- sys = structural_simplify (model)
392+ sys = mtkcompile (model)
393393 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
394394 sol = solve (prob, Rodas4 ())
395395
412412 ],
413413 t,
414414 systems = [pid_controller, plant, ref])
415- sys = structural_simplify (model)
415+ sys = mtkcompile (model)
416416 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
417417 sol = solve (prob, Rodas4 ())
418418
429429 @named c = Constant (; k = 1 )
430430 @named pt1 = TransferFunction (b = [1.2 ], a = [3.14 , 1 ])
431431 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
432- sys = structural_simplify (iosys)
432+ sys = mtkcompile (iosys)
433433 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
434434 sol = solve (prob, Rodas4 ())
435435 @test sol. retcode == Success
439439 @named c = Constant (; k = 1 )
440440 @named pt1 = TransferFunction (b = [1.2 ], a = [3.14 , 0 ])
441441 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
442- sys = structural_simplify (iosys)
442+ sys = mtkcompile (iosys)
443443 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
444444 sol = solve (prob, Rodas4 ())
445445 @test sol. retcode == Success
463463 k, w, d = 1.0 , 1.0 , 0.5
464464 @named pt1 = TransferFunction (b = [w^ 2 ], a = [1 , 2 d * w, w^ 2 ])
465465 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
466- sys = structural_simplify (iosys)
466+ sys = mtkcompile (iosys)
467467 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
468468 sol = solve (prob, Rodas4 ())
469469 @test sol. retcode == Success
473473 @named c = Constant (; k = 1 )
474474 @named pt1 = TransferFunction (b = [1 , 0 ], a = [1 , 1 ])
475475 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
476- sys = structural_simplify (iosys)
476+ sys = mtkcompile (iosys)
477477 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
478478 sol = solve (prob, Rodas4 ())
479479 @test sol. retcode == Success
483483 # Test with no state
484484 @named pt1 = TransferFunction (b = [2.7 ], a = [pi ])
485485 @named iosys = ODESystem (connect (c. output, pt1. input), t, systems = [pt1, c])
486- sys = structural_simplify (iosys)
486+ sys = mtkcompile (iosys)
487487 prob = ODEProblem (sys, Pair[], (0.0 , 100.0 ))
488488 sol = solve (prob, Rodas4 ())
489489 @test sol. retcode == Success
0 commit comments