41
Integer programming Group members: Ibrahim jan Qesar Habib Najeebullah

Group members: Ibrahim jan Qesar Habib Najeebullah

Embed Size (px)

Citation preview

Slide 1

Integer programming Group members: Ibrahim janQesar HabibNajeebullahLinear programmingLinear programming (LP, or linear optimization) is a mathematical method. for determining a way to achieve the best outcome (such as maximum profit or lowest cost).mathematical model for some list of requirements represented as linear relationships. Linear programming is a specific case of mathematical programming (mathematical optimization).More formally, linear programming is a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints.Integer linear programmingAn integer programming problem is a mathematical optimization or feasibility program in which some or all of the variables are restricted to be integers. Integer programming problem are a special class of linear programming where all are some of the variable in the optimal solution are restricted to non-negative integer value.Linear programming problem are based on assumption that the decision variable are continuous with the result that they may take frictional value in the optimal solution e.g. 143/5 unit of product.However many situation in real life may not allow for this and warrant for the decision variable to take only integer value.For example in production, manufacturing is frequently scheduled in term of lots, batches or production runs.In allocation of goods, a shipment of goods involve discrete number of trucks, wagon or aircraft and fractional values are meaningless.Types of integersPure and mixed integer programming. (1) An integer programming in which all variable are required to be integer is called pure integer. (2) An integer programming in which some variable are required to be integer is called mixed integer programming.Mixed integer programming Maximize 20x1 + 8x2 Constraint 5x1 + 7x2+ 63 2x1 + 3x2 + 42

x1 + x2 0 x1 ,integer Pure integer Maximize 20x1 + 8x2 Constraint 5x1 + 7x2+ 63 2x1 + 3x2 + 42

x1 + x2 0 x1 x2 ,integer

Zero-one Model Integer programming A special type of integer programming problem is a case where the value of decision variable are limited to logical variable like Yes or No, Matched or No-Matched which are symbolized by the value 0 and 1 Maximize 20x1 + 8x2 Constraint 5x1 + 7x2+ 63 2x1 + 3x2 + 42

x1 + x2 0 x1=0 (if product is not start) =1(A product is start)11Applications of integer programmingInteger program is used in following. Traveling sales man problem.Capital budgeting. Facility location.Fixed charge problem.

Knapsack

The knapsack problem is a particularly simple integer program: it has only one constraint. Furthermore, the coefficients of this constraint and the objective are all non-negative. For example, the following is a knapsack problem:Maximize 8x1 + 11x2 + 6x3 + 4x4subject to 5x1 + 7x2 + 4x3 + 3x4 14xj 2 f0;1g:Capital Budgeting

Suppose we wish to invest $14,000. We have identified four investment opportunities.Investment 1 requires an investment of $5,000 and has a present value (a time-discounted value) of $8,000; investment 2 requires $7,000 and has a value of $11,000; investment 3 requires $4,000 and has a value of $6,000; and investment 4 requires $3,000 and has a value of $4,000. Into which we place our money so as to maximize our total present value?As in linear programming, our first step is to decide on our variables. we will use a 0-1 variable xj for each investment. If xj is 1 then we will make investment j. If it is 0, we will not make the investment. This leads to the 0-1 programming problem: Maximize 8x1 + 11x2 + 6x3 + 4x subject to 5x1 + 7x2 + 4x3 + 3x4 14 xj 2 f0;1g j = 1; : : :4:Salesman travelling problemA sales man must travel city to city to maintain his account. This week he has to leave his home base and visit four other cities. The home city is city A. use the assignment method to determine the tour that will minimize the total distance of visiting all cities. The total distance of visiting of all cities and returning is given in the table. From city ABCDEA375600150190B375300350175C600300350 500D160350350300E190175500300Solution Put M to prohibit travelling from particular city to itself.

