M3L1 - nptel
Transcription
M3L1 - nptel
Linear Programming Preliminaries 1 D Nagesh Kumar, IISc Optimization Methods: M3L1 Objectives To introduce linear programming problems (LPP) To discuss the standard and canonical form of LPP To discuss elementary operation for linear set of equations 2 D Nagesh Kumar, IISc Optimization Methods: M3L1 Introduction and Definition Linear Programming (LP) is the most useful optimization technique Objective function and constraints are the ‘linear’ functions of ‘nonnegative’ decision variables Thus, the conditions of LP problems are 1. Objective function must be a linear function of decision variables 2. Constraints should be linear function of decision variables 3. All the decision variables must be nonnegative 3 D Nagesh Kumar, IISc Optimization Methods: M3L1 Example Maximize Z 6x 5 y Objective Function subject to 2x 3y 5 1st Constraint x 3 y 11 2nd Constraint 4 x y 15 3rd Constraint x, y 0 Nonnegativ ity Condition This is in “general” form 4 D Nagesh Kumar, IISc Optimization Methods: M3L1 Standard form of LP problems Standard form of LP problems must have following three characteristics: 1. Objective function should be of maximization type 2. All the constraints should be of equality type 3. All the decision variables should be nonnegative 5 D Nagesh Kumar, IISc Optimization Methods: M3L1 General form Vs Standard form General form Minimize Z 3 x1 5 x 2 subject to 2 x1 3 x 2 15 x1 x 2 3 4 x1 x 2 2 x1 0 x 2 unrestrict ed Violating points for standard form of LPP: 1. Objective function is of minimization type 2. Constraints are of inequality type 3. Decision variable, x2, is unrestricted, thus, may take negative values also. How to transform a general form of a LPP to the standard form ? 6 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation General form General form 1. Objective function Minimize Z 3x1 5x2 2. First constraint 3. Second constraint x1 x2 3 7 Standard form 1. Objective function Maximize Z Z 3x1 5x2 2. First constraint 2 x1 3x 2 15 Variables Standard form 2 x1 3x2 x3 15 3. Second constraint x1 x2 x4 3 x3 and x 4 are known as slack variables D Nagesh Kumar, IISc Optimization Methods: M3L1 General form Transformation General form 4. Third constraint 4 x1 x2 2 Variable Standard form 4. Third constraint 4 x1 x 2 x5 2 x5 is known as surplus variable 5. Constraints for decision variables, x1 and x2 x1 0 x2 unrestrict ed 8 Standard form D Nagesh Kumar, IISc 5. Constraints for decision variables, x1 and x2 x1 0 x2 x2 x2 and x2 , x2 0 Optimization Methods: M3L1 Canonical form of LP Problems The ‘objective function’ and all the ‘equality constraints’ (standard form of LP problems) can be expressed in canonical form. This is known as canonical form of LPP Canonical form of LP problems is essential for simplex method (will be discussed later) Canonical form of a set of linear equations will be discussed next. 9 D Nagesh Kumar, IISc Optimization Methods: M3L1 Canonical form of a set of linear equations Let us consider the following example of a set of linear equations 3x 2 y z 10 (A0) x 2 y 3z 6 (B0) 2x y z 1 (C0) The system of equation will be transformed through ‘Elementary Operations’. 10 D Nagesh Kumar, IISc Optimization Methods: M3L1 Elementary Operations The following operations are known as elementary operations: 1. Any equation Er can be replaced by kEr, where k is a nonzero constant. 2. Any equation Er can be replaced by Er + kEs, where Es is another equation of the system and k is as defined above. Note: Transformed set of equations through elementary operations is equivalent to the original set of equations. Thus, solution of transformed set of equations is the solution of original set of equations too. 11 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: An Example Set of equation (A0, B0 and C0) is transformed through elementary operations (shown inside bracket in the right side) x 2 1 10 y z 3 3 3 0 8 8 8 y z 3 3 3 0 1 5 17 y z 3 3 3 1 A1 A 0 3 B1 B0 A1 C1 C0 2A1 Note that variable x is eliminated from B0 and C0 equations to obtain B1 and C1. Equation A0 is known as pivotal equation. 12 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: Example contd. Following similar procedure, y is eliminated from equation A1 and C1 considering B1 as pivotal equation: 13 x0 z 4 2 A 2 A1 B2 3 0 y z 1 3 B2 B1 8 0 0 2 z 6 1 C 2 C1 B2 3 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: Example contd. Finally, z is eliminated form equation A2 and B2 considering C2 as pivotal equation : x 0 0 1 0 y 0 2 00 z 3 A3 A 2 C3 B3 B2 C3 1 C3 C 2 2 Note: Pivotal equation is transformed first and using the transformed pivotal equation other equations in the system are transformed. The set of equations (A3, B3 and C3) is said to be in Canonical form which is equivalent to the original set of equations (A0, B0 and C0) 14 D Nagesh Kumar, IISc Optimization Methods: M3L1 Pivotal Operation Operation at each step to eliminate one variable at a time, from all equations except one, is known as pivotal operation. Number of pivotal operations are same as the number of variables in the set of equations. Three pivotal operations were carried out to obtain the canonical form of set of equations in last example having three variables. 15 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: Generalized procedure Consider the following system of n equations with n variables a11 x1 a12 x 2 a1n x n b1 ( E1 ) a 21 x1 a 22 x 2 a 2 n x n b2 (E2 ) a n1 x1 a n 2 x 2 a nn x n bn 16 D Nagesh Kumar, IISc (En ) Optimization Methods: M3L1 Transformation to Canonical form: Generalized procedure Canonical form of above system of equations can be obtained by performing n pivotal operations Variable xi i 1n is eliminated from all equations except j th equation for which a ji is nonzero. General procedure for one pivotal operation consists of following two steps, 1. Divide j th equation by a ji . Let us designate it as ( E j ) , i.e., E j 2. Subtract aki times of ( E j ) equation from k th equation k 1, 2, j 1, j 1,, n , i.e., Ek aki E j 17 D Nagesh Kumar, IISc Optimization Methods: M3L1 Ej a ji Transformation to Canonical form: Generalized procedure After repeating above steps for all the variables in the system of equations, the canonical form will be obtained as follows: 1x1 0 x 2 0 x n b1 ( E1c ) 0 x1 1x 2 0 x n b2 ( E 2c ) 0 x1 0 x 2 1x n bn 18 ( E nc ) It is obvious that solution of above set of equation such as xi bi is the solution of original set of equations also. D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: More general case Consider more general case for which the system of equations has m equation with n variables (n m) a11 x1 a12 x 2 a1n x n b1 ( E1 ) a 21 x1 a 22 x 2 a 2 n x n b2 ( E2 ) a m1 x1 a m 2 x 2 a mn x n bm ( Em ) It is possible to transform the set of equations to an equivalent canonical form from which at least one solution can be easily deduced 19 D Nagesh Kumar, IISc Optimization Methods: M3L1 Transformation to Canonical form: More general case By performing n pivotal operations for any m variables (say, x1 , x2 , xm, called pivotal variables) the system of equations reduced to canonical form is as follows 1x1 0 x 2 0 x m a1,m 1 x m1 a1n x n b1 ( E1c ) 0 x1 1x 2 0 x m a 2,m1 x m 1 a 2n x n b2 ( E 2c ) x n bm 0 x1 0 x 2 1x m a m ,m 1 x m 1 a mn ( E mc ) Variables, xm1 ,, xn , of above set of equations is known as nonpivotal variables or independent variables. 20 D Nagesh Kumar, IISc Optimization Methods: M3L1 Basic variable, Nonbasic variable, Basic solution, Basic feasible solution One solution that can be obtained from the above set of equations is xi bi for xi 0 for i 1,, m i m 1,, n This solution is known as basic solution. Pivotal variables, x1 , x2 , xm, are also known as basic variables. Nonpivotal variables, xm1 ,, xn , are known as nonbasic variables. Basic solution is also known as basic feasible solution because it satisfies all the constraints as well as nonnegativity criterion for all the variables 21 D Nagesh Kumar, IISc Optimization Methods: M3L1 Thank You 22 D Nagesh Kumar, IISc Optimization Methods: M3L1