Skip to content

Commit 85c5b40

Browse files
committed
Use at set! in index reduction
1 parent 722b29f commit 85c5b40

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/structural_transformation/pantelides.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ function pantelides_reassemble(sys, eqassoc, assign)
8181
final_vars = unique(filter(x->!(operation(x) isa Differential), fullvars))
8282
final_eqs = map(identity, filter(x->value(x.lhs) !== nothing, out_eqs[sort(filter(x->x != UNASSIGNED, assign))]))
8383

84-
# remove clashing equations (from order lowering vs index reduction)
85-
return ODESystem(final_eqs, independent_variable(sys), final_vars, parameters(sys))
84+
@set! sys.eqs = final_eqs
85+
@set! sys.states = final_vars
86+
@set! sys.structure = nothing
87+
return sys
8688
end
8789

8890
"""

0 commit comments

Comments
 (0)