From city ABCDEAM375600150190B375M300350175C600300M350 500D160350350M300E190175500300MNOW PREPARE REDUCE COST TABLEMinimum value subtract from all element in the rows.From city ABCDEAM375600150190B375M300350175C600300M350 500D160350350M300E190175500300MWe have obtained this tableFrom city ABCDEAM225450040B200M1251750C3000M50 200D0190190M140E150325125MAll column have zero.From city ABCDEAM225450040B200M01750C3000M50 200D0190190M140E150325125M. Now draw line covering all zero.From city ABCDEAM225450040B200M01750C3000M50 200D0190190M140E150325125MFrom city ABCDEAM240325040B200M01750C2850M35185D020565M140E00185110MNumber of line covering zero is smaller than n. it need for adjustment. From the uncovered value we select smallest value and subtract it from uncovered values and add with intersection values. we obtained the following tableFrom city ABCDEAM240325040B200M01750C2850M35185D020565M140E00185110MFrom city ABCDEAM275325040B235M01750C2850M0150D020530M105E0015075MAgain not equal. Repeat the procedure and obtained the table.From city ABCDEAM275325040B235M01750C2850M0150D020530M105E0015075MFrom city ABCDEAM275295010B265M02050C2850M0120D02050M75E0015075MAgain not equal. Repeat procedure. We have obtained the following table.From city ABCDEAM275295010B265M02050C2850M0120D02050M75E0015075MFrom city ABCDEAM275295010B265M02050C2850M0120D02050M105E0012075M00000= A-D,B-E,C-B,D-C,E-A=A-D-C-B-E-APUT THE VALUES150+350+300+175+190=1165KMFrom city ABCDEA375600150190B375300350175C600300350 500D160350350300E190175500300Example of integer programmingThe owner of ready made garments store sell two type of premium shirt known as zee shirt and star shirts. He make a profit of Rs 200 and Rs 300 per shirt of zee and star shirt. He has two tailor A and B. A tailor can devote a total of 17 hours per day. while tailor B can devote 15 hours a day. Both type of shirts are stitched by both the tailor. the time needed for stitching zee shirt is 2 hour by tailor A and 3 hour by tailor B. a star shirt require 4 hour of tailor A and 3 hour by tailor B. how many shirts of each should be stitched to maximize daily profit. Solve it as integer problem. Solution maximize 2oox1 + 300x subject to 2x1 + 4x2+ 17 Available hours by A 3x1 + 3x2 + 15 Available hours by B

x1 + x2 0, x1 integer Z =2oox1 + 300x+0S1+0S2 subject to 2x1 + 4x2+ S1+0S2= 17 3x1 + 3x2 + 0S1+S2= 15

Basic x1x2s1s2biS1241017S2330115Cj20030000sloutio001715J20030000 Basic x1x2s1s2biS124*1017 4.25S2330115 5Cj20030000sloutio001715J20030000 35Basic x1x2s1s2biX2 300.51.2504.25 8.5S21.5*0-.7512.25 1.5Cj20030000sloutio04.2502.25J500-750 36OPTIMAL SOLOUTION Basic x1x2s1s2biX2 30001.5-.3333.5S2 20010-.5.6661.5Cj20030000sloutio1.53.500JO0-50-33.33 IN THE PREVIOUS TABLE NO INTEGER VALUE IN THE SOLUTION Now we apply cutting plane algorithm( gormay cut),Select first row of the table. 0x1 + x2+.5S1+(-.333)S2= 3.5 0x1 + x2+.5S1+(-1+2/3)S2= 3.5 5S1+2/3S2= .5 (3 +0x1 + 1x2 - 1S2) -5S1-.666S2+S3= -.5

Basic x1x2s1S2 S3biX2 30001.5-.333 03.5S2 200 S3

1

00

0-.5

-.5.666 0

-.666* 11.5

-.5Cj20030000 0sloutio1.53.500 -.5JO0-50-33.33 0Basic x1x2s1S2 S3biX2 30001.750 -.53.5S2 200 S3

1

00

0-1

.750 1

1 -1.51.5

-.5Cj20030000 0sloutio13.750.75 0J00-250 -50TAHNKS