|
1 | 1 | using ModelingToolkit, ModelingToolkitStandardLibrary.Blocks |
2 | 2 | using OrdinaryDiffEq, LinearAlgebra |
3 | 3 | using Test |
4 | | -using ModelingToolkit: t_nounits as t, D_nounits as D, AnalysisPoint, get_sensitivity, |
5 | | - get_comp_sensitivity, get_looptransfer, open_loop, AbstractSystem |
| 4 | +using ModelingToolkit: t_nounits as t, D_nounits as D, AnalysisPoint, AbstractSystem |
6 | 5 | using Symbolics: NAMESPACE_SEPARATOR |
7 | 6 |
|
8 | 7 | @testset "AnalysisPoint is lowered to `connect`" begin |
|
164 | 163 | (inputap, [nameof(outputap)]), |
165 | 164 | (nameof(inputap), [nameof(outputap)]) |
166 | 165 | ] |
167 | | - if input isa Symbol |
168 | | - # broken because MTKStdlib defines the method for |
169 | | - # `input::Union{Symbol, Vector{Symbol}}` which we can't directly call |
170 | | - @test_broken linearize(sys, input, output) |
171 | | - linfun, ssys = @invoke linearization_function(sys::AbstractSystem, |
172 | | - input::Union{Symbol, Vector{Symbol}, AnalysisPoint, Vector{AnalysisPoint}}, |
173 | | - output::Any) |
174 | | - matrices = linearize(ssys, linfun) |
175 | | - else |
176 | | - matrices, _ = linearize(sys, input, output) |
177 | | - end |
| 166 | + matrices, _ = linearize(sys, input, output) |
178 | 167 | # Result should be the same as feedpack(P, 1), i.e., the closed-loop transfer function from plant input to plant output |
179 | 168 | @test matrices.A[] == -2 |
180 | 169 | @test matrices.B[] * matrices.C[] == 1 # both positive |
|
0 commit comments