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
Following #2051, there is a new parse_one_operator_constraint extension point in JuMP. However, it is not called in a very specific situation: when the constraint looks like binpacking(a, b, c, d), i.e. when there is just a function call and four arguments. For instance, the current implementation works correctly with binpacking(a, b, collect(1:10), d).
In that case, JuMP jumps to parse_ternary_constraint(_error, vectorized, :binpacking, Val(a), b, Val(c), d). As neither a nor b are inequality signs, it directly generates an error.
I only found a hacky solution for this: in parse_ternary_constraint, intercept all error calls, ensure that there is no parse_one_operator_constraint to call. JuliaConstraints/JuCP.jl@acb90e3
Following #2051, there is a new
parse_one_operator_constraint
extension point in JuMP. However, it is not called in a very specific situation: when the constraint looks likebinpacking(a, b, c, d)
, i.e. when there is just a function call and four arguments. For instance, the current implementation works correctly withbinpacking(a, b, collect(1:10), d)
.In that case, JuMP jumps to
parse_ternary_constraint(_error, vectorized, :binpacking, Val(a), b, Val(c), d)
. As neithera
norb
are inequality signs, it directly generates an error.I only found a hacky solution for this: in
parse_ternary_constraint
, intercept all error calls, ensure that there is noparse_one_operator_constraint
to call. JuliaConstraints/JuCP.jl@acb90e3An example to trigger this error: JuliaConstraints/JuCP.jl@acb90e3#diff-fce720c43af3c52c862fd7451c7374b8R312-R327
I hope someone has more imagination that I do to fix this!
The text was updated successfully, but these errors were encountered: