Download presentation

Presentation is loading. Please wait.

Published byRohan Liddicoat Modified about 1 year ago

1
Solving Linear Programming Problems Shubhagata Roy

2
Q. What is a Linear Programming Problem? A. A Linear Programming Problem(LPP) is a problem in which we are asked to find the maximum (or minimum) value of a linear objective function Z = aX 1 + bX 2 + cX 2 +... (e.g. Z = 3X 1 + 2X 2 + X 3 ) Subject to one or more linear constraints of the form AX 1 + BX 2 + CX 3 +..

3
Simplex Method The most frequently used method to solve LP problems is the Simplex Method. Before going into the method, we must get familiarized with some important terminologies : Standard Form- A linear program in which all the constraints are written as equalities. Slack Variable- A variable added to the LHS of “Less than or equal to” constraint to convert it into an equality. Surplus Variable- A variable subtracted from the LHS of “More than or equal to” constraint to convert it into an equality. Basic Solution- For a system of m linear equations in n variables (n>m),a solution obtained by setting (n-m) variables equal to zero and solving the system of equations for remaining m variables. Basic Feasible Solution(BFS)- If all the variables in basic solution are more than or equal to zero.

4
Optimum Solution- Any BFS which optimizes(maximizes or minimizes) the objective function. Tableau Form- When a LPP is written in a tabular form prior to setting up the Initial Simplex Tableau. Simplex Tableau- A table which is used to keep track of the calculations made at each iteration when the simplex method is employed. Net EvaluationRow(C j -Z j )- The row containing net profit or loss.The nos.in this row are also known as shadow prices. Pivotal Column- The column having largest positive(or negative) value in the Net Evaluation Row for a maximization(or minimization) problem. Pivotal Row- The row corresponding to variable that will leave the table in order to make room for another variable. Pivotal Element- Element at the intersection of pivotal row and pivotal column.

5
To understand the method,let us take an example containing two decision variables and two constraints. Example: Maximize Z = 7X 1 +5X 2, subject to the constraints, X 1 +2X 2 < or = 6 4X 1 +3X 2 < or = 12 and X 1 & X 2 are non-negative. Step1: Convert the LP problem into a system of linear equations. We do this by rewriting the constraint inequalities as equations by adding new "slack variables" and assigning them zero coefficients(profits) in the objective function as shown below: X 1 +2X 2 +S 1 = 6 4X 1 +3X 2 +S 2 = 12 And the Objective Function would be: Z=7X 1 +5X 2 +0.S 1 +0.S 2

6
Step 2: Obtain a Basic Solution to the problem. We do this by putting the decision variables X 1 =X 2 =0, so that S 1 = 6 and S 2 =12. These are the initial values of slack variables. Step 3: Form the Initial Tableau as shown.

7
Step 4: Find (C j -Z j ) having highest positive value. The column corresponding to this value,is called the Pivotal Column and enters the table. In the previous table,column corresponding to variable X 1 is the pivotal column. Step 5: Find the Minimum Positive Ratio. Divide X B values by the corresponding values of Pivotal Column.The row corresponding to the minimum positive value is the Pivotal Row and leaves the table. In the previous table,row corresponding to the slack variable S 2 is the pivotal row.

8
Step 6: First Iteration or First Simplex Tableau. In the new table,we shall place the incoming variable(X 1 ) instead of the outgoing variable(S 2 ). Accordingly,new values of this row have to be obtained in the following way : R 2 (New)=R 2 (Old)/Pivotal Element = R 2 (Old)/4 R 1 (New)=R 1 (Old) - (Intersecting value of R 1 (Old) & Pivotal Col)*R 2 (New) =R 1 (Old) - 1*R 2 (New)

9
Step 7: If all the (C j -Z j ) values are zero or negative,an optimum point is reached otherwise repeat the process as given in Step 4,5 & 6. Since all the (Cj-Zj) values are either negative or zero,hence an optimum solution has been achieved.The optimum values are: X 1 =3, X 2 =0 and, Max Z=21.

10
Big-M Method of solving LPP The Big-M method of handling instances with artificial variables is the “commonsense approach”. Essentially, the notion is to make the artificial variables, through their coefficients in the objective function, so costly or unprofitable that any feasible solution to the real problem would be preferred....unless the original instance possessed no feasible solutions at all. But this means that we need to assign, in the objective function, coefficients to the artificial variables that are either very small (maximization problem) or very large (minimization problem); whatever this value,let us call it Big M. In fact, this notion is an old trick in optimization in general; we simply associate a penalty value with variables that we do not want to be part of an ultimate solution(unless such an outcome Is unavoidable).

11
Indeed, the penalty is so costly that unless any of the respective variables' inclusion is warranted algorithmically, such variables will never be part of any feasible solution. This method removes artificial variables from the basis. Here, we assign a large undesirable (unacceptable penalty) coefficients to artificial variables from the objective function point of view. If the objective function (Z) is to be minimized, then a very large positive price (penalty, M) is assigned to each artificial variable and if Z is to be minimized, then a very large negative price is to be assigned. The penalty will be designated by +M for minimization problem and by –M for a maximization problem and also M>0.

12
Example: Minimize Z= 600X 1 +500X 2 subject to constraints, 2X 1 + X 2 >or= 80 X 1 +2X 2 >or= 60 and X 1,X 2 >or= 0 Step1: Convert the LP problem into a system of linear equations. We do this by rewriting the constraint inequalities as equations by subtracting new “surplus & artificial variables" and assigning them zero & +M coefficientsrespectively in the objective function as shown below. So the Objective Function would be: Z=600X 1 +500X 2 +0.S 1 +0.S 2 +MA 1 +MA 2 subject to constraints, 2X 1 + X 2 -S 1 +A 1 = 80 X 1 +2X 2 -S 2 +A 2 = 60 X 1,X 2,S 1,S 2,A 1,A 2 >or= 0

13
Step 2: Obtain a Basic Solution to the problem. We do this by putting the decision variables X 1 =X 2 =S 1 =S 2 =0, so that A 1 = 80 and A 2 =60. These are the initial values of artificial variables. Step 3: Form the Initial Tableau as shown.

14
It is clear from the tableau that X 2 will enter and A 2 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R 2 (New) = R 2 (Old)/2 R 1 (New) = R 1 (Old) - 1*R 2 (New)

15
It is clear from the tableau that X 1 will enter and A 1 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: R 1 (New) = R 1 (Old)*2/3 R 2 (New) = R 2 (Old) – (1/2)*R 1 (New)

16
Since all the values of (C j -Z j ) are either zero or positive and also both the artificial variables have been removed, an optimum solution has been arrived at with X 1 =100/3, X 2 =40/3 and Z=80,000/3.

17

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google