Skip to content

Commit 5ce2514

Browse files
committed
dummy_derivatives: Reset eqcolor every loop
We're using augmenting path construction here to try to find a maximal matching of the variables at the given differentiation level. However the construct_augmenting_path! function assumes as a pre-condition that eq-color is reset to zero in order for it to actually produce an augmenting path. Failing to do this can cause it to falsely declare a system singular.
1 parent 83d0d6c commit 5ce2514

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/structural_transformation/partial_state_selection.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
227227
else
228228
rank = 0
229229
for var in vars
230+
eqcolor .= false
230231
# We need `invgraph` here because we are matching from
231232
# variables to equations.
232233
pathfound = construct_augmenting_path!(rank_matching, invgraph, var,

0 commit comments

Comments
 (0)