Branch-and-Bound Example 2 max 5 x1 + 8 x2 st x1 + x2 <= 6 5 x1 + 9 x2 <= 45 x1, x2 integer LP Relaxation: max 5 x1 + 8 x2 st x1 + x2 <= 6 5 x1 + 9 x2 <= 45 x1, x2 >= 0 Optimal solution to LP Relaxation: Primal - Optimal: Objective = 4.1250000000e+01 Variable Name Solution Value x1 2.250000 x2 3.750000
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Branch on x1: Create subproblem 1 by adding the constraint x1 <= 2. Create subproblem 2 by adding the constraint x1 >= 3. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bounding Step: Solve Subproblem 1 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 Bounds All variables are >= 0. Primal - Optimal: Objective = 4.1111111111e+01 Variable Name Solution Value x1 2.000000 x2 3.888889 Solve subproblem 2 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 >= 3 Bounds All variables are >= 0. Primal - Optimal: Objective = 3.9000000000e+01 Variable Name Solution Value x1 3.000000 x2 3.000000 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Fathoming Step Z* = -infinity Subproblem 2 has integer-valued solution. The solution x1 = 3, x2 = 3 becomes the incumbent solutions. Z* = 39 Fathom the node for Subproblem 2. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The current branch-and-bound tree is shown below.
At this point, we have an integer-valued solution with an objective function value of 39 and we know that an optimal integer-valued solution can have an objective function of at most 41.11. Since the objective function coefficients are all integers, we know that an optimal integer-valued solution can have an objective function of at most 41 So, we have solution that is within 95% of optimality (39/41). Returning to the branching step, we create Subproblems 3 and 4 by adding the constraints x2 <= 3 and x2 >= 4 to the Subproblem 1, respectively. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bounding Step Solve Subproblem 3 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 <= 3 Bounds All variables are >= 0. Primal - Optimal: Objective = 3.4000000000e+01 Variable Name Solution Value x1 2.000000 x2 3.000000 Solve Subproblem 4 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 >= 4 Bounds All variables are >= 0. Primal - Optimal: Objective = 4.1000000000e+01 Variable Name Solution Value x1 1.800000 x2 4.000000 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Fathoming Step The node for Subproblem 3 can be fathomed since the solution is integer-valued. Since 34 is less than current value of Z*, we do not update Z*. The current branch-and-bound tree is shown below.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Branching Step Create Subproblem 5 by adding the constraint x1 <= 1 to Subproblem 4. Create Subproblem 6 by adding the constraint x1 >= 2 to Subproblem 4. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bounding Step Solve Subproblem 5 Problem addition successful. Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 >= 4 c5: x1 <= 1 Bounds All variables are >= 0. Primal - Optimal: Objective = 4.0555555556e+01 Variable Name Solution Value x1 1.000000 x2 4.444444 Solve Subproblem 6 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 >= 4 c5: x1 <= 2 Bounds All variables are >= 0. Since x1 must be both <= 2 and >= 2, it must be = 2. Meanwhile x2 must be >= 4. Constraint 2 says that 5 x1 + 9 x2 <= 45. But, since x1 = 2 and x2 >=4, the left-hand side of this constraint is at least 10 + (9)(4) = 46. Thus, Subproblem 6 is infeasible. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Fathoming Step The node for Subproblem 6 is fathomed since the subproblem is infeasible. We now know that an optimal integer-valued solution can have an objective function value of at most 40. The current branch-and-bound tree is shown below:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Branching Step Create Subproblem 7 by adding the constraint x2 <=4 to Subproblem 5. Create Subproblem 8 by adding the constraint x2 >=5 to Subproblem 5. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bounding Step Solve Subproblem 7 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 >= 4 c5: x1 <= 1 c6: x2 <= 4 Bounds All variables are >= 0. Primal - Optimal: Objective = 3.7000000000e+01 Variable Name Solution Value x1 1.000000 x2 4.000000 Solve Subproblem 8 Maximize obj: 5 x1 + 8 x2 Subject To c1: x1 + x2 <= 6 c2: 5 x1 + 9 x2 <= 45 c3: x1 <= 2 c4: x2 >= 4 c5: x1 <= 1 c6: x2 >= 5 Bounds All variables are >= 0. Primal - Optimal: Objective = 4.0000000000e+01 Variable Name Solution Value x2 5.000000 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Bounding Step The node for Subproblem 7 is fathomed since it has an integer-valued solution. The node for Subproblem 8 is also fathomed. Z* is updated to 40 and the optimal integer-valued solution is x1 = 0, x2 = 5. The final branch-and-bound tree is shown below.