@@ -168,15 +168,15 @@ function partial_state_selection_graph!(structure::SystemStructure, var_eq_match
168
168
end
169
169
170
170
function dummy_derivative_graph! (state:: TransformationState , jac = nothing ;
171
- state_priority = nothing , kwargs... )
171
+ state_priority = nothing , log = Val ( false ), kwargs... )
172
172
state. structure. solvable_graph === nothing && find_solvables! (state; kwargs... )
173
173
complete! (state. structure)
174
174
var_eq_matching = complete (pantelides! (state))
175
- dummy_derivative_graph! (state. structure, var_eq_matching, jac, state_priority)
175
+ dummy_derivative_graph! (state. structure, var_eq_matching, jac, state_priority, log )
176
176
end
177
177
178
178
function dummy_derivative_graph! (structure:: SystemStructure , var_eq_matching, jac,
179
- state_priority)
179
+ state_priority, :: Val{log} = Val ( false )) where {log}
180
180
@unpack eq_to_diff, var_to_diff, graph = structure
181
181
diff_to_eq = invview (eq_to_diff)
182
182
diff_to_var = invview (var_to_diff)
@@ -338,7 +338,7 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
338
338
end
339
339
end
340
340
341
- var_eq_matching = tear_graph_modia (structure, isdiffed,
341
+ var_eq_matching, full_var_eq_matching = tear_graph_modia (structure, isdiffed,
342
342
Union{Unassigned, SelectedState};
343
343
varfilter = can_eliminate)
344
344
for v in eachindex (var_eq_matching)
@@ -348,5 +348,10 @@ function dummy_derivative_graph!(structure::SystemStructure, var_eq_matching, ja
348
348
var_eq_matching[v] = SelectedState ()
349
349
end
350
350
351
- return var_eq_matching
351
+ if log
352
+ candidates = can_eliminate .(1 : ndsts (graph))
353
+ return var_eq_matching, full_var_eq_matching, candidates
354
+ else
355
+ return var_eq_matching
356
+ end
352
357
end
0 commit comments