Skip to content
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 tests #862

Closed
13 tasks done
guimarqu opened this issue May 4, 2023 · 0 comments · Fixed by #865 or #874
Closed
13 tasks done

Benders tests #862

guimarqu opened this issue May 4, 2023 · 0 comments · Fixed by #865 or #874
Assignees

Comments

@guimarqu
Copy link
Contributor

guimarqu commented May 4, 2023

We consider the three following formulations:

A (optimal solution has only x non-zero)

using JuMP, GLPK
m = Model(GLPK.Optimizer)
@variable(m, x[1:2]>= 0)
@variable(m, y[1:2] >= 0)
@constraint(m, -x[1] + 4x[2] + 2y[1] + 3y[2] >= 2)
@constraint(m, x[1] + 3x[2] + y[1] + y[2] >= 3)
@objective(m, Min, x[1] + 4x[2] + 2y[1] + 3y[2])
optimize!(m)
objective_value(m)
value.(x)
value.(y)

B (optimal solution has both x, y non-zero)

 using JuMP, GLPK
 m = Model(GLPK.Optimizer)
 @variable(m, x[1:2] >= 0)
 @variable(m, y[1:2] >= 0)
 @constraint(m, -x[1] + x[2] + y[1] - 0.5y[2] >= 4)
 @constraint(m, 2x[1] + 1.5x[2] + y[1] + y[2] >= 5)
 @objective(m, Min, x[1] + 2x[2] + 1.5y[1] + y[2])
 optimize!(m)
 objective_value(m)
 value.(x)
 value.(y)

C (case with two subproblems)

# TODO

We have to test make sure that the Benders loop finds the optimal solutions for the following cases:

  • [x] A with continuous first stage finds optimal solution
  • [x] B with continuous first stage finds optimal solution
  • [x] C with continuous first stage finds optimal solution
  • [x] A with integer first stage finds optimal solution
  • [x] B with integer first stage finds optimal solution
  • [x] C with integer first stage finds optimal solution
  • [x] add quite high lower bounds on y of formulation A -> check Benders finds optimal solution
  • [x] change sense optimization (max), of objective function, and constraints of B -> check Benders finds optimal solution
  • [x] add quite high upper bounds in y of the previous formulation -> check Benders finds optimal solution
  • [ ] add a constraint in the master to make A infeasible -> check Benders returns infeasible
  • [ ] add a constraint in the subproblem to make A infeasible -> check Benders returns infeasible
  • [ ] create a formulation with unbounded master -> check Benders throws an error
  • [ ] create a formulation with unbounded subproblem -> check Benders throws an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants