linear programming - nptelnptel.ac.in/courses/105108127/pdf/module_3/m3l1slides.pdf · z linear...

22
D Nagesh Kumar, IISc Optimization Methods: M3L1 1 Linear Programming Preliminaries

Upload: lythuy

Post on 30-Aug-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L11

Linear Programming

Preliminaries

Page 2: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L12

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

Page 3: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L13

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

Page 4: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L14

Example

Conditionity Nonnegativ0,

Constraint3rd154

Constraint2nd113

Constraint1st532tosubject

FunctionObjective56Maximize

p

p

p

p

p

≤+

≤+

≤−

+=

yx

yx

yx

yx

yxZ

This is in “general” form

Page 5: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L15

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

Page 6: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L16

General form Vs Standard form

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.

General form

edunrestrict0

243

1532tosubject53Minimize

2

1

21

21

21

21

xx

xxxx

xxxxZ

≥≥+≤+≤−−−=

How to transform a general form of a LPP to the standard form ?

Page 7: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L17

General form Standard form

General form1. Objective function

2. First constraint

3. Second constraint

Standard form1. Objective function

2. First constraint

3. Second constraint

Transformation

21 53Minimize xxZ −−=

1532 21 ≤− xx 1532 321 =+− xxx

321 ≤+ xx 3421 =++ xxx

Variables and are known as slack variables3x 4x

21 53Maximize xxZZ +=−=′

Page 8: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L18

General form Standard form

General form4. Third constraint

Standard form4. Third constraint

Transformation

24 521 =−+ xxx24 21 ≥+ xx

5. Constraints for decision variables, x1 and x2

Variable is known as surplus variable5x5. Constraints for decision

variables, x1 and x2

edunrestrict2x01 ≥x 01 ≥x

222 xxx ′′−′=0,and 22 ≥′′′ xx

Page 9: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L19

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.

Page 10: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L110

Canonical form of a set of linear equations

Let us consider the following example of a set of linear equations

(A0)

(B0)

(C0)

The system of equation will be transformed through ‘Elementary Operations’.

1023 =++ zyx

632 =+− zyx12 =−+ zyx

Page 11: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L111

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.

Page 12: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L112

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)

⎟⎠⎞

⎜⎝⎛ ==++ 01 A

31A

310

31

32 zyx

( )101 ABB38

38

380 −==+− zy

( )101 2ACC3

1735

310 −=−=−− zy

Note that variable x is eliminated from B0 and C0 equations to obtain B1 and C1. Equation A0 is known as pivotal equation.

Page 13: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L113

Transformation to Canonical form: Example contd.

Following similar procedure, y is eliminated from equation A1 and C1considering B1 as pivotal equation:

⎟⎠⎞

⎜⎝⎛ −==++ 212 B

32AA40 zx

⎟⎠⎞

⎜⎝⎛ −=−=−+ 12 B

83B10 zy

⎟⎠⎞

⎜⎝⎛ +=−=−+ 212 B

31CC6200 z

Page 14: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L114

Transformation to Canonical form: Example contd.

Finally, z is eliminated form equation A2 and B2 considering C2 as pivotal equation :

( )323 CAA100 −==++x

( )323 CBB200 +==++ y

⎟⎠⎞

⎜⎝⎛ −==++ 23 C

21C300 z

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)

Page 15: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L115

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.

Page 16: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L116

Transformation to Canonical form: Generalized procedure

Consider the following system of n equations with n variables

)(

)(

)(

2211

222222121

111212111

nnnnnnn

nn

nn

Ebxaxaxa

Ebxaxaxa

Ebxaxaxa

=+++

=+++

=+++

LLL

MM

MM

LLL

LLL

Page 17: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L117

Transformation to Canonical form: Generalized procedure

Canonical form of above system of equations can be obtained by performing n pivotal operations

Variable is eliminated from all equationsexcept j th equation for which is nonzero.

General procedure for one pivotal operation consists of following two steps,1. Divide j th equation by . Let us designate it as , i.e.,

2. Subtract times of equation from

k th equation , i.e.,

( )nix i L1=

jia

jia )( jE ′

kia )( jE ′

( )njjk ,,1,1,2,1 LL +−=

ji

jj a

EE =′

jkik EaE ′−

Page 18: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L118

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:

)(100

)(010

)(001

21

2221

1121

cnnn

cn

cn

Ebxxx

Ebxxx

Ebxxx

′′=+++

′′=+++

′′=+++

LLL

MM

MM

LLL

LLL

It is obvious that solution of above set of equation such as is the solution of original set of equations also.

ii bx ′′=

Page 19: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L119

Transformation to Canonical form: More general case

Consider more general case for which the system of equations has m equation with n variables ( )

It is possible to transform the set of equations to an equivalent canonical form from which at least one solution can be easily deduced

mn ≥

)(

)(

)(

2211

222222121

111212111

mmnmnmm

nn

nn

Ebxaxaxa

Ebxaxaxa

Ebxaxaxa

=+++

=+++

=+++

LLL

MM

MM

LLL

LLL

Page 20: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L120

Transformation to Canonical form: More general case

By performing n pivotal operations for any m variables (say, , called pivotal variables) the system of equations reduced to canonical form is as follows

Variables, , of above set of equations is known as nonpivotal variables or independent variables.

mxxx L,, 21

)(100

)(010

)(001

11,21

22211,221

11111,121

cmmnmnmmmm

cnnmmm

cnnmmm

Ebxaxaxxx

Ebxaxaxxx

Ebxaxaxxx

′′=′′++′′++++

′′=′′++′′++++

′′=′′++′′++++

++

++

++

LLLLLL

MM

MM

LLLLLL

LLLLLL

nm xx ,,1 L+

Page 21: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L121

Basic variable, Nonbasic variable, Basic solution, Basic feasible solution

One solution that can be obtained from the above set of equations is

mxxx L,, 21

nm xx ,,1 L+

( ) nmixmibx

i

ii

,,1for0,,1forL

L

+===′′=

This solution is known as basic solution.

Pivotal variables, , are also known as basic variables.

Nonpivotal variables, , 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

Page 22: Linear Programming - NPTELnptel.ac.in/courses/105108127/pdf/Module_3/M3L1slides.pdf · z Linear Programming (LP) is the most useful optimization technique ... Objective function must

D Nagesh Kumar, IISc Optimization Methods: M3L122

Thank You