Simplex Algorithm
Simplex Algorithm
Simplex Algorithm
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 = aX1 + bX2 + cX2 + ... (e.g. Z = 3X1 + 2X2 + X3) Subject to one or more linear constraints of the form AX1+ BX2 + CX3 + . . <or= N (e.g. X1 + X2 + 3X3 <or= 12) The desired largest (or smallest) value of the objective function is called the optimal value, and a collection of values of X1,X2,X3, . . . that gives the optimal value constitutes an optimal solution.The variables X1, X2, X3, . . are called the decision variables.
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 : 0011 0010 1010 1101 0001 0100 1011 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.
Optimum Solution- Any BFS which optimizes(maximizes or minimizes) the objective function. Tableau Form- When a LPP is written in a tabular form 0011 0010 1010 1101 up the Initial Simplex Tableau. prior to setting 0001 0100 1011 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(Cj-Zj )- 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.
To understand the method,let us take an example containing two decision variables and two constraints. Example: Maximize Z = 7X1+5X2 , subject to the constraints, 0011 0010 1010 1101 0001 0100 1011 X1+2X2 < or = 6 4X1+3X2 < or = 12 and X1 & X2 are non-negative.
4
6/1=6 12/4=3
Divide XB 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 S2 is the pivotal row.
Zj (Net Evaluation)Cj - Zj
4
S2
Step 7: If all the (Cj-Zj) values are zero or negative,an optimum point is reached 0011 0010 1010 1101repeat the process as given in otherwise 0001 0100 1011 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: X1=3, X2=0 and, Max Z=21.
Indeed, the penalty is so costly that unless any of the respective variables' inclusion is warranted algorithmically, such variables will never 1011 0011 0010 1010 1101 0001 0100 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.
Example: Minimize Z= 600X1+500X2 subject to constraints, 2X1+ X2 >or= 80 0011 0010 1010 1101 0001 0100 ,X2 >or= 0 X1+2X2 >or= 60 and X1 1011
2 1 1 2 Zj 3M 3M Cj - Zj 600-3M 500-3M
4
A1 1 0 M 0 A2
1
M
0 80 1 60 M 0
2
Min.Ratio (XB/Pivotal Col.)
It is clear from the tableau that X2 will enter and A2 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: 0011 0010 1010 1101 0001 0100 1011 R2(New) = R2(Old)/2 R1(New) = R1(Old) - 1*R2(New)
Cj Basic Basic CB Variab Soln(XB) le (B) M 500 A1 X2 50 30 600 X1 3 2 1 2 Zj 3M/2+250 Cj - Zj 350-3M/2 500 X2 0 1 500 0 0 S1 -1 0 M M 0 S2
1 2 - 1/2
M/2-250 250-M/2
4
1 0 0 M
1
M A1
100/3 60
It is clear from the tableau that X1 will enter and A1 will leave the basis. Hence 2 is the key element in pivotal column. Now,the new row operations are as follows: 0011 0010 1010 110110001 0100 1011 R1(New) = R (Old)*2/3 R2(New) = R2(Old) (1/2)*R1(New)
Cj CB 600 500 Basic Varia Basic ble Soln(XB) (B) X1 X2 100/3 40/3 Zj Cj - Zj
600 X1 1 0 600
0
500 X2 0 1 500 0
0 S1 2 3 1 3 700 3 700 3
4
S2 1 3 2 3 400 3 400 3
1
0
Since all the values of (Cj-Zj) are either zero or positive and also both the artificial 0011 0010 1010 1101 0001 0100 1011 variables have been removed, an optimum solution has been arrived at with X1=100/3 , X2=40/3 and Z=80,000/3.