branch and bound
play

Branch and Bound Marco Chiarandini Department of Mathematics & - PowerPoint PPT Presentation

DM545 Linear and Integer Programming Lecture 13 Branch and Bound Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Branch and Bound Outline Preprocessing 1. Branch and Bound 2. Preprocessing


  1. DM545 Linear and Integer Programming Lecture 13 Branch and Bound Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

  2. Branch and Bound Outline Preprocessing 1. Branch and Bound 2. Preprocessing 2

  3. Branch and Bound Exam Preprocessing • Tilladt Håndscanner/digital pen og ordbogsprogrammet fra ordbogen.com • Ikke tilladt at anvende digitalt kamera eller webcam o. lign. metoder for at digitalisere sin besvarelse • Du afleverer efter fristen og kun en gang • Exam Monitor er et lille program, som logger, hvilke programmer du afvikler på din computer under eksamen, samtidig med at din skærm optages. https://em.sdu.dk/ • Internet Internet er ikke tilladt ved eksamener på NAT, men undtagelsesvis til denne eksamen er det tilladt, at benytte følgende webside http: // www. imada. sdu. dk/ ~marco/ DM545/ og siderne linket derfra. Det er ikke tilladt at benytte andre sider • Vejledning og templates snart tilgænglig fra kurset web siden ved afsnittet Assessment • Kom vel forberedet, bring noget at drikke og spise 3

  4. Branch and Bound To come Preprocessing • Two weeks left • This week: two lectures + joint training class on Wednesday • Next week: two exercise classes + one lecture. • Question time? Thursday 31st at 9:00? 4

  5. Branch and Bound Outline Preprocessing 1. Branch and Bound 2. Preprocessing 5

  6. Branch and Bound Branch and Bound Preprocessing • Consider the problem z = max { c T x : x ∈ S } • Divide and conquer: let S = S 1 ∪ . . . ∪ S k be a decomposition of S into smaller sets, and let z k = max { c T x : x ∈ S k } for k = 1 , . . . , K . Then z = max k z k 6

  7. Branch and Bound Branch and Bound Preprocessing • Consider the problem z = max { c T x : x ∈ S } • Divide and conquer: let S = S 1 ∪ . . . ∪ S k be a decomposition of S into smaller sets, and let z k = max { c T x : x ∈ S k } for k = 1 , . . . , K . Then z = max k z k For instance if S ⊆ { 0 , 1 } 3 the enumeration tree is: S x 1 = 0 x 1 = 1 S 0 S 1 x 2 = 0 S 00 S 01 S 10 S 11 x 3 = 0 S 000 S 001 S 010 S 011 S 100 S 101 S 110 S 111 6

  8. Branch and Bound Bounding Preprocessing Let’s consider a maximization problem (gurobi’s default is minimization) • Let z k be an upper bound on z k (dual bound) • Let z k be a lower bound on z k (primal bound) • ( z k ≤ z k ≤ z k ) 7

  9. Branch and Bound Bounding Preprocessing Let’s consider a maximization problem (gurobi’s default is minimization) • Let z k be an upper bound on z k (dual bound) • Let z k be a lower bound on z k (primal bound) • ( z k ≤ z k ≤ z k ) • z = 7

  10. Branch and Bound Bounding Preprocessing Let’s consider a maximization problem (gurobi’s default is minimization) • Let z k be an upper bound on z k (dual bound) • Let z k be a lower bound on z k (primal bound) • ( z k ≤ z k ≤ z k ) • z = max k z k is a lower bound on z • z = 7

  11. Branch and Bound Bounding Preprocessing Let’s consider a maximization problem (gurobi’s default is minimization) • Let z k be an upper bound on z k (dual bound) • Let z k be a lower bound on z k (primal bound) • ( z k ≤ z k ≤ z k ) • z = max k z k is a lower bound on z • z = max k z k is an upper bound on z 7

  12. Branch and Bound Pruning Preprocessing 27 z = 13 z = 20 25 20 15 8

  13. Branch and Bound Pruning Preprocessing 27 z = 25 13 z = 20 pruned by optimality 20 25 20 15 8

  14. Branch and Bound Pruning Preprocessing 27 z = 25 13 z = 20 pruned by optimality 20 25 20 15 27 z = 13 z = 20 26 18 21 8

  15. Branch and Bound Pruning Preprocessing 27 z = 25 13 z = 20 pruned by optimality 20 25 20 15 27 z = 26 13 z = 21 pruned by bounding 20 26 18 21 8

  16. Branch and Bound Pruning Preprocessing 27 z = 25 13 z = 20 pruned by optimality 20 25 20 15 27 z = 26 13 z = 21 pruned by bounding 20 26 18 21 40 z = −∞ z = 24 37 13 −∞ 8

  17. Branch and Bound Pruning Preprocessing 27 z = 25 13 z = 20 pruned by optimality 20 25 20 15 27 z = 26 13 z = 21 pruned by bounding 20 26 18 21 40 z = 37 −∞ z = 13 nothing to prune 24 37 13 −∞ 8

  18. Branch and Bound Pruning Preprocessing 27 z = 26 13 z = 14 pruned by infeasibility 26 infeas. 14 9

  19. Branch and Bound Example Preprocessing max x 1 + 2 x 2 x 2 x 1 + 4 x 2 ≤ 8 4 x 1 + x 2 ≤ 8 x 1 , x 2 ≥ 0 , integer x 1 + 4 x 2 = 8 x 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 • Solve LP | | x1 | x2 | x3 | x4 | -z | b | |---+----+----+----+----+----+---| | | 1 | 4 | 1 | 0 | 0 | 8 | | | 4 | 1 | 0 | 1 | 0 | 8 | |---+----+----+----+----+----+---| | | 1 | 2 | 0 | 0 | 1 | 0 | 10

  20. Branch and Bound Example Preprocessing max x 1 + 2 x 2 x 2 x 1 + 4 x 2 ≤ 8 4 x 1 + x 2 ≤ 8 x 1 , x 2 ≥ 0 , integer x 1 + 4 x 2 = 8 x 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 • Solve LP | | x1 | x2 | x3 | x4 | -z | b | |---+----+----+----+----+----+---| | | 1 | 4 | 1 | 0 | 0 | 8 | | | 4 | 1 | 0 | 1 | 0 | 8 | |---+----+----+----+----+----+---| | | 1 | 2 | 0 | 0 | 1 | 0 | | | x1 | x2 | x3 | x4 | -z | b | |--------------+----+------+----+------+----+----| | I’=I-II’ | 0 | 15/4 | 1 | -1/4 | 0 | 6 | | II’=1/4II | 1 | 1/4 | 0 | 1/4 | 0 | 2 | |--------------+----+------+----+------+----+----| | III’=III-II’ | 0 | 7/4 | 0 | -1/4 | 0 | -2 | 10

  21. Branch and Bound Preprocessing • continuing x 2 = 1 + 3 / 5 = 1 . 6 | | x1 | x2 | x3 | x4 | -z | b | x 1 = 8 / 5 |----------------+----+----+-------+-------+----+---------| The optimal solution will not | I’=4/15I | 0 | 1 | 4/15 | -1/15 | 0 | 24/15 | | II’=II-1/4I’ | 1 | 0 | -1/15 | 4/15 | 0 | 24/15 | be more than 2 + 14 / 5 = 4 . 8 |----------------+----+----+-------+-------+----+---------| | III’=III-7/4I’ | 0 | 0 | -7/15 | -3/5 | 1 | -2-14/5 | 11

  22. Branch and Bound Preprocessing • continuing x 2 = 1 + 3 / 5 = 1 . 6 | | x1 | x2 | x3 | x4 | -z | b | x 1 = 8 / 5 |----------------+----+----+-------+-------+----+---------| The optimal solution will not | I’=4/15I | 0 | 1 | 4/15 | -1/15 | 0 | 24/15 | | II’=II-1/4I’ | 1 | 0 | -1/15 | 4/15 | 0 | 24/15 | be more than 2 + 14 / 5 = 4 . 8 |----------------+----+----+-------+-------+----+---------| | III’=III-7/4I’ | 0 | 0 | -7/15 | -3/5 | 1 | -2-14/5 | • Both variables are fractional, we pick one of the two: 4 . 8 x 1 ≤ 1 x 1 ≥ 2 11

  23. Branch and Bound Preprocessing • continuing x 2 = 1 + 3 / 5 = 1 . 6 | | x1 | x2 | x3 | x4 | -z | b | x 1 = 8 / 5 |----------------+----+----+-------+-------+----+---------| The optimal solution will not | I’=4/15I | 0 | 1 | 4/15 | -1/15 | 0 | 24/15 | | II’=II-1/4I’ | 1 | 0 | -1/15 | 4/15 | 0 | 24/15 | be more than 2 + 14 / 5 = 4 . 8 |----------------+----+----+-------+-------+----+---------| | III’=III-7/4I’ | 0 | 0 | -7/15 | -3/5 | 1 | -2-14/5 | • Both variables are fractional, we pick one of the two: x 2 4 . 8 x 1 = 1 x 1 ≤ 1 x 1 ≥ 2 x 1 + 4 x 2 = 8 x 1 x 1 + 2 x 2 = 1 4 x 1 + x 2 = 8 11

  24. Branch and Bound Preprocessing • Let’s consider first the left branch: 12

  25. Branch and Bound Preprocessing • Let’s consider first the left branch: | | x1 | x2 | x3 | x4 | x5 | -z | b | |---+----+----+-------+-------+----+----+-------| | | 1 | 0 | 0 | 0 | 1 | 0 | 1 | | | 0 | 1 | 4/15 | -1/15 | 0 | 0 | 24/15 | | | 1 | 0 | -1/15 | 4/15 | 0 | 0 | 24/15 | |---+----+----+-------+-------+----+----+-------| | | 0 | 0 | -7/15 | -3/5 | 0 | 1 | -24/5 | 12

  26. Branch and Bound Preprocessing • Let’s consider first the left branch: | | x1 | x2 | x3 | x4 | x5 | -z | b | |---+----+----+-------+-------+----+----+-------| | | 1 | 0 | 0 | 0 | 1 | 0 | 1 | | | 0 | 1 | 4/15 | -1/15 | 0 | 0 | 24/15 | | | 1 | 0 | -1/15 | 4/15 | 0 | 0 | 24/15 | |---+----+----+-------+-------+----+----+-------| | | 0 | 0 | -7/15 | -3/5 | 0 | 1 | -24/5 | | | x1 | x2 | x3 | x4 | x5 | b | -z | |----------+----+----+-------+-------+----+---+-------| | I’=I-III | 0 | 0 | 1/15 | -4/15 | 1 | 0 | -9/15 | | | 0 | 1 | 4/15 | -1/15 | 0 | 0 | 24/15 | | | 1 | 0 | -1/15 | 4/15 | 0 | 0 | 24/15 | |----------+----+----+-------+-------+----+---+-------| | | 0 | 0 | -7/15 | -3/5 | 0 | 1 | -24/5 | 12

Recommend


More recommend