20
Integer programming, Integer programming, MA-4020-Operational MA-4020-Operational Research Research 1 Integer Programming Integer Programming Operational Research - Operational Research - Level 4 Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Embed Size (px)

Citation preview

Page 1: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 11

Integer ProgrammingInteger ProgrammingOperational Research -Level 4Operational Research -Level 4

Prepared by T.M.J.A.Cooray

Department of Mathematics

Page 2: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 22

IntroductionIntroduction In LP problems ,decision variables are non In LP problems ,decision variables are non

negative values, i.e. they are restricted to negative values, i.e. they are restricted to be zero or more than zero.be zero or more than zero.

It demonstrates one of the properties of It demonstrates one of the properties of LP namely, continuity, which means that LP namely, continuity, which means that fractional values of the decision variables fractional values of the decision variables are possible in the solution of a LP model.are possible in the solution of a LP model.

For some problems like: product mix , For some problems like: product mix , balanced diet (nutrition) etc. the balanced diet (nutrition) etc. the assumption of continuity may be valid .assumption of continuity may be valid .

Page 3: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 33

Ctd..Ctd..

Further ,in some problems such as , Further ,in some problems such as , production of different fertilizers (in production of different fertilizers (in kilograms or tonnages ),usage of kilograms or tonnages ),usage of different amounts of food items (in different amounts of food items (in grams) etc. may satisfy the continuity grams) etc. may satisfy the continuity assumption.assumption.

But some items cannot be produced in But some items cannot be produced in fractions. Say ship,cranes,tables,chairs fractions. Say ship,cranes,tables,chairs etc. etc.

Page 4: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 44

Ctd..Ctd..

If we round off the production volume of If we round off the production volume of such products:such products:

Corresponding solution may be Corresponding solution may be different from the optimal solution.different from the optimal solution.

There would be a significant difference There would be a significant difference in the total profit, if the profit per unit of in the total profit, if the profit per unit of each of the products is very high.each of the products is very high.

Page 5: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 55

There are problems where it is also There are problems where it is also necessary to assign people , machines, necessary to assign people , machines, vehicles to activities in integer vehicles to activities in integer quantities.quantities.

That means these variables should take That means these variables should take integer values. integer values.

Hence there is a need for Integer Hence there is a need for Integer programming methods.programming methods.

The mathematical model for IP or more The mathematical model for IP or more precisely ILP is the LP model with one precisely ILP is the LP model with one additional restriction/constraint: additional restriction/constraint: “variables must have integer values”.“variables must have integer values”.

Page 6: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 66

Ctd..Ctd.. If only some of the variables of the If only some of the variables of the

problem should be integers then they are problem should be integers then they are called “called “Mixed IP problemsMixed IP problems””

If all the variables should take integer If all the variables should take integer values then we have “values then we have “Pure IP problems”.Pure IP problems”.

There is another area of There is another area of application,namely problems involving a application,namely problems involving a number of interrelated “yes no decisions” . number of interrelated “yes no decisions” . In such decisions,the only two possible In such decisions,the only two possible choices are yes or no. choices are yes or no.

Page 7: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 77

For example, should we undertake a For example, should we undertake a particular project? Should we make a particular project? Should we make a particular fixed investment? Should we particular fixed investment? Should we locate a facility in a particular site etc.locate a facility in a particular site etc.

with just two choices ,we can with just two choices ,we can represent such decisions by decision represent such decisions by decision variables that are restricted to just two variables that are restricted to just two values.say 0 or 1.values.say 0 or 1.

Thus xThus xjj =1 if decision j is yes =1 if decision j is yes

=0 if decision j is no =0 if decision j is no

Page 8: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 88

such variables are such variables are binary variables or 0-binary variables or 0-1 variables1 variables

IP problems that contain only binary IP problems that contain only binary variables are called variables are called binary integer binary integer programming problems.programming problems.

(BIP problems)(BIP problems)

Page 9: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 99

Consider the following ILP problemConsider the following ILP problem

Maximize Z=7xMaximize Z=7x11+10x+10x22

Subject to : - xSubject to : - x11+3x+3x2 2 ≤6≤6

7x7x11+x+x22 ≤35 ≤35

xx11,x,x22 ≥ 0 and ≥ 0 and

integerinteger

Page 10: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1010

Cutting plane algorithm:Cutting plane algorithm:The general procedure for Gomory’s cutting plane The general procedure for Gomory’s cutting plane

method is as follows:method is as follows:Step1:Step1:find the original LP solution (using the find the original LP solution (using the

simplex method) ignoring the integer constraint. simplex method) ignoring the integer constraint. Step 2:Step 2:if the solution is integer stop. Otherwise , if the solution is integer stop. Otherwise ,

construct a “cut” derived from the row that has construct a “cut” derived from the row that has a non integer variable with the largest fractional a non integer variable with the largest fractional value and add to the current final tableau. If value and add to the current final tableau. If there is a tie select any row arbitrarily.there is a tie select any row arbitrarily.

Step 3:Step 3:solve the augmented LP problem ,and solve the augmented LP problem ,and return to step 2.return to step 2.

Page 11: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1111

