You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/hull.jl
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,8 @@ function hull_reformulation!(constr::ConstraintRef{<:AbstractModel, MOI.Constrai
16
16
m = constr.model
17
17
i = args[2] #get disjunct index
18
18
bin_var_ref = m[bin_var][i]
19
-
#replace each variable with its disaggregated version (skip disaggregated vars)
20
-
for var_ref infilter!(!in(values(m.ext[:disaggregated_variables])), get_constraint_variables(constr))#setdiff(get_constraint_variables(constr), values(m.ext[:disaggregated_variables]))
21
-
is_binary(var_ref) &&continue#NOTE: binaries from nested disjunctions are not disaggregated and don't need to be swapped out
19
+
#replace each variable with its disaggregated version (skip disaggregated vars and binaries)
20
+
for var_ref infilter!(v ->!in(v, values(m.ext[:disaggregated_variables])) &&!is_binary(v), get_constraint_variables(constr))#setdiff(get_constraint_variables(constr), values(m.ext[:disaggregated_variables]))
22
21
# var_ref in values(m.ext[:disaggregated_variables]) && continue #disaggregated variables are not touched
0 commit comments