File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,20 @@ simplification will allow models where `n_states = n_equations - n_inputs`.
1818"""
1919function structural_simplify (sys:: AbstractSystem , io = nothing ; simplify = false ,
2020 kwargs... )
21- newsys = __structural_simplify (sys, io; simplify, kwargs... )
21+ newsys′ = __structural_simplify (sys, io; simplify, kwargs... )
22+ if newsys′ isa Tuple
23+ @assert length (newsys′) == 2
24+ newsys = newsys′[1 ]
25+ else
26+ newsys = newsys′
27+ end
2228 @set! newsys. parent = complete (sys)
23- return complete (newsys)
29+ newsys = complete (newsys)
30+ if newsys′ isa Tuple
31+ return newsys, newsys′[2 ]
32+ else
33+ return newsys
34+ end
2435end
2536function __structural_simplify (sys:: AbstractSystem , io = nothing ; simplify = false ,
2637 kwargs... )
You can’t perform that action at this time.
0 commit comments