Integer Linear Programming Chapter 9 Integer Linear Programming
Main Topics Integer Linear Programming Models Integer Linear Programming Model Solution Computer Solution of Integer Linear Programming Problems
Introduction Assumption used in LP models was that solutions could be fractional or real numbers Required to solve a problem so that an optimal integer solution is guaranteed Integer linear programming technique with several solution approaches are demonstrated
Three Types of ILP Models Three types of integer linear programming models Total integer model 0-1 integer model Mixed integer model All decision variables have integer solution values All decision variables have integer values of zero or one Some decision variables have integer solutions Consider following examples presented in next slides
A Total Integer Example Each press machine will increase profit by $100 and lathe will increase profit by $150 Limited budget and space for the number of machines Price for press is $8,000 and requires 15 square feet, whereas the price for lathe is $4,000 and requires 30 square feet Budget is $40,000 and there is 200 square feet of floor space How many of each type of machine can be purchased to maximize profit?
Formulation of the Problem The ILP is exactly the same way as the linear programming technique The only difference is the restrictions that are placed for the decision variables which are restricted to integer values LP model for this problem is: Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤00 ft2 x1 and x2 ≥ 0 and integer x1 = number of presses and x2 = number of lathes Note both decision variable are restricted to integer
A 0-1 Integer Model Example Contemplating a research and development (R&D) program encompassing four research projects Constrained by the number of OR specialists and budget Expected profit, cost and OR specialists requirements for each project is as follows Only A or B can chosen Project Expected cost OR Specialists required Expected Profit (thousands of dollars) A 35,000 4 300 B 10,000 2 90 C 25,000 7 400 D 90,000 3 150
Formulation of the Problem Model is formulated as: Max Z = 300A + 90B + 400C + 150D s.t. $35,000A +10,000 B+25,000 C+90,000 D ≤ $120,000 4A + 2B + 7C + 3D≤12 OR Specialists A + B=1 Mutually Exclusive Projects A, B, C, D = 0 or 1 where A= select of project A B= select of project B C= select of project C D= select of project D A+B=1, reflects that either of the projects can be selected but not both Would result in a solution that would include A = 1 or B= 1 but both would not equal one
A Mixed Integer Model Example $500,000 to invest in townhouses and a land Receive $8,000 for each townhouse and $6,000 for each acre of land Townhouse costs $70,000 and $30,000 per acre of land Annual maintenance cost for a townhouse and for an acre of land is $1,000 and $2,000 Budget for maintenance costs is $14,000 How much to invest in townhouses and land in order to maximize annual return
Formulation of Problem Solution values for townhouses must be integers Solution value for land can be less than an acre x1 is restricted to integer values, whereas x2≥0 Formulated as: Max Z=8000x1+6000x2 s.t. 70,000 x1+30,000x2 ≤500,000 1000x1+2000x2≤14,000 x1≥0 and integer x2≥0
Integer Programming Model Solution A solution is to round off fractional portion of solution values to integer values Consider total integer model formulated earlier Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤200 x1 and x2 ≥ 0 and integer Solving this model as a regular LP model results in x1=2.22 and x2=5.55 Solution values must be integers, thus, round off these two values to the closest integers (x1=2 and x2=6) Substituting these values into the second model constraint violates constraint and thus is infeasible
Problems with the Rounding Off Solutions One way is to round down the noninteger solution values Works best where the constraints are all less ≤ A feasible integer solution occurs when x1=2 and x2=5 resulting in a lower profit Does not apply to 0-1 integer models where there exits a “yes-no” decision A more direct approach is required Branch and bound method is the most popular approach
The Branch and Bound Approach The branch and bound approach partitions the total set of feasible solutions into smaller subsets of solutions These can then be evaluated systematically until the best solution is found Total integer model example will be used to demonstrate the branch and bound approach First, use TORA to solve this model as a regular linear programming model without integer restrictions (i.e., the integer restrictions are relaxed) Optimal relaxed solution is x1 = 2.22, x2= 5.56, and z=1,055.56 A tree consisting of nodes and branches are used as a framework for solution process
The First Node of the B&B Tree UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) First node contains the LP solution with an upper bound (UB) of $1,055.56 and a lower bound (LB) of $950 LB is obtained from the rounded-down solution whereas UB is from relaxed simplex solution Optimal integer solution will be between these two bounds First step is to create two solution subsets Accomplished by selecting arbitrarily one of the integer variables x2=5.56 is selected arbitrarily, then 5<x2<6 can be eliminated as nonpromising Equivalent by adding: x2 ≤5 and x2≥6 Would create two subsets of solution which can then be checked individually for optimal integer values 1 x2≥6 x2≤5 2 3 x2 x1
The Solution at Node 2 UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) Solution at node 2 is found by solving following model with x2≤5: Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤200 x2≤5 x1,x2 ≥ 0 Optimal solution is x1 = 2.5, x2= 5, and Z = 1,000 1 x2≤5 x2≥6 2 3 UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) x2 x1
The Solution at Node 3 1 x2≤5 x2≥6 2 3 UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) Solution at node 2 is found by solving following model with x2≤6: Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤200 x2≥6 x1,x2 ≥ 0 Optimal solution is x1 = 1.33, x2= 6, and Z = 1,033 Upper bound at node 2 is $1,000, whereas at node 3 is $1,033 Lower bound at each of these nodes is the maximum integer solution Since neither one is totally integer, lower bound remains $950 as the maximum integer solution 1 x2≤5 x2≥6 2 3 UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) x2 x1
Checking for Optimal Solution UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) No optimal integer solution yet, we must continue branching process Reveals that we should branch from a node with higher upper bound Steps are repeated at node 3 Select the variable whose value is not integer x1 will be selected Two new constraints are developed from x1 :x1 ≥2 and x1≤1 Creates a new branch and bound at node 3 as: New subset LP models with added constraint must be solved individually Original LP model is now the one that was left out at node 3 not at node 1 1 x2≤5 x2≥6 2 3 UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) x1≤1 x1≥2 4 5
The Solution at Node 4 and Node 5 UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) Relaxed LP model at node 4 model is: Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤200 x2≥6 x1≤1 x1,x2 ≥ 0 And LP model at node 5 is: x1≥2 1 x2≤5 x2≥6 2 3 UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) x1≤1 x1≥2 4 5
Solution at Node 4 and Node 5 UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) Optimal solution at node 4 is: There is no feasible solution at node 5 Indicates we still have not reached an optimal integer solution must repeat branching steps No upper bound at node 5, we must branch from node 4 Two new constraints are: x2 ≤6 and x2≥7 1 x2≤5 x2≥6 3 2 UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) x1≥2 x1≤1 5 4 No feasible solution UB=1025 (X1=1, x2=6.17) LB=950 (x1=2, x2=5) x2 ≤6 x2≥7 6 7
The Solution at Node 6 and Node 7 UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) New subset LP models must be solved individually at nodes 6 and 7 Relaxed LP model at node 6 is: Max Z = $100x1 + 150x2 s.t. 8,000x1 + 4,000x2 ≤$40,000 15x1+30x2≤200 x2≥6 x1≤1 x2≤6 x1,x2 ≥ 0 Relaxed LP model at node 7 is: x2≥7 1 x2≤5 x2≥6 3 2 UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) x1≥2 x1≤1 5 4 No feasible solution UB=1025 (X1=1, x2=6.17) LB=950 (x1=2, x2=5) x2 ≤6 x2≥7 6 7
The Optimal Solution UB=1055.56 (X1=2.22, x2=5.56) LB=950 (x1=2, x2=5) Solution at node 7 is infeasible and solution at node 6 x1=1 and x2=6 Optimal integer solution has been reached Z-value of 1,000 is the maximum, or upper bound, that can be obtained Lower bound is $1,000 Integer solution at node 6 is optimal 1 x2≤5 x2≥6 3 2 UB=1033 (X1=1.33, x2=6) LB=950 (x1=2, x2=5) UB=1000 (X1=2.5, x2=5) LB=950 (x1=2, x2=5) x1≥2 x1≤1 5 4 No feasible solution UB=1025 (X1=1, x2=6.17) LB=950 (x1=2, x2=5) x2 ≤6 x2≥7 6 7 UB=1000 (x1=1, x2=6) LB=1000 (x1=1, x2=6) No feasible solution
The Solution of the 0-1 Integer Model Used to solve 0-1 integer model by adding 0-1 restrictions Same basic steps are used for a 0-1 integer model with a few minor changes Consider 0-1 integer model for selecting R&D projects as: Max Z = 300A+90B+400C+ 150D s.t. $35,000A +10,000 B+25,000 C+90,000 D ≤ $120,000 4A + 2B + 7C + 3D≤12 A + B=1 Four constraints have to be added in place of single restriction A, B, C, D=0 or 1 A≤1, B≤1, C≤1, D≤1 A variable with the fractional part will be selected Two new constraints, one equal to zero and one equal to one, can be developed Optimal solution is reached when a feasible solution is generated at a node that has 0-1 values and that has reached the maximum upper bound
The Solution for Mixed Integer Model Solved using same concept used in total integer model One of variables is selected and rounded down to achieve the lower bound Optimal solution is achieved when a feasible solution that has integer values Upper bound should be maximum
The Computer Solution of ILP with Excel Solved using Excel spreadsheets and TORA Use same steps with a few minor changes For the 0-1 problems, establish 0-1 condition for decision variables achieved by constraining the decision variable cells to be ≤1 Constrain decision variables to be integer Establish a condition that generate a 0-1 solution for decision variables For the total integer problems, designate the cells presenting decision variables as being "integer" Accomplish this by adding a constraint within the solver that establishes these cells as integers For the mixed integer problem, designate the cells that are required to be integer or real value These are differences between solving a regular LP model and an integer programming model
The Computer Solution of ILP with TORA ILP problems can be also solved using TORA TORA generates branch and bound interactively Select “User-Guided B&B” in the output screen of the ILP module. Provides all the information needed to create B&B tree Read corresponding section in your textbook.