Consider the problem shown in Consider the problem shown in slide 15. The optimum tableau is given as The optimum tableau is given as

BasicBasic x1x1 x2x2 s1s1 s2s2 solutionsolution

zz 00 00 63/2263/22 31/2231/22 66 ½66 ½

x2x2 00 11 7/227/22 1/221/22 3 ½ 3 ½

x1x1 11 00 -1/22-1/22 3/223/22 4 ½4 ½

Page 12: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1212

The information in the optimum tableau The information in the optimum tableau can be written explicitly as can be written explicitly as

Z+63/22 S1+31/22 S2 =66 ½Z+63/22 S1+31/22 S2 =66 ½ X2+ 7/22 S1+1/22 S2 =3 ½X2+ 7/22 S1+1/22 S2 =3 ½ X1 -1/22 S1 + 3/22 S2=4 ½ X1 -1/22 S1 + 3/22 S2=4 ½ First ,factor out all the non integer First ,factor out all the non integer

coefficients into an coefficients into an integer valueinteger value and a and a strictly positivestrictly positive fractional componentfractional component..

A constraint row with a non integer A constraint row with a non integer value, can be used as a source row for value, can be used as a source row for generating a cut. generating a cut.

Page 13: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1313

Factoring the x2 row, Factoring the x2 row,

2

132

22

11

22

72 SSX

2

13)

22

10()

22

70( 212 SSX

2

1

2

1

22

1

22

7300 21212 SSSSX

since s1 and s2 are non negative and the corresponding coefficients are positive fractions middle term is 1/2.since the LHS is all integer values we can say it is 0

Page 14: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1414

2

1

22

1

22

721 SS

02

1

22

1

22

721 SS

Any cut can be used in the first iteration of the cutting plane algorithm.This is the constraint , that is added as an additional constraint which is also known as the cut, to the LP optimum tableau.Resulting tableau is:

Page 15: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1515

BasicBasic x1x1 x2x2 s1s1 s2s2 SSgg11 solutiosolutionn

zz 00 00 63/2263/22 31/2231/22 00 66 ½66 ½

x2x2 00 11 7/227/22 1/221/22 00 3 ½ 3 ½

x1x1 11 00 -1/22-1/22 3/223/22 00 4 ½4 ½

SSgg11 00 00 -7/22-7/22 -1/22-1/22 11 -1/2-1/2

We get the following optimal ,but infeasible We get the following optimal ,but infeasible tableau.tableau.

Ratio -9 -31

Smallest absolute value

Page 16: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1616

Applying the dual simplex method to recover Applying the dual simplex method to recover feasibility, yields,feasibility, yields,

BasiBasicc

x1x1 x2x2 s1s1 s2s2 SSgg11 solutionsolution

zz 00 00 00 11 99 6262

x2x2 00 11 00 00 11 3 3

x1x1 11 00 00 1/71/7 -1/7-1/7 4 4/74 4/7

S1S1 00 00 11 1/71/7 -22/7-22/7 1 4/71 4/7This solution is still non integer in x1 and s1.selecting x1

arbitrarily as the next source row the associated cut is 7

4

7

6

7

1212 gg SSS

Page 17: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1717

BasiBasicc

x1x1 x2x2 s1s1 s2s2 SSgg11 SSgg22 solutionsolution

zz 00 00 00 11 99 00 6262

x2x2 00 11 00 00 11 00 3 3

x1x1 11 00 00 1/71/7 -1/7-1/7 00 4 4/74 4/7

S1S1 00 00 11 1/71/7 -22/7-22/7 00 1 4/71 4/7

SSgg22 00 00 00 -1/7-1/7 -6/7-6/7 11 -4/7-4/7

Ratio -7 -31/2

Smallest absolute value

Page 18: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1818

The dual simplex method yields the The dual simplex method yields the following tableau which is optimal, feasible following tableau which is optimal, feasible

and integerand integer..BasiBasi

ccx1x1 x2x2 s1s1 s2s2 SSgg11 SSgg22 solutionsolution

zz 00 00 00 00 33 77 5858

x2x2 00 11 00 00 11 00 3 3

x1x1 11 00 00 00 -1-1 11 44

S1S1 00 00 11 00 -4-4 11 11

S2S2 00 00 00 11 66 -7-7 44

Page 19: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 1919

It is important to note that the It is important to note that the fractional cut assumes that all the fractional cut assumes that all the variables including the slack and variables including the slack and the surplus variables are integer.the surplus variables are integer.

This means that the cut deals with This means that the cut deals with pure integer problems only. pure integer problems only.

Page 20: Integer programming, MA-4020- Operational Research1 Integer Programming Operational Research -Level 4 Prepared by T.M.J.A.Cooray Department of Mathematics

Integer programming, MA-4020-Integer programming, MA-4020-Operational ResearchOperational Research 2020

Consider the following problem .Consider the following problem .

Maximize Z=2x1+x2Maximize Z=2x1+x2 subject to: x1+x2 subject to: x1+x2 5 5

-x1+x2 -x1+x2 00 6x1+2x2 6x1+2x2 2121

x1, x2 are non negative integers.x1, x2 are non negative integers.