-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benders is not working on a simple example #554
Comments
Benders decomposition is an alpha feature & the cut generation algorithm is not embeded in the TreeSearchAlgorithm at the moment. You have to use In your formulation, constraints I tried the following code : using JuMP
using BlockDecomposition
using Coluna
using Gurobi
coluna = optimizer_with_attributes(
Coluna.Optimizer,
"params" => Coluna.Params(
solver = Coluna.Algorithm.BendersCutGeneration()
),
"default_optimizer" => Gurobi.Optimizer
)
model = BlockModel(coluna)
@axis(S, 1:2)
@variable(model, d, Bin)
@variable(model, x[i in S], Bin)
@constraint(model, con1[S[1]], x[S[1]] <= d)
@constraint(model, con2[S[2]], x[S[2]] <= 1-d)
@objective(model, Max, sum(x))
@benders_decomposition(model, decomposition, S)
optimize!(model)
println(value.(x)) It doesn't work because :
Looks like there are 3 bugs here. I'll investigate as soon as possible, probably next week. |
If I use There is a bug in the reformulation & the algorithm. |
Describe the bug & Expected behavior
I'm not sure how the decomposition work with benders, but here, I expect the
d
variable to be the (unconstrained) master problem. There is two subproblemsS1
on variablex[1]
and constraintcon1
andS2
on variablex[2]
and constraintcon2
. Depending on the value ofd
, exactly onex
value can be set to1
. However, the returned optimal objective is2
(where1
is expected) and weirdly, nox
is set to1
after optimization (where one of these should be1
).To Reproduce
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: