Skip to content

Commit dc74760

Browse files
committed
bug fix on disaggregated vars
1 parent 6dfbcb4 commit dc74760

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/convex_hull.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function convex_hull_reformulation!!(constr, bin_var, i, k, eps)
1+
function convex_hull_reformulation!(constr, bin_var, i, k, eps)
22
ref = ismissing(k) ? constr : constr[k...] #get constraint
33
#create convex hull constraint
44
if ref isa NonlinearConstraintRef || constraint_object(ref).func isa QuadExpr
@@ -99,8 +99,8 @@ end
9999
function add_disaggregated_variable(m, LB, UB, var, base_name)
100100
@variable(
101101
m,
102-
lower_bound = LB,
103-
upper_bound = UB,
102+
lower_bound = min(LB,0),
103+
upper_bound = max(UB,0),
104104
binary = is_binary(var),
105105
integer = is_integer(var),
106106
base_name = base_name

0 commit comments

Comments
 (0)