Skip to content

Commit 5f4adbd

Browse files
committed
allow passing big-M for container constraints
1 parent 0915a8b commit 5f4adbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/big_M.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ function big_m_reformulation!(constr, bin_var, i, k, M)
77
if ismissing(M)
88
M = apply_interval_arithmetic(ref)
99
# @warn "No M value passed for $ref. M = $M was inferred from the variable bounds."
10+
elseif !ismissing(k)
11+
M = M[k]
1012
end
1113
if ref isa NonlinearConstraintRef
1214
nonlinear_bigM(ref, bin_var, M, i)

0 commit comments

Comments
 (0)