Chapter 6 - Integer Programing - Part 2
Chapter 6 - Integer Programing - Part 2
Integer Programming
Part 2 – B&B Algorithm
• Choose a branch and continue the branching process, find bound, select the branch
until the optimal solution is identified.
2. Branching
In the remaining problems, selecting the branching variable is the first variable in the list
that does not meet the integer conditions, 𝑥𝑗 , value is 𝑥𝑗∗ , integer part is 𝑥𝑗∗ . Divide into
2 branches by creating 2 sub-problems BT1 and BT2
Optimal conditions: The program stops when there are no more unconfirmed
sub-problems. Value of incumbents are the optimal value.
Sub Sub
problem 1 problem 2
Bound B1 Bound B2
B2 < Z*: fathomed
Iteration 0: Solve the original problem with relaxation constraints: delete integer
constraints
Solutions: (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (1.25, 1.5, 1.75, 0), Z= 14.25; Let Z* = -∞.
Because solution 𝑥1 , 𝑥2 , 𝑥3 are not satisfied integer condition➔ Not fathomed, continue.
Iteration 1:
Select branching variable is 𝑥1 . Current value 𝑥1 =1.25, 𝑥1 = 1 create two sub-problems
BT1 and BT2
- BT1: Original problem + constraint 𝑥1 ≤ 1
- BT2: Original problem + constraint 𝑥1 ≥ 2
Iteration 3:
Select 𝑥3 is branching variable, value 𝑥3 = 1.83, branching two sub-problem BT111 and
BT112
- BT111: Original problem + (𝑥1 ≤ 1) + (𝑥2 ≤ 1) + (𝑥3 ≤ 1). Give a solution
(𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0.83, 1, 1, 0), Z = 8.33 = Bound B111. Not satisfy integer condition,
B111 > Z* ➔ not fathomed.
- BT112: Original problem + (𝑥1 ≤ 1) + (𝑥2 ≤ 1) + (𝑥3 ≥ 2). Give a solution
(𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0, 0, 2, 0.5), Z = 13.5. Satisfy integer condition, Z*=13.5 incumbent.
Stop because it reaches optimal condition, this is final solution of the problem.
Sub
(𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (1, 1.2, 1.8, 0) problem Sub
Z = 14.2 = Bound B1. BT1 problem 2 Infeasible
𝑥1 ≤ 1 𝑥1 ≥ 2
Sub Sub
(𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0.83, 1, 1.83, 0) problem 11
Z = 14.17 = Bound B11. problem 12 (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0.83, 2, 1.83, 0)
𝑥1 ≤ 1 𝑥1 ≤ 1 Z = 12.17 = Bound B12.
B11 > B12 ➔ Select branch 11 𝑥2 ≤ 1 𝑥2 ≥ 2
B. Example Branch-And-Bound to solve Mixed BIP (includes binary & real variables).
A Mixed BIP is given
Max. Z = 4𝑥1 + 2𝑥2 + 7𝑥3 − 2𝑥4
Ràng buộc:
𝑥1 +5𝑥3 ≤ 5;
𝑥2 + 𝑥3 ≤2;
3𝑥1 +3𝑥2 +5𝑥3 ≤8;
−𝑥1 + 3𝑥3 − 2𝑥4 ≤ 2;
𝑥1 , 𝑥2 , 𝑥3 : 𝑏𝑖𝑛𝑎𝑟𝑦
𝑥4 : 𝑟𝑒𝑎𝑙
Iteration 0: Solve the original problem with relaxation constraints: delete binary integer
constraints
Solution: (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (1.5, 0, 0.7, 0), Z= 10.9; Let Z* = -∞.
Because 𝑥1 , 𝑥2 , 𝑥3 not satisfying integer conditions ➔ Not fathomed, continue.
Iteration 1: Because binary values, we create two branches only with x = 0 and x = 1.
Select branching variable is 𝑥1 . Current value is 𝑥1 =1.5, creating 2 sub-problems BT1 & BT2
- BT1: submit 𝑥1 = 1 into original problem.
- BT2: submit 𝑥1 = 0 into original problem
Operations Research – Deterministic Model Assoc. Prof. Hồ Thanh Phong
Giải bài toán Qui hoạch Nguyên (TT)
BT1 (𝑥1 = 1):
Max. Z = 4 + 2𝑥2 + 7𝑥3 − 2𝑥4
Ràng buộc:
5𝑥3 ≤ 4;
𝑥2 + 𝑥3 ≤2;
3𝑥2 +5𝑥3 ≤ 5;
3𝑥3 − 2𝑥4 ≤ 3;
𝑥2 , 𝑥3 : 𝑏𝑖𝑛𝑎𝑟𝑦; 𝑥4 : 𝑟𝑒𝑎𝑙
Lời giải relaxation, bỏ điều kiện binary: (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (1, 0.33, 0.8, 0)
Z = 6.27+4 = 10.27 = Bound B1.
BT2 (𝑥1 = 0):
Max. Z = 2𝑥2 + 7𝑥3 − 2𝑥4
Ràng buộc:
5𝑥3 ≤ 5;
𝑥2 + 𝑥3 ≤2;
3𝑥2 +5𝑥3 ≤8;
3𝑥3 − 2𝑥4 ≤ 2;
𝑥2 , 𝑥3 : 𝑏𝑖𝑛𝑎𝑟𝑦; 𝑥4 : 𝑟𝑒𝑎𝑙
Lời giải relaxation, bỏ điều kiện binary: (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0, 1, 1, 0.5), Z = 8. Lời giải này
thỏa điều kiện binary nên là lời giải tối ưu hiện tại (incumbent), Z* =8 (nhánh này xác
nhận - fathomed).
Operations Research – Deterministic Model Assoc. Prof. Hồ Thanh Phong
Giải bài toán Qui hoạch Nguyên (TT)
Selec branch BT1 for branching. Select 𝑥2 as branching variable; Two branches:
BT11: BT1 + 𝑥2 = 1 and BT12: BT1 + 𝑥2 = 0.
With the Pure BIP problem, the solving procedure is the same as this algorithm.