Skip to content

Commit a42c5c6

Browse files
committed
Fix matching length
1 parent 19b8934 commit a42c5c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/structural_transformation/bipartite_tearing/modia_tearing.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ function tear_graph_modia(structure::SystemStructure, isder::F = nothing,
7979

8080
@unpack graph, solvable_graph = structure
8181
var_eq_matching = maximal_matching(graph, eqfilter, varfilter, U)
82-
var_eq_matching = complete(var_eq_matching,
83-
max(length(var_eq_matching),
84-
maximum(x -> x isa Int ? x : 0, var_eq_matching, init = 0)))
82+
matching_len = max(length(var_eq_matching),
83+
maximum(x -> x isa Int ? x : 0, var_eq_matching, init = 0))
84+
var_eq_matching = complete(var_eq_matching, matching_len)
8585
full_var_eq_matching = copy(var_eq_matching)
8686
var_sccs = find_var_sccs(graph, var_eq_matching)
87-
vargraph = DiCMOBiGraph{true}(graph)
87+
vargraph = DiCMOBiGraph{true}(graph, 0, Matching(matching_len))
8888
ict = IncrementalCycleTracker(vargraph; dir = :in)
8989

9090
ieqs = Int[]

0 commit comments

Comments
 (0)