Download presentation
Presentation is loading. Please wait.
Published byLoren Washington Modified over 9 years ago
2
LP graphical solution is always associated with a corner point of the solution space. The transition from the geometric corner point solution to the simplex method entails a computational procedure that determines the corner points algebraically. This is accomplished by first converting all the inequalities constraint into equation and then manipulating the resulting equation, in a systematic manner. A main feature of the simplex method is that it solve the LP in iterations. Each iterations move the solution to a new corner point that has the potential to improve the value of objective function.
3
LP solution space in equation form: For the sake of standardization, the algebraic representation of the LP solution space is made under two condition:- A. All the constraints [ with exception of non negativity restriction] are equations with a non negative right-hand side. B. All the variables are non negative.
4
* To convert a (≤) inequality to an equation a non negative slack variable is added to the left-hand side of the constraints. Example :- 6x1 + 4x2 ≤ 24 - Defining s1 as the slack or unused amount of m1 and the constraint can be converted to the following equation 6x1 + 4x2 + s1 =24,s1 ≥ 0 * The converting from (≥) to (=) is achieved by subtracting a non negative surplus variable from the left- hand side of the inequality. Example :- x1 + x2 ≥ 800 - Defining s1 as surplus variables the constraint can be converted to the following equation: x1 + x2 – s1 = 800 s1 ≥ 0
5
* The only remaining requirement is for the right-hand side of the resulting equation to be non negative. * The condition can always be satisfied by multiplying both side of the resulting equation by -1. Example :- The constraint -x1 + x2 ≤ -3 is equivalent to the equation -x1 + x2 + s1 = -3, s1 ≥ 0 Now, multiplying both sides by -1 gives: x1 - x2 - s1 = 3
6
Convert the following OR model into equation format? Maximize z = 5 x1 + 4 x2 Subject to 6 x1 + 4 x2 ≤ 24 x1 + 2 x2 ≤ 6 -x1 + x2 ≤ 1 x2 ≤ 2 x1, x2 ≥ 0
7
in the graphical method, the solution space is delineated by the half-spaces representing the constraints and in the simplex method the solution space is represented by M simultaneous linear equations and N non negative variables. In set of M x N equations (M < N), if we set (N-M) variables equal to zero and then solve the M equation, for the remaining M variables, the resulting solution, if unique, must correspond to a corner point of the solution space.
8
The following example demonstrates the procedure:- Example:- Consider the following LP model with two variables. maximize z = 2x1 + 3x2 subject to:- 1) 2x1 +x2 ≤ 4 2) x1 + 2x2 ≤ 5 x1, x2 ≥ 0 The following figure provides the graphical solution space for the problem :- 1) 2x1+x2 = 4 => x1 = 0 → x2 = 4 (0,4) X2 = 0 → x1 = 4/2 = 2 (2,0) 2)x1 + 2x2 = 5 => x1 = 0 → x2 = 5/2 = 2.5 (0,2.5) x2 = 0 → x1 = 5 (5,0)
9
Algebraically the solution space of the LP is represented as :- maximize z = 2x1 + 3x2 subject to : 2x1 + x2 +s1 =4 x1 + 2x2 + s2 =5 x1,x2,s1,s2 ≥ 0 The system has m=2 equation and n=4 variables. The corner point can be determined algebraically by setting N-M = 4 - 2 = 2 variables equal to zero and then solving for the remaining m=2 variables.
10
Example:- If we set x1=0 and x2=0 the equation provides the solution s1=4 and s2=5, this solution corresponds to point A. Another point can be determined by setting s1=0 and s2=0 and solving the two equation: 2x1 + x2 =4 x1 + 2x2 =5 This yield x1=1 and x2=2 which is point c. x1 = 5-2x2 2x1 +x2 =4 2(5-2x2)+x2=4 10 -4x2+x2=4 10-4=3x2 6=3x2 x2=6/3 =2 X1=5-2x2= 5-4 =1 Table Method: Consider all combinations in which n-m variables are set to zero and solve the resulting equation, once done the optimum solution is the feasible corner point that yield the best objection function value.
11
The N-M variables that are set to zero are known as non basic variables. If the remaining M variables have a unique solution, then they are called basic variables and their solution is referred to as basic solution. The following table provide all basic and non basic solution of the current example:- Objective value feasibleAssociated corner point Basic solution Basic variables Non basic variables (zero) 0YesA(4,5)(s1,s2)(x1,x2) -NoF(4,-3)(x2,s2)(x1,s1) 7.5YesD(2.5,1.5)(x2,s1)(x1,s2) 4YesB(2,3)(x1,s2)(x2,s1) -NoE(5,-6)(x1,s1)(x2,s2) optimum 8 YesC(1,2)(x1,x2)(s1,s2)
12
Ex: Find the optimal solution for the following OR model using the table method? Maximizez = x 1 + x 2 Subject tox 2 – x 1 ≤ 0 x 2 ≤ 3 x 1, x 2 ≥ 0
13
The vehicle of explanation is a numerical example. Example:- We use the Sadoline model to explain the details, of the simplex method. The problem is expressed in equation from as:- maximize z=5x1+4x2+0s1+0s2+0s3+0s4 subject to 6x1+4x2+s1=24 x1+2x2+s2=6 -x1+x2+s3=1 x2+s4=2 x1,x2,s1,s2,s3,s4 ≥ 0
14
The variables s1,s2,s3 and s4 are the slacks associated with the respective constraints. We express the objective equation as : z - 5x1 – 4x2 = 0 In this manner, the starting simplex tableau can be representing as follow: rowsolutions4s3s2s1x2x1zbasic Z-row00000-4-51z S1-row240001460s1 S2-row60010210s2 S3-row1010010s3 S4-row21000100s4
15
The design of the tableau specifies the set of basic and non basic variables as well as provides the solution associated with the starting iteration. The simplex iteration, start at the origin (x1,x2) =(0,0), thus, the associated set of non basic variables and basic variables are defined as non basic variables(x1,x2) basic variables(s1,s2,s3,s4) The following solution is immediately available (without further computation) Z=0 S1=24 S2=6 S3=1 S4=2
16
Is the starting (current) solution optimal? To determine that we check if all the objective coefficients happen to be ≥ 0, no further improvements in z is possible, signifying that the optimum has been reached so the current solution is not optimal. Determine the entering variable: - The entering variable is x1 because that it has the most negative coefficient in the (maximization) objective function. - To determine the leaving variable directly from the tableau, we compute the intercepts of all the constraints with non negative direction of the x1- axis (recall that x1is the entering variable). - These intercepts are the ratios of the right-hand side of the equations (solution-column) to the corresponding constraint coefficients under the entering variable, x1 as the following table shows:
17
Entering Ratio x1= 24/6 =4 minimum x1= 6/1 =6 x1= 1/-1 = -1 (Ignore) x1= 2/0 = ∞ (Ignore) - The minimum non negative ratio corresponds to basic s1, signifying that s1 is the leaving variable (its value is zero in the new iteration) - The value of the entering variable x1 in the new solution also equals the minimum ratio (x1=4). solutionx1basic 246s1 61s2 1s3 20s4
18
- The corresponding increase in the value of objective z is 5*4 =20. - The end result of “swapping” the entering and the leaving variables is that non basic and basic variable at the new solution point will be given as: non basic (zero) variables :( s1,x2) basic variables : (x1,s2,s3,s4) - We now need to manipulate the equations in the last tableau so that the basic-column and the solution –column will identify the new solution. - The process called the Guss-Jordon row operations. - The following is a replica of the starting tableau, it associates the pivot column and the pivot row with the entering and the leaving variables, respectively. - The intersection of the pivot column and the pivot row is called the pivot element
19
solutions4s3s2s1x2x1ZBasic 00000-4-51z 240001460s1 60010210s2 1010010s3 21000100s4 - The Guss-Jordan computation needed to produce the new basic solution include two types: A)Pivot row: new pivot row = current pivot row /pivot element. B)All other rows including z: new row = (current row)-(its pivot column coefficient * (new pivot row). - These computations are applied to the preceding tableau in the following manner:
20
New pivot s1-row = current s1-row ÷ 6 =( 0 6 4 1 0 0 0 24) ÷ 6 =( 0 1 2/3 1/6 0 0 0 4) New z row = current z row – (-5)*new pivot row =( 1 -5 -4 0 0 0 0 0)+5 * (0 1 2/3 1/6 0 0 0 4) =(1 0 -2/3 5/6 0 0 0 20) New s2 row=current s2 row – (1)*new pivot row =(0 1 2 0 1 0 0 6 ) – (0 1 2/3 1/6 0 0 0 4) =(0 0 4/3 -1/6 1 0 0 2) New s3 row=current s3 row –(-1) * new pivot row =(0 -1 1 0 0 1 0 1 ) + (0 1 2/3 1/6 0 0 0 4) =(0 0 5/3 1/6 0 1 0 5) New s4 row=current s4 row –(0) * new pivot row =(0 0 1 0 0 0 1 2 ) – (0) * new pivot =(0 0 1 0 0 0 1 2 )
21
- The new tableau corresponding to the new basic solution (x1,s2,s3,s4):- - The solution-column automatically yields new basic solution (x1=4, s2=2, s3=5, s4=2). - The corresponding new objective value: z=20. - An examination of the tableau shows that it is not optimal because the non basic variable x2 has a negative coefficient in the z-row, thus x2 is the entering variable. solutions4s3s2s1x2x1zbasic 200005/6-2/301z 40001/62/310x1 2001-1/64/300s2 50101/65/300s3 21000100s4
22
- Next, the ratio computation in the next table show that s2 is the leaving variable. Ratio x2= 4÷2/3 = 6 x2= 2÷4/3 = 1.5 x2= 5÷5/3 = 3 x2= 2÷1= 2 - The computations show that x2=1.5 and the corresponding increase in z 2/3*1.5=1 yielding new z=20+1=21. - Given x2 and s2 as the entering and leaving variables, need to apply the following Guss- Jordan row operation to produce the next tableau. New pivot s2-row=current s2 row ÷4/3 New z row=current z row –(-2/3)*new pivot row. New x1 row=current x1 row –(2/3)*new pivot row. New s3 row=current s3 row –(5/3)*new pivot row. New s4 row=current s4 row –(1)*new pivot row. solutionEntering x2 basic 42/3x1 24/3s2 55/3s3 21s4
23
- The computations produce the following tableau: - Because non of the z row coefficient associated with the non basic variables s1 and s2 are negative, the last tableau is optimal. - The optimum solution can be read for the simplex tableau as follows: x1=3, x2=3/2, z=21. solutions4s3s2s1x2x1zbasic 21001/23/4001z 300-1/21/4010x1 3/2003/4-1/8100x2 5/201-5/43/8000s3 1/210-3/41/8000s4
24
Simplex method for minimize objective function in minimization the selection of the leaving variables is the same as in the maximization case (minimum nonnegative ratio ) The minimization case selects the entering variable as the non basic variable with the most positive objective coefficient. Minimum z is attained when all the z row coefficient are non positive. Example :- minimize z= 5x1- 4x2+ 6x3- 8x4 Subject : x1+ 2x2- 2x3 +4x4 ≤ 40 2x1 -x2+ 1x3+ 2x4 ≤ 8 4x1- 2x2 + x3 – x4 ≤ 10 x1, x2, x3, x4 ≥ 0
25
- Iteration 1: Minimize z - 5x1+ 4x2- 6x3+ 8x4 =0 subject to : x1+ 2x2- 2x3+ 4x4+ s1 = 40 2x1- x2+ x3+ 2x4+ s2 = 8 4x1- 2x2+ x3- x4+ s3 =10 New pivot row = ( 0, 2, -1, 1, 2, 0, 1, 0, 8 ) ÷ 2 = ( 0, 1, -0.5, 0.5, 1,0, 0.5, 0, 4) solutions3s2s1x4x3x2x1zbasic 00008-64-51z 400014-2210s1 80102120s2 101001-240s3
26
New z=current z- (8) * (0, 1, -0.5, 0.5, 1, 0, 0.5, 0, 4) = (1, -5, 4, -6, 8, 0, 0, 0, 0) + (0, -8, 4, -4, -8, 0, -4, 0, -32) = (1, -13, 8, -10, 0, 0, -4, 0, -32) New s1 =current s1 - (4) * (0, 1, -0.5, 0.5, 1, 0, 0.5, 0, 4) = (0, 1, 2, -2, 4, 1, 0, 0, 40) + (0, -4, 2, -2, -4, 0, -2, 0, -16) = (0, -3, 4, -4, 0, 1, -2, 0, 24) New s3 =current s3 - (-1) * (0, 1, -0.5, 0.5, 1, 0, 0.5, 0, 4) = (0, 9, -2, 1, -1, 0, 0, 1, 10) + (0, 1, -0.5, 0.5, 1, 0, 0.5, 0, 4) = (0, 5, -2.5, 1.5, 0, 0, 0.5, 1, 14) - Iteration 2:- solutions3s2s1x4x3x2x1zbasic -320-400-108-131z 240-210-44-30s1 400.501 -0.510x4 1410.5001.5-2.550s3
27
- Iteration 3:- - We will stop because non of the non basic variables has positive coefficient. Z= -80, x1=0, x2=6, x3=0, x4=7. solutions3s2s1x4x3x2x1zbasic -8000-20 0-71z 60-0.50.2501-0.750x2 700.250.131000.630x4 291-0.750.63003.130s3
28
Using the simplex method find the solution for the following OR model? minimize z= -0.3x1 + 0.9x2 subject to: x1 +x2 ≥ 800 0.21 x1 – 0.3 x2 ≤ 0 0.03 x1 – 0.01 x2 ≥0 x1, x2 ≥0
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.