VIEWS: 5 PAGES: 41 POSTED ON: 11/3/2011
Topic 8 Integer Programming (IP) Example x2 X1<=2 2 X1+10x2≤20 (A) (2,2) Max: z=X1+5X2 1.8 Sub to: 1 (z) x1+10x2≤20 1,1 2,1 x1 ≤2 x1,x2≥0 1 2 x1 Optimal (Non-Integer) solution: x1*=2, x2*=1.8 Z*=11 x1,x2=No. of machines =must be integer Example x2=1.8 x2=2 (x1=2, x2=2 ) point A infeasible x2=1.8 x2=1 (x1=2,x2=1 ) point B Z=7 (much lower than that at point C (x1=0, x2=2) At point C: Z=0*1+5*2=10 >>7 Graphical Solution to PROTRAC ILP All Rounded Solutions Are Infeasible IP: Integer Linear Programming In LP, Divisibility Assumption implies that decision variables can be either Integer or Fraction. Many variables in reality (e.g. operators/machines/projects…), however, must be integers. "Rounding off"? Rounding-off non-integers to the nearest integers is often suggested as a simple way to handle integer requirement in LP. However, in many cases, rounding-off approach may result in: An infeasible solution, or A poor sub-optimal solution value. IP: Integer Linear Programming Under Integer Requirement on decision variable values: Integer feasible solution set is a very small subset of the original solution set. An integer optimal solution is not necessarily on a corner point. An efficient solution method for IP is desirable. Classification of ILP Problems 1. Pure ILP problem: All decision variables must be integers. 2. Mixed ILP problem: Part of decision variables must be integers. 3. Zero-One ILP problem: A special case of ILP where all decision variables are either One or Zero (binary variables). Solution Methods for ILP Problems: For small size problems, Complete Enumeration for all feasible integer solutions. For general Pure IP and Mixed IP Problems, Branch & Bound method is normally used with standards LP Simplex procedure (in all common software programs. Special Algorithms for "Zero-One" IP problems. (e.g., Marginal Contribution Approach to “0-1” IP Problem) Marginal Contribution Approach to "0-1" ILP Problem: For Max problem: 1. Arrange variables so that C1 > C2 > C3 >.....> Cn 2. Set initial solution as {Xi = 1, i=1,..n}. 3. Check constraints with given solution values, if "ok", stop. 4. Otherwise, set {Xi = 1, i=1,..n-1, and Xn = 0}. 5. Repeat step 3 - 4 until a feasible solution is reached. 6. Check optimality with some special measures. * For Min problem: (very similar to the above). Sup. P. 8-14: Problem #3 [original] Max Z=20x1+18x2+13x3+30x4+15x5 Sub to: 5x1+20x2+12x3+7x4+4x5≤25 x1, x2,x3,x4,x5=1, or 0 Let y1=x4, y2=x1,y3=x2, y4=x5, y5=x3 So Max: Z =30y1+ 20y2+ 18y3+ 15y4+ 13y5 Sub to : 7y1+ 5y2+ 20y3+ 4y4+ 12y5≤25 Step-1: let y1=y2=y3=y4=y5=1, Z=96 Infeasible Step-2: let y1=y2=y3=y4=1,y5=0,Z=83 Infeasible Step-3: let y1=y2=y3=1,y4=y5=0,Z=68 Infeasible Step-4: let y1=y2=1,y3=y4=y5=0, Z=50 feasible/optimal? Step-5: let y1=y2=y4=1,y3=y5=0, Z=65 optimal “smart” approach: marginal contribution approach each “unit” of resources maximal return MC=cj/aj=c1/a1 M1=20/5=4 , M2=18/20=0.9, M3=13/12=1.083, M4=4.28 , M5=3.75 (Y2) (Y5) (Y4) (Y1) (Y3) Max: Z=30Y1+20Y2+15Y3+13Y4+18Y5 Sub to: 7Y1+5Y2+4Y3+12Y4+20Y5≤25 Step-1: let y1=y2=y3=y4=y5=1, Z=96 Infeasible Step-2: let y1=y2=y3=y4=1,y5=0,Z=78 Infeasible Step-3: let y1=y2=y3=1,y4=y5=0,Z=65 optimal Police Search a Bad Guy The suspect ran into a 3-level, 9-room Building. You are told- the suspect is 6’2’’ or higher. First (101) (102) (103) floor (5’10’’) (5’8’’) (5’9’’) 2 nd (201) (202) (203) floor (5’7’’) (6’1’’) (6’3’’) 3 rd (301) (302) (303) floor (5’6’’) (5’11’’) (5’9’’) Police Search a Bad Guy Search step: 1.Divide the whole building into 3 level (branching) 2.Identify “highest” person in each floor (bounding) 1st floor: highest=5’10’’ 2nd floor: highest=6’3’’ 3ed floor: highest=5’11’’ Police Search a Bad Guy 3. Stop searching for 1st & 3rd floor Going to 2nd floor 4.Checking all 3 rooms in 2nd floor (branching) 5. Identify “highest” person in each room (bounding) (201: 5’7’’) (202: 6’1’’) (203: 6’3’’) 6.Stop searching for (201)(202) go to (203) Branch and Bound Method (BBM) BBM: is a general problem solving approach in which, 1. Branching: The problem is first divided into several sub- problems by branching the whole set of solutions into several subsets. 2. Bounding: After the initial solution is identified and set as "current" solution, the Upper and Lower Bound on the solution value for each sub problem are identified, and used to update "current" solution. 3. Branching and bounding continue until the optimal solution is reached, or no more branches can be made. BBM can be used in many decision-making problems, however, branching may be very difficult and the bounds may be unattainable in many cases. With Simplex, BBM is used in solving ILP problems. Branch and Bound Method (BBM) Basic Steps of BBM: 1. Identify initial solution & branching problem into sub problems. 2. Search UB (for Max problem) or LB (for Min problem) for each sub problem. 3. Update "current" solution and drop the branches that either “infeasible" or "worse" than "current" solution. 4. Repeat until: no more branching or UB=LB (optimal solution). Six Steps in Solving Integer Programming Maximization Problems by BBM 1. Solve the original problem using LP. If the answer satisfies the integer constraints, we are done. If not, this value provided an initial upper bound. 2. Find any feasible solution that meets the integer constraint for use as a lower bound. Usually, rounding down each variable will accomplish this. 3. Branch on one variable from step 1 that does not have an integer value. Split the problem into two sub problems based on integer values that are immediately above and below the no integer value. For example: if X2=3.75 was in the final LP solution, introduce the constrain X2≥4 in the first sub problem and X2 ≤3 in the second sub problem. Six Steps in Solving Integer Programming Maximization Problems by BBM 4. Create nodes at the top of these new branches by solving the new problems. 5. If a branch yields a solution to the LP problem that is not feasible, terminate the branch If a branch yields a solution to the LP that is feasible, but not an integer solution, go to step 6. If the branch yields a feasible integer solution, examine the value of the objective function. If this value equals the upper bound, an optimal solution has been reached. If it is not equal to the upper bound, but exceeds the lower bound, set it as the new lower bound and go to step 6. Finally, if it is less than then lower bounds, terminate this branch. 6. Examine both branches again and set the upper equal to the maximum value of the objective function at all final nodes. If the upper bound equals the lower bound, stop. If not, go back to step 3. Go to Examples – Supplement p.8-9 to 8-10. Cost Table for Assignment Problem Illustrating Branch-and-bound techniques Assignment 1 2 3 4 Assignee A 94 1 54 68 B 74 10 88 82 C 62 88 8 76 D 11 74 81 21 Assigning: Assignment 1: (By Column) A to 1: (94)+10+8+21=133 (Feasible) B to 1: (74)+1+8+21=104 (Feasible) C to 1: (62)+1+54+21=138 ( Infeasible) D to 1: (11)+1+8+68=88 (Infeasible) Branch: (A to 1) and (C to 1)-------- (Out) (B to 1)------104 [Correct Solution] (D to 1)------88<104 [Continuing------Branching] [Branching] (D-to-1): (A to 2): (11)+1+8+76=96 (Feasible) (B to 2); (11)+10+8+68=97 (Feasible) (C to 2): (11)+88+54+68=221 (Since 221>97 ~ out) Since: 97<104 (Branch [B-to-1] ------ out) So, (97) is a New Branch (Correct Solution) (96<97 ------ Infeasible, Continuing Branch) [D-1, A-2,] B-3: (11)+(1)+88+76=176 (Feasible) C-3: (11)+(1)+8+82=102 (Feasible) Since: 176>97 102>97 So, Best Solution: A-4 B-2 Total Cost C-3 =97 D-1 Summary and Results For the Branch-and-bound Technique Applied to The Assignment Problem Example Iteration Best ZL ZU 0 41 +∞ 1 88 104 2 96 97 3 97 97 Mixed Integer Problem: Sup. P.8-11 Branch-and-Bound Solution Example Min Total Cost project person 1 2 3 A $11 14 6 B 8 10 11 C 9 12 7 A-1: (11)+10+7=28 B-1: (8)+12+6=26 C-1: (9)+10+6=25 Example Project 1 Project 2 Project3 28 By column A Feasible 26 B A Feasible B 25 C Feasible Managerial Applications of Binary Variables Binary variables are important to the formulation of many managerial requirement constraints in real-world LP applications. No More Than K out of N Alternatives: Only K projects can be selected out of N available under given budget limit. X1 + X2 + ...... + Xn ≤ K (Xi = 0 or 1, i=1,....n) Dependent Decisions: A variable (e.g., a project) can only be selected (has a positive value) upon another variable (e.g., a preceding project) being selected. Xj - Xi ≤ 0 (or in general) (Xi+..+Xn) - (Xj+..+Xm) ≤ K (K ò 0) Lot-size Constraints (either/or conditions): A variable (e.g., the number of a part/product) either has a positive value larger (or smaller) than K if selected or not selected (has a value of zero). Xi ≤ k·Yi (or) Xi ≥ K·Yi (Xi ≥ 0, Yi = 0 or 1) Managerial Applications of Binary Variables K out of M Constraints Must Be Satisfied: Given original M constraints: Gj(Xi, X2, ...Xn) ≤ bj (j=1,....M) Let Yj = 0 or 1, (j=1,...M), then For M constraints: Gj(Xi, X2, ...Xn) ≤ bj·Yj + (1-Yj)·U (j=1,......M) Y1 + Y2 + ..... + Ym = K Where U is a larger number selected so that to guarantee Gj(Xi, X2, ...Xn) ≤ U (for all Yj = 0, j=1,......M) (Handout Examples) Handout: Problem #1 Formulation: Given: total $100,000 to invest in 20 stock (i=1,2,…20) Return rate for 20 stocks = ri (i=1,2,…,20) Objective: Maximize Total Return Define: Xi – amount invested in stock i (i=1,2,…20) Obj. Function: Max: Z=r1X1+r2X2+……+r20X20 Sub to: (1) X₁+X₂+…+X20 ≤100,000 (2) Xi ≤ 20,000Yi (i=1,2,…20) (3) Xi ≥ 5,000Yi (i=1,2,…,20) (Xi ≥ 0) Required Lot-size Constraint: 5,000 ≤ Xi ≤ 20,000 (i=1,2,…,20) Define: Yi= 1 if you invest in stock i (i=1,2,…,20) 0 otherwise Handout: Problem #2 Define Variables: Columbus Denver Let i=1,2,3,4 for Destination LA NY j=1,2,3 for time slot (8-10-12) 1, if a flight to i occurs in time slot j So, Xij= 0 otherwise Yj = No. of Airplanes rented for time slot j Objective Function: Max Z = (10X11+6X12+……+10X43)- (5Y₁+5Y₂+3Y₃) Sub to: X11+X12+X13 ≤ 1 X21+X22+X23 ≤ 1 (No more than one flight to each city) X31+X32+X33 ≤ 1 X41+X42+X43 ≤ 1 X11+X21+X31+X41 ≤ Y₁ X12+X22+X32+X42 ≤ Y₂ (Total flight in each time slot) X13+X23+X33+X43 ≤ Y₃ Yj ≤ 2 (j=1,2,3) (No more than two in each time slot) X4j – X2j ≤ 0 (j=1,2,3) (Dependent Decisions) (to NY) (to LA) (Xij = 0 or 1 Yj = Integer) Special Considerations for ILP Problems In BBM, there are different searching strategies - horizontal vs. vertical search. Computer solution software usually handle these issues automatically. In general, ILP problems are more sensitive to the parameter changes than LP problems. Due to the computational complexity, however, there is no Sensitivity Analysis information available from ILP solution printouts. You need to run repeatedly with different parameters to obtain sensitivity information. Special Considerations for ILP Problems Solution Methods to General ILP Problems: In addition to BBM, Cutting Plane and Lagragian Relaxation methods are developed as "exact" solution techniques for general ILP problems. However, research results indicated that in practice, some specific "non-exact" solution heuristics may be more valuable in terms of: Efficiency/Cost of Solution/Useful Information Provided. Major Issues in Real-World ILP Applications: A large-scaled MILP problem is usually involved. Specific formulation and modeling are needed. Special solution algorithm must be developed for specific problem.