Skip to content

Commit 994478b

Browse files
committed
structural_simplify doesn't work with discrete systems yet
1 parent 86fc564 commit 994478b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,17 +1032,13 @@ simplification will allow models where `n_states = n_equations - n_inputs`.
10321032
"""
10331033
function structural_simplify(sys::AbstractSystem, io = nothing; simplify = false, kwargs...)
10341034
sys = expand_connections(sys)
1035+
sys isa DiscreteSystem && return sys
10351036
state = TearingState(sys)
10361037
has_io = io !== nothing
10371038
has_io && markio!(state, io...)
10381039
state, input_idxs = inputs_to_parameters!(state, io)
10391040
sys, ag = alias_elimination!(state; kwargs...)
1040-
#ag = AliasGraph(length(ag))
1041-
# TODO: avoid construct `TearingState` again.
1042-
#state = TearingState(sys)
1043-
#has_io && markio!(state, io..., check = false)
10441041
check_consistency(state, ag)
1045-
#find_solvables!(state; kwargs...)
10461042
sys = dummy_derivative(sys, state, ag; simplify)
10471043
fullstates = [map(eq -> eq.lhs, observed(sys)); states(sys)]
10481044
@set! sys.observed = topsort_equations(observed(sys), fullstates)

0 commit comments

Comments
 (0)