@@ -810,13 +810,13 @@ end
810
810
811
811
Given a list of analysis points, break the connection for each and set the output to zero.
812
812
"""
813
- function handle_loop_openings (sys:: AbstractSystem , aps)
813
+ function handle_loop_openings (sys:: AbstractSystem , aps, input_vars )
814
814
for ap in canonicalize_ap (sys, aps)
815
815
sys, (outvar,) = apply_transformation (Break (ap, true , true ), sys)
816
816
if Symbolics. isarraysymbolic (outvar)
817
- push! ( get_eqs (sys), outvar ~ zeros ( size ( outvar) ))
817
+ append! (input_vars, collect ( outvar))
818
818
else
819
- push! (get_eqs (sys) , outvar ~ 0 )
819
+ push! (input_vars , outvar)
820
820
end
821
821
end
822
822
return sys
@@ -849,10 +849,10 @@ All other keyword arguments are forwarded to `linearization_function`.
849
849
"""
850
850
function get_linear_analysis_function (
851
851
sys:: AbstractSystem , transform, aps; system_modifier = identity, loop_openings = [], kwargs... )
852
- sys = handle_loop_openings (sys, loop_openings)
853
- aps = canonicalize_ap (sys, aps)
854
852
dus = []
855
853
us = []
854
+ sys = handle_loop_openings (sys, loop_openings, dus)
855
+ aps = canonicalize_ap (sys, aps)
856
856
for ap in aps
857
857
sys, (du, u) = apply_transformation (transform (ap), sys)
858
858
push! (dus, du)
@@ -979,7 +979,7 @@ function linearization_ap_transform(sys,
979
979
end
980
980
push! (output_vars, output_var)
981
981
end
982
- sys = handle_loop_openings (sys, map (AnalysisPoint, collect (loop_openings)))
982
+ sys = handle_loop_openings (sys, map (AnalysisPoint, collect (loop_openings)), input_vars )
983
983
return sys, input_vars, output_vars
984
984
end
985
985
0 commit comments