You are on page 1of 10

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

METHODS OF SOLUTION A. Complete Enumeration list all possible solutions, and select the best solution by comparing all the Z-values. This method is efficient for small problems, but for large problems with a very large number of possible combinations, this is very impractical. You may miss the optimal combination. B. Rounding of Non-Integer (LP) Solution first solve the LP (take out the indivisibility requirement for the decision variables). This is called the LP-Relaxation of the IP. If the answer is integer, then it is optimal. If non-integer, then round-off the optimal LP results. (+) savings of time and cost (simplex method is quicker than any IP method) ( - ) resultant solution may differ significantly from optimal integer solution, and may even be infeasible. (-) there may be another integer solution which yields a better result *We can also use the Modified Trial and Error Approach variant of the rounding off method. First enumerate the selected feasible integer solutions in the neighborhood of the optimal LP solution and compute their z-values. C. Graphical Method (+) (-) applicable to both all-integer and mixed-integer problems only for problems with two variables

D. Branch and Bound special type of enumeration method. (to be discussed in detail) - partitions the feasible solution space into smaller subsets of solutions. - used in conjunction with the regular simplex method.

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

BRANCH AND BOUND METHOD Uses a tree diagram of nodes and branches to organize the solution partitioning. This is an intelligent search procedure for either an optimal or, (with less compuatational effort), a close-to-optimal solution to certain managerial problems, including all-integer and mixed-integer problems. PROCESS: Solve the LP relaxation. If the optimal LP solution is integer, then it is optimal fo the IP. Divide the problem into two (or more) subproblems (branching) and set an upper bound (UB) and a lower bound (LB) o the value of the objective function. Determining the bounds depends on the type of the problem. Start branching from the variable with the greatest fractional part. Subproblems whose objective function is worse than the established feasible bounds are eliminated from further consideration. The remaining subproblems are used to modify the bounds (LB or UB), then subdivided and investigated. This process is repeated until no further subdivision is possible, at which point the optimal (or near optimal) solution has been reached.

Method of division Example. If current optimal solution is x1 = 5, x2 = 6.2, then subdivide on x2 as

Case 1: x2 6

Case 2: x2 7

Graphically, we partition the feasible region into two parts that exclude the unwanted optimal solution. In the simplex tableau, add the constraint to the original problem and reoptimize (use dual simplex in the optimal tableau if applicable) In the maximization case, it is the UB that is usually not feasible; and the highest feasible UB is usually the optimum solution. Lower bounds must always be feasible you can set initial LB to be the rounding down of the initial LP solution to the LP relaxation. For a maximization problem, always branch the node with the highest Z. Branch and bound can be effectively coded into a computer routine and works well for problems containing a few integer-valued variables. However, in problems with large numbers of integer-valued variables,and in cases where the LP solution is far from optimal, then the number of required iterations (branchings) may be too large for efficient application. For such cases, a more complicated procedure (i.e., heuristics) is required.

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Branch and Bound for the Mixed Integer Model and Pure IP problems If you solve the LP relaxation of a pure IP and obtain a solution in which all variables are integers, then the optimal solution to the LP relaxation is also the optimal solution to the IP.

Key Aspects of branch and Bound Method for Solving Pure IPs: 1. If it is unnecessary to branch on a subproblem, it is fathomed. Three situations to fathom: the subproblem is infeasible the subproblem yields an optimal solution in which all variables have integer values the optimal z-value for the subproblem does not exceed (in a maximization problem) the current Lower Bound the subproblem is infeasible LB (representing the z-value of the best candidate to date) is at least as large as the z-value for the subproblem

2. A subproblem may be eliminated from consideration in the following situations:

Branch and Bound for the Mixed Integer Model Same basic steps as in the all-integer model, with only a few differences: Only variables that are required to be integer are branched, and only they are to be rounded down (in the maximization problem) to get an initial LB. For the maximization problem, always branch (from among the variables that must be integer) the one with the greatest fractional part.

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Example: Maximize s.t. Z = 10x1 + 15x2 8x1 + 4x2 40 15x1 + 30x2 200 x1, x2 0 and integer

LP-relaxation solution: Opt. (20/9, 50/9) Z = 950/9 ~ 105.56

x2 11 10 9 8 6 4 2 (2) 1 2 3 4 5 6 7 (1) 8 9 10 11 12 13 x1 Z Opt. (20/9, 50/9) Z = 950/9

Partition the feasible region into two parts that exclude the unwanted optimal solution.

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Branch first on higher fractional part: x2 6 and x2 5

x2 11 10 9 8 6

Opt. (4/3, 6) Z = 310/3 ~ 103.3 Opt (5/2, 5) Z = 100 x2 6 x2 5

4 2 (2) 1 2 3 4 5 6 7 (1) 8 9 10 11 12 13 x1 Z

Branch on higher Z on x2 6 branch: x1 2 and x1 1

x2 11 10 9 8 6

x1 1 x1 2 Opt. (1, 37/6) Z = 205/2 ~ 102.5 x2 6 Z 8 x1

(1) 1 2 3 4 5 6

(2) 7

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Branch on higher Z on x1 1 branch: x2 7 and x2 6 Feasible region of x2 6 is segment from (0, 6) to (1, 6)

x2 11 10 9 8 6

x1 1

Opt (1, 6) Z = 100 x2 7 x2 6 x2 6 (1) 1 2 3 4 5 6 (2) 7 Z 8 x1

Since the x2 5 branch cannot improve on this answer, this is the optimal integer solution. (Maximize)

(20/9, 50/9) Z = 950/9 105.556 UB = 950/9, LB (2, 5) = 95 x2 5 x2 6 (4/3, 6) Z = 310/3 103.33 x1 1 (1, 37/6) Z = 205/2 = 102.5 x2 6 x2 7 Infeasible x1 2 Infeasible

(5/2, 5) Z = 100 Inferior

(1, 6) Z = 100 Optimal LB=100

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Solving Knapsack Problems by the Branch and Bound Method Knapsack Problem an IP with a single constraint. A knapsack problem in which each variable must equal 0 or 1 may be written as: max z = c1x1 + c2x2 + + cnxn s.t. where ci = benefit obtained if item i is chosen b = amount of available resource ai = amount of resource used by item ci/ai - benefit item I earns for each unit of resource used by item i. When knapsack problems are solved using branch and bound, two aspects of the branch and bound method approach greatly simplify: Since each variable must equal 0 or 1, branching on xi will yield an xi = 0 and xi = 1 branch. Also, the LP relaxation may be solved by inspection. First compute all ratios ci/ai. Then put the best items in the knapsack. Continue this until the best remaining item will overfill the knapsack. Then fill the knapsack with as much of this item possible. a1x1 + a2x2 + + anxn b xi = 0 or 1 (i = 1,2,,n)

Example: max z = 16x1 + 22x2 + 12 x3 + 8x4 s.t. 5x1 + 7x2 + 4x3 + 3x4 14 xi = 0 or 1 (i = 1,2,3,4) Table 1. Ordering Items from best to worst in a knapsack problem ci/ai Item 1 Item 2 Item 3 Item 4 16/5 22/7 3 8/3 Ranking (1-best, 4-worst) 1 2 3 4

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

Branch and Bound Tree for the Knapsack Problem: Subproblem 1 z = 44 x1 = 1, x2 = 1 x3 = 1/2, x4 = 0 x3 = 0 x3 = 1

Subproblem 2 z = 43 1/3 x1 = 1, x2 = 1 x3 = 0, x4 = 2/3 X4 = 0 Subproblem 8 z = 38 x1 = 1, x2 = 1 x3 = 0, x4 = 0 X4 = 1 Subproblem 9 z = 42 6/7 x1 = 1, x2 = 6/7 x3 = 0, x4 = 1 X2 = 0

Subproblem 3 z = 43 5/7 x1 = 1, x2 = 5/7 x3 = 1, x4 = 0 X2 = 1 Subproblem 5 z = 43 3/5 x1 = 3/5, x2 = 1 x3 = 1, x4 = 0 X1 = 1 Subproblem 7 Infeasible

Subproblem 4 z = 36 x1 = 1, x2 = 0 x3 = 1, x4 = 1
Candidate Solution

X1 = 0 Subproblem 6 z = 42 x1 = 0, x2 = 1 x3 = 1, x4 = 1
Candidate Solution

Optimal Solution z = 42 x1 = 0, x2 = 1 x3 = 1, x4 = 1

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

IMPLICIT ENUMERATION Implicit enumeration is used to solve 0-1 IPs with more than 1 constraint. It uses the fact that each variable must equal 0 or 1 to simplify both the branching and bounding components and to efficiently determine when a node is feasible.

1
X3 = 1

If there are six binary variables X1, X2, X3, X4, X5, and X6 X2, X3, and X4 are fixed variables

2
X4 = 1

3
X2 = 1

while X1, X5, and X6 are free variables

Main Ideas in Implicit Enumeration: 1. To find a good completion of the node that is feasible in 0-1 IP, we set each free variable equal to the value (0 or 1) that makes the objective function largest (in a maximization problem) or smallest (in a minimization problem). If the completion of this node is feasible, then it is the best completion of the node and further branching on the node is unnecessary. Example: max z = 4x1 + 2x2 - x3 + 2x4 s.t. x1 + 3x2 - x3 - 2x4 1 xi = 0 or 1 (i = 1,2,3,4) Best Completion : (x1, x2, x3, x4) = (1, 1, 0, 1) *Suppose we are at node 4 where x1 = 0, x2 = 1 Best Completion: x1 = 0, x4 = 1 (x1, x2, x3, x4) = (0, 1, 0, 1) ; z = 4 Feasible? 0 + 3 0 - 2 = 1; since 1 1, then the completion is feasible. ***Node 4 is fathomed ; (x1, x2, x3, x4) = (0, 1, 0, 1) ; z = 4 is a candidate solution.

IE 142: OPERATIONS RESERCH II INTEGER PROGRAMMING

2. Even if the best completion of the node is not feasible, the best completion gives us a bound on the best objective function values that can be obtained via feasible completion of the node. This bound can be used to eliminate a node from consideration. Example: Suppose we have previously found a candidate solution with z = 6, the objective function is max z = 4x1 + 2x2 + x3 - x4 + 2x5 Also, suppose that we are at a node where the fixed variables are x1 =0, x3 = 1. Best Completion: x4 = 0, x5 = 1 (x1, x2, x3, x4, x5) = (0, 1, 1, 0, 1) ; z = 2 + 1 + 2 = 5. Since z = 5 cannot beat the candidate with z = 6, this node can be eliminated from consideration (whether or not the completion is feasible is irrelevant.) 3. At any node, is there an easy way to determine if all completions of the node are infeasible? Suppose we are at node 4, with fixed variables x2 = 1, x3 = 1, and x4 = 1. Also, one of the constraints is -2x1 + 3x2 + 2x3 - 3x4 - x5 + 2x6 -5. We assign values to the free variables that make the left-hand side as small as possible. If this completion of node 4 wont satisfy the constraint given, then certainly no completion of node 4 can satisfy the constraint. We set x1 = 1, x5 = 1, and x6 = 0. Substituting these values to the constraint, -2 + 3 + 2 - 3 - 1 -5. Since the inequality does not hold, no completion of node 4 can be feasible for the original problem and node 4 can be eliminated from consideration. In general, we check if a node has a feasible completion by looking at each constraint and assigning each free variable the best value (as described by the table below). If even one constraint is not satisfied by its most feasible completion, we know that the node has no feasible completion. In this case, the node cannot yield the optimal solution to the original IP. Type of Constraint Sign of Free Variable's Coefficient in Constraint + + Value Assigned to Free Variable in Feasibility Check 0 1 1 0 x2 = 1,