Transcript Slide 1
1 2 A linear program in which all the variables are non-negative and all the constraints are equalities is said to be in standard form (or augmented form) LP standard form properties: 1) All the constraints (with the exception of the nonnegativity restrictions on the variables) are equations with nonnegative. 2) All the variables are nonnegative. 3) The objective function may be of the maximization or the minimization type. 3 1- Conversion of inequalities into equation. a) < constraints: Add slack variable to constraint (coefficient of 0 in obj function) Example: x 1 2x2 3 x 1 s 1 2x2 s1 3 0 b) > constraints: Subtract surplus from constraint (coefficient of 0 in obj function) 3x 1 x 2 5 3x 1 s 1 0 x 2 S1 5 : 1- The right hand side of an equation can always be made nonnegative by multiplying the equation by -1 , if necessary. 2- < inequality can be converted to a > by multiplying both side of the inequality by -1 4 2- Conversion of unrestricted variable (xj) into nonnegative variables. x j x j xj , xj , xj 0 3- Conversion of maximization to minimization An objective function to be minimized instead of maximized 5 Example: Express the following LP model in standard form Maxim ize Subjectto : z 2 x1 3x2 5x3 x1 x2 x3 5 6 x1 7 x2 9 x3 4 x1 x2 4 x3 10 x1 , x2 0 x3 unrestricted 6 Solution: 1- Subtracts the surplus S1 from L.H.S of first constraint and then multiply both sides by -1 to obtain nonnegative R.H.S. 2- Add the slack s2 to L.H.S of second constraint. 3- Because the third constraint is already in equation form, no slack or surplus needed. 4- Substitute unrestricted x3 Maximize Subjectto : x j x in the objective and all constraints 3 z 2x1 3x2 5x3 5x3 x1 x2 x3 x3 s1 5 6 x1 7 x2 9 x3 9 x3 s2 4 x1 x2 4 x3 4 x3 10 x1 , x2 , x3 , x3 , s1 , s2 0 7 It is a procedure for solving linear programming problems. When decision variables are more than 2, it is always advisable to use Simplex Method to avoid lengthy graphical procedure The simplex method is not used to examine all the feasible solutions. It is proven to be the most efficient method for solving LP problems. The simplex algorithm is designed to locate the optimum basic solution in an efficient manner. It is an algebraic procedure. However, its underlying concepts are geometric. 8 Feasible Region and Extreme Points Feasible region is the collection of points that satisfy all constraints. Corner points of the feasible region are known as extreme points. LP in Standard Form An LP is in standard form, when all variables are non-negative and all constraints are equalities. Basic Variables A basic variable for an equation is a variable whose coefficient in the equation is +1 and in all other equations is 0. Non-basic Variable (NBV) A non-basic variable does not appear in the basic solution. Its value is 0. Non-basic variables in a problem = (n-m) = (# of variables - # of equations) Basic Feasible Solution (bfs) and Adjacent Feasible Solution 9 Steps involved (Graphical): 1. Locate an extreme point of the feasible region. 2. Examine each boundary edge intersecting at this point to see whether movement along any edge increases the value of the objective function. 3. If the value of the objective function increases along any edge, move along this edge to the adjacent extreme point. If several edges indicate improvement, the edge providing the greatest rate of increase is selected. 4. Repeat steps 2 and 3 until movement along any edge no longer increases the value of the objective function. 10 Example: Product Mix Problem The N. Dustrious Company produces two products: I and II. The raw material requirements, space needed for storage, production rates, and selling prices for these products are given below: The total amount of raw material available per day for both products is 15751b. The total storage space for all products is 1500 ft2, and a maximum of 7 hours per day can be used for production. The company wants to determine how many units of each product to produce per day to maximize its total income. Solution Step 0: Convert all the inequality constraints into equalities by the use of slack variables. Let: s1 = unused storage space s2 = unused raw material s3 = unused production time As already developed, the LP model is: Maximize: Subject to: Z 13x1 11x2 4 x1 5 x2 1500 5 x1 3x2 1575 x1 2 x2 420 x1 0 x2 0 …..Eq (1) Introducing these slack variables into the inequality constraints and rewriting the objective function such that all variables are on the left-hand side of the equation. Equation (1) can be expressed as: Z 13x1 11x2 0 4 x1 5 x2 s1 5 x1 3 x2 x1 2 x2 xi 0, ( A1) 1500 ( B1) s2 1575 (C1) s3 420 ( D1) i 1,2 …..Eq (2) The steps of the simplex method are: 1. Determine a starting basic feasible solution. 2. Select an entering variable using the optimally condition. Stop if there is no entering variables. 3. Select a leaving variable using feasibility condition. 4. Determine the new basic solution by using appropriate Gauss- Jordan computations. Go to step 2 Step I: Set up the initial tableau using Eq. (2). Z 13x1 11x2 0 4 x1 5 x2 s1 5 x1 3 x2 x1 2 x2 1500 ( B1) s2 1575 (C1) s3 420 ( D1) xi 0, i 1,2 In any iteration, a variable that has a nonzero value in the solution is called a basic variable. ( A1) …..Eq (2) Step II: . Identify the variable that will be assigned a nonzero value in the next iteration so as to increase the value of the objective function. This variable is called the.entering variable It is that nonbasic variable which is associated with the smallest negative coefficient in the objective function. If two or more nonbasic variables are tied with the smallest coefficients, select one of these arbitrarily and continue. Step III: Identify the variable, called the leaving variable, which will be changed from a nonzero to a zero value in the next solution. Basic X1 Solution Ratio (Intercept) s1 4 1500 1500/4=375 s2 5 1575 1575/5=315 s3 1 420 420/1=420 Because s2 is associated with the smallest (nonnegative) ratio,Thus s2 is the leaving variable, which automatically makes x1 basic at 5. Replacing the leaving variable s2 with the entering variable x1 produces the new basic solution (x1, s1, s3 ) * The computation of the new basic solution is based on the GaussJordan row operations. Pivot row Pivot column Pivot column: the column associated with entering variable . Pivot row: the row associated with leaving variable. Pivot element: The intersection of pivot column and the pivot row. The Gauss – Jordan computations needed to produce the new basic solution include two types: 1. Pivot row New pivot row = Current pivot row / Pivot element 2. All other rows, including z New Row= Current row – (its pivot column coefficient)* (New pivot row) Tableau The row operations proceed as follows: The coefficients in row C2 are obtained by dividing the corresponding coefficients in row C1 by 5. The coefficients in row A2 are obtained by multiplying the coefficients of row C2 by 13 and adding the products to the corresponding coefficients in row Al. The coefficients in row B2 are obtained by multiplying the coefficients of row C2 by -4 and adding the products to the corresponding coefficients in row Bl. The coefficients in row D2 are obtained by multiplying the coefficients of row C2 by -1 and adding the products to the corresponding coefficients in row Dl. Step IV: . Enter the basic variables for the second tableau. The row sequence of the previous tableau should be maintained, with the leaving variable being replaced by the entering variable. Step V: Compute the coefficients for the second tableau. A sequence of operations will be performed so that at the end the x1 column in the second tableau will have the following coefficients: The second tableau yields the following feasible solution: x1 = 315, x2 = 0, SI = 240, S2 = 0, S3 = 105, and Z = 4095 Step VI: Check for optimality. The second feasible solution is also not optimal, because the objective function (row A2) contains a negative coefficient. Another iteration beginning with step 2 is necessary. In the third tableau (next slide), all the coefficients in the objective function (row A3) are positive. Thus an optimal solution has been reached and it is as follows: x1 = 270, x2 = 75, SI = 45, S2 = 0, S3 = 0, and Z = 4335 The rules for selecting the entering and leaving variables are referred to as the optimally and feasibility conditions Optimality condition: The entering variable in a maximization (minimization) problem is the non basic variable having the most negative (positive) coefficient in the z-row. Ties are broken arbitrarily. The optimum is reached at the iteration where all the z-row coefficient of the non basic variables are nonnegative (non positive). Feasibility condition: For both maximization and minimization problems, the leaving variables is the basic variable associated with the smallest non-negative ratio 26