You are on page 1of 71

Linear Programming

MAE 550 Optimization in Engineering Design

FORMULATION OF LINEAR PROGRAMMING PROBLEMS


2011 K. English 2

Linearization Methods
n

Two classes of optimization theory that are most thoroughly addressed Unconstrained problems Completely linear problems Efficient solution algorithms exist for each If we could transform a nonlinear problem into a linear one, we might be able to significantly speed up solution

n n

2011 K. English

Linearization Methods
n

Linearize using Taylor series expansion

" " " " " " " ! ( x) = f ( x 0 ) + !f ( x 0 )( x " x 0 ) + O x " x 0 f " " " " ! " f ( x) = f ( x 0 ) + !f ( x 0 )( x " x 0 ) "0 x is the linearized point
n n

+#

If the function is highly nonlinear, the linear approximation could result in substantial errors Before linearizing nonlinear problems, we will take a side step to linear programming (i.e., solving linear optimization problems)

2011 K. English

Linear Programming
n Linear

programming is a subset of optimization problems


Objective

variables Constraints are linear equations or inequalities

function is linear function of design

2011 K. English

Example
n

n n n n n

A company has two grades of inspectors: Grade I and Grade II, who are to be assigned to a quality control inspection. At least 1800 pieces must be inspected per 8hr day. Grade I inspectors earn $40/hr and can check pieces at a rate of 25 per hour, with an accuracy of 98% Grade II inspectors earn $30/hr and can check pieces at a rate of 15 per hour, with an accuracy of 95% Errors cost the company $20 each The company has 8 Grade I and 10 Grade 2 inspectors Determine the optimal assignment of inspectors that will minimize the total cost of inspection.
2011 K. English 6

Example
x1 8 x2 10 (Grade I) (Grade II)

2011 K. English

Example
x1 8 x2 10 (Grade I) (Grade II) (1800 pieces must be inspected each shift) 8(25* x1 ) + 8(15* x2 ) 1800

2011 K. English

Example
x1 8 x2 10 (Grade I) (Grade II) (1800 pieces must be inspected each shift) 8(25* x1 ) + 8(15* x2 ) 1800 200 x1 + 120 x2 1800 5 x1 + 3x2 45

2011 K. English

Example
x1 8 x2 10 5 x1 + 3 x2 45 (Salary) + (Error Charge)*(Parts per hr.)(Error rate) = Hourly rate $40 + $20*(25) *(0.02) = $50 $30 + $20*(15) *(0.05) = $45 (Grade I Hourly rate) (Grade II Hourly rate) (Grade I) (Grade II)

2011 K. English

10

Example
x1 8 x2 10 5 x1 + 3 x2 45 (Salary) + (Error Charge)*(Parts per hr.)(Error rate) = Hourly rate $40 + $20*(25) *(0.02) = $50 $30 + $20*(15) *(0.05) = $45 Z = 8 ( 50 x1 + 45 x2 ) = 400 x1 + 360 x2 (Grade I Hourly rate) (Grade II Hourly rate) (Grade I) (Grade II)

2011 K. English

11

Example

Minimize : subject to :

Z = 400 x1 + 360 x2 5 x1 + 3x2 45 0 x1 8 0 x2 10

2011 K. English

12

Standard Form
Minimize : subject to : Z = c1x1 + c2 x2 +!+ cn xn a11x1 + a12 x2 +!+ a1n xn = b1 a21x1 + a22 x2 +!+ a2n xn = b2 " am1x1 + am2 x2 +!+ amn xn = bm x1 ! 0, x2 ! 0 ! xn ! 0 b1 ! 0,b2 ! 0 ! bm ! 0
2011 K. English 13

Standard Form

Minimize : subject to :

Z = cx Ax = b x!0 b!0

2011 K. English

14

Standard Form
n n

M constraints, N design variables Handling Inequalities Introduce slack variables


x1 + 2x2 + 3x3 + 4x4 ! 25

2x1 + x2 " 3x3 # 12

2011 K. English

15

Standard Form
n n

M constraints, N design variables Handling Inequalities Introduce slack variables


x1 + 2 x2 + 3 x3 + 4 x4 25 x1 + 2 x2 + 3 x3 + 4 x4 + S1 = 25 2 x1 + x2 3 x3 12 2 x1 + x2 3 x3 S 2 = 12

2011 K. English

16

Standard Form
n n

M constraints, N design variables Handling Inequalities Introduce slack variables


x1 + 2 x2 + 3 x3 + 4 x4 25 x1 + 2 x2 + 3 x3 + 4 x4 + S1 = 25 2 x1 + x2 3 x3 12 2 x1 + x2 3 x3 S 2 = 12

Handling Unrestricted Variables x1 unrestricted


x1 = x1+ x1 x1+ 0 x1 0
2011 K. English 17

Convert into Standard Form


Maximize : subject to : Z = x1 2 x2 + 3x3 x1 + x2 + x3 7 x1 x2 + x3 2 3 x1 x2 2 x3 = 5 x1 , x2 0 x3 unrestricted in sign

2011 K. English

18

Convert into Standard Form


Replace x3 with x4-x5

Maximize : subject to :

Z = x1 2 x2 + 3 x3 x1 + x2 + x3 7 x1 x2 + x3 2 3 x1 x2 2 x3 = 5 x1 , x2 , x4 , x5 0 x3 =x4 x5

2011 K. English

19

Convert into Standard Form


Replace x3 with x4-x5

Maximize : subject to :

Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5

3 x1 x2 2 ( x4 x5 ) = 5

2011 K. English

20

Convert into Standard Form


Replace x3 with x4-x5 Multiply both sides of the third constraint by -1

Maximize : subject to :

Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5

3 x1 x2 2 ( x4 x5 ) = 5

2011 K. English

21

Convert into Standard Form


Replace x3 with x4-x5 Multiply both sides of the third constraint by -1

Maximize : subject to :

Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5

3 x1 + x2 + 2 ( x4 x5 ) = 5

2011 K. English

22

Convert into Standard Form


Replace x3 with x4-x5 Multiply both sides of the third constraint by -1 Introduce x6 , x7 as slack (and surplus) variables in the first and second constraint

Maximize : subject to :

Z = x1 2 x2 + 3 ( x4 x5 ) x1 + x2 + ( x4 x5 ) 7 x1 x2 + ( x4 x5 ) 2 x1 , x2 , x4 , x5 0 x3 =x4 x5

3 x1 + x2 + 2 ( x4 x5 ) = 5

2011 K. English

23

Convert into Standard Form


Replace x3 with x4-x5 Multiply both sides of the third constraint by -1 Introduce x6 , x7 as slack (and surplus) variables in the first and second constraint

Maximize : subject to :

Z = x1 2 x2 + 3 ( x4 x5 )

x1 + x2 + ( x4 x5 ) + x6 = 7 x1 x2 + ( x4 x5 ) x7 = 2 x1 , x2 , x4 , x5 , x6 , x7 0 x3 =x4 x5

3 x1 + x2 + 2 ( x4 x5 ) = 5

2011 K. English

24

Convert into Standard Form


Replace x3 with x4-x5 Multiply both sides of the third constraint by -1 Introduce x6 , x7 as slack (and surplus) variables in the first and second constraint

Maximize : subject to :

Z = x1 2 x2 + 3 x4 3 x5 x1 + x2 + x4 x5 + x6 = 7 x1 x2 + x4 x5 x7 = 2 3 x1 + x2 + 2 x4 2 x5 = 5 x1 , x2 , x4 , x5 , x6 , x7 0

2011 K. English

25

Convert into Standard Form


Maximize : subject to : Z = x1 2 x2 + 3x3 x1 + x2 + x3 7 x1 x2 + x3 2 3x1 x2 2 x3 = 5 x1 , x2 0 x3 unrestricted in sign

Maximize : subject to :

Z=

x1 x1 x1 3x1

2 x2 + x2 x2 + x2
2011 K. English

+3x4 + x4 + x4 +2 x4

3x5 x5 x5 2 x5 + x6 x7 =7 =2 =5
26

x1 , x2 , x4 , x5 , x6 , x7 0

Convert into Standard Form (5 min)


Minimize : subject to : Z = 4 x1 x2 + 50 x1 x2 2 x1 + 2 x2 8 x1 , x2 0

2011 K. English

27

Convert into Standard Form (5 min)


Minimize : subject to : Z= 4 x1 x2 + 50 x1 x2 + x3 = 2 x1 + 2 x2 + x4 = 8 x1 , x2 , x3 , x4 0
Minimize : subject to : Z= 4 x1 x1 x1 x1 , x2 , x3 , x4 0
2011 K. English 28

x2 x2 +2 x2 + x3 + x4

+50 =2 =8

Convert into Standard Form (5 min)


Minimize : subject to : f = 2 x1 + 4 x2 2 x1 + x2 2 x1 0

2011 K. English

29

Convert into Standard Form (5 min)


Minimize : subject to : f = 2 x1 + 4 x2 2 x1 + x2 2 x1 0
Minimize : subject to : x2 = x3 x4
2011 K. English 30

f = 2 x1 + 4( x3 x4 ) 2 x1 + ( x3 x4 ) 2 x1 , x3 , x4 0

Convert into Standard Form (5 min)


Minimize : subject to : f = 2 x1 + 4 x2 2 x1 + x2 2 x1 0
Minimize : subject to : x2 = x3 x4
2011 K. English 31

f = 2 x1 + 4( x3 x4 ) 2 x1 + ( x3 x4 ) x5 = 2 x1 , x3 , x4 , x5 0

Convert into Standard Form (5 min)


Minimize : subject to : f = 2 x1 + 4 x2 2 x1 + x2 2 x1 0

Minimize : subject to :

f =

2 x1 2 x1

+4 x3 + x3

4 x4 x4 x5 =2

x1 , x3 , x4 , x5 0

2011 K. English

32

SOLUTION OF LINEAR PROGRAMMING PROBLEMS


2011 K. English 33

Standard Form
Minimize : subject to : Z = c1x1 + c2 x2 +!+ cn xn a11x1 + a12 x2 +!+ a1n xn = b1 a21x1 + a22 x2 +!+ a2n xn = b2 " am1x1 + am2 x2 +!+ amn xn = bm x1 ! 0, x2 ! 0 ! xn ! 0 b1 ! 0,b2 ! 0 ! bm ! 0
2011 K. English 34

Principles of the Simplex Method


n n n

The general form poses the problem as m equations and n variables If there are more variables than equations (i.e., m<n), there are an infinite number of feasible solutions Classical solution approach: Gauss-Jordan Elimination
Reduce the system to canonical (row echelon) form X1 through Xm appear with a unit coefficient in only one equation, with zeroes (basic variables) Xm+1 through Xn are considered nonbasic variables

Allowable operations to manipulate rows


Multiply any equation in the system by a positive or negative number Add to any equation a constant multiple of any other equation in the system

2011 K. English 35

2011 K. English

36

Example Problem

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0


b 0 1 0 = = = -5 8 f-50

X1 1 1 -4

X2 -1 2 -1

X3 1 0 0

X4

2011 K. English

37

Example Problem

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0Not2Canonical x #0


b 0 1 0 = = = -5 8 f-50

X1 1 1 -4

X2 -1 2 -1

X3 1 0 0

X4

2011 K. English

38

Example Problem

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0Not2Canonical x #0


b 0 1 0 = = = -5 8 f-50

X1 1 1 -4 Multiply by -1

X2 -1 2 -1

X3 1 0 0

X4

2011 K. English

39

Example Problem

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0Not2Canonical x #0


b 0 1 0 = = = -5 8 f-50

X1 1 1 -4 Multiply by -1 X1 -1 1 -4

X2 -1 2 -1

X3 1 0 0

X4

X2 1 2 -1

X3 -1 0 0

X4 0 1 0 = = =

b 5 8 f-50
40

2011 K. English

Example Problem

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0Not2Canonical x #0


b 0 1 0 = = = -5 8 f-50

X1 1 1 -4 Multiply by -1 X1 -1 1 -4

X2 -1 2 -1

X3 1 0 0

X4

Not Canonical X2 1 2 -1 X3 -1 0 0
2011 K. English

X4 0 1 0 = = =

b 5 8 f-50
41

Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = 5 8 f-50

Add artificial variable, X5

X1 -1 1 -4

X2 1 2 -1

X3 -1 0 0

X4 0 1 0

X5 1 0 0 = = =

b 5 8 f-50

2011 K. English

42

Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = 5 8 f-50

Add artificial variable, X5

X1 -1 1 -4

X2 1 2 -1

X3 -1 0 0

X4 0 1 0

X5 1 0 0 = = =

b 5 8 f-50

2011 K. English

43

Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = 5 8 f-50

Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 0 0 0 X4 0 1 0 0
2011 K. English

X5 1 0 0 1 = = = =

b 5 8 f-50 w
44

Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = 5 8 f-50

Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 0 0 0 X4 0 1 0 0
2011 K. English

X5 1 0 0 1 = = = =

b 5 8 f-50 w
45

Example Problem
Not Canonical X1 -1 1 -4 X2 1 2 -1 X3 -1 0 0 X4 0 1 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = 5 8 f-50

Add artificial variable, X5 Add temporary objective function, w, as a measure of infeasibility w is the sum of the artificial variables X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 = = = = b 5 8 f-50 w
46

0 1 Not Canonical 0 1 0 0 0 0 0
2011 K. English

0 1

Example Problem
X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 0 1 Not Canonical 0 1 0 0 0 0 0 0 1

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = = 5 8 f-50 w

Subtract row 1 from row 4 to get canonical form X1 -1 1 -4 0-(-1) X2 1 2 -1 0-1 X3 -1 0 0 0-(-1) X4 0 1 0 0-0
2011 K. English

X5 1 0 0 1-1 = = = =

b 5 8 f-50 w-5
47

Example Problem
X1 -1 1 -4 0 X2 1 2 -1 0 X3 -1 X4 X5 0 1 Not Canonical 0 1 0 0 0 0 0 0 1

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = = 5 8 f-50 w

Subtract row 1 from row 4 to get canonical form X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0


2011 K. English

X5 1 0 0 0 = = = =

b 5 8 f-50 w-5
48

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = = 5 8 f-50 w-5

X2 will enter the basis (only negative coefficient and we are minimizing the objective function)

X1 -1 1 -4 1

X2 1 2 -1 -1

X3 -1 0 0 1

X4 0 1 0 0
2011 K. English

X5 1 0 0 0 = = = =

b 5 8 f-50 w-5
49

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = = 5 8 f-50 w-5

X2 will enter the basis (only negative coefficient and we are minimizing the objective function) Calculating the b/a ratios shows that row 2 has the minimum value and X4 will leave the basis

X1 -1 1 -4 1

X2 1 2 -1 -1

X3 -1 0 0 1

X4 0 1 0 0
2011 K. English

X5 1 0 0 0 = = = =

b
5/1=5 8/2=4

5 8 f-50 w-5
50

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1

X1 -1 =0.5 -4 1

X2 1 2/2=1 -1 -1

X3 -1 0/2=0 0 1

X4 0 =0.5 0 0
2011 K. English

X5 1 0/2=0 0 0 = = = =

b 5 8/2=4 f-50 w-5


51

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1

X1 -1 0.5 -4 1

X2 1 1 -1 -1

X3 -1 2=0 0 1

X4 0 0.5 0 0
2011 K. English

X5 1 0 0 0 = = = =

b 5 4 f-50 w-5
52

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1

X1
-1-0.5=-1.5 0.5 -4 1

X2
1-1=0 1 -1 -1

X3
-1-0=-1 0 0 1

X4
0-0.5=-0.5 0.5 0 0
2011 K. English

X5
1-0=1 0 0 0 = = = =

b
5-4=1 4 f-50 w-5
53

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3

X1
-1.5 0.5 -4+0.5=-3.5 1

X2
0 1 -1+1=0 -1

X3
-1 0 0+0=0 1

X4
-0.5 0.5 0+0.5=0.5 0
2011 K. English

X5
1 0 0+0=0 0 = = = =

b
1 4 f-50+4=f-46 w-5
54

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3 Add the new row 2 to row 4

X1
-1.5 0.5 -3.5 1+0.5=1.5

X2
0 1 0 -1+1=0

X3
-1 0 0 1+0=1

X4
-0.5 0.5 0.5 0+0.5=0.5
2011 K. English

X5
1 0 0 0+0=0 = = = =

b
1 4 f-46 w-5+4=w-1
55

Example Problem
X1 -1 1 -4 1 X2 1 2 -1 -1 X3 -1 0 0 1 X4 0 1 0 0 X5 1 0 0 0

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

b = = = =
5/1=5 8/2=4

5 8 f-50 w-5

Divide row 2 by 2 to get the coefficient for X2 to be 1 Subtract the new row 2 from row 1 Add the new row 2 to row 3 Add the new row 2 to row 4

X1
-1.5 0.5 -3.5 1.5

X2
0 1 0 0

X3
-1 0 0 1

X4
-0.5 0.5 0.5 0.5
2011 K. English

X5
1 0 0 0 = = = =

b
1 4 f-46 w-1
56

Example Problem
X1
-1.5 0.5 -3.5 1.5

Min s.t.

! f ( x) = !4x1 ! x2 + 50 ! g1 ( x) = x1 ! x2 " !5 ! g 2 ( x) = x1 + 2x2 " 8 x1 # 0 x2 # 0

X2
0 1 0 0

X3
-1 0 0 1

X4
-0.5 0.5 0.5 0.5

X5
1 0 0 0 = = = =

b
1 4 f-46 w-1

All coefficients in row 4 are positive, so w cannot be decreased further X5 still has a value This tells us that a basic feasible solution to the original problem (without the artificial variable) cannot be found

2011 K. English

57

Simplex Process for minimization


n

Phase I
1.

Add artificial variables as necessary to achieve canonical form

2011 K. English

58

Simplex Process for minimization


n

Phase I
1. 2.

Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables

2011 K. English

59

Simplex Process for minimization


n

Phase I
1. 2. 3.

Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables Minimize using Phase II approaches

2011 K. English

60

Simplex Process for minimization


n

Phase I
1. 2. 3.

Add artificial variables as necessary to achieve canonical form Create a new objective function (w) equal to the sum of the artificial variables Minimize using Phase II approaches

If w cannot be reduced to zero, the solution to the original problem does not exist. n If w has been reduced to zero, delete the artificial variables and the artificial objective (w) from the system and proceed with Phase II
n

2011 K. English

61

Simplex Process for minimization


n

Phase II

2011 K. English

62

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5

2011 K. English

63

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element

2.

If ck is negative

2011 K. English

64

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

2011 K. English

65

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

4.

Go to step 1 and repeat

2011 K. English

66

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

4. 5.

Go to step 1 and repeat The solution is complete

2011 K. English

67

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

4. 5.

Go to step 1 and repeat The solution is complete


a)

If all associated with non-basic variables are positive, the solution is unique

2011 K. English

68

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

4. 5.

Go to step 1 and repeat The solution is complete


a) b)

If all associated with non-basic variables are positive, the solution is unique If some associated with a non-basic variable is zero, the solution is not unique

2011 K. English

69

Simplex Process for minimization


n
1.

Phase II
Find the minimum ci, i=1,n.

Denote this variable with a subscript k (ck). If ck is non-negative, go to step 5 Find the minimum (bj/ ajk) where j=1,m for all positive ajk If all ajk are non-positive, the solution is unbounded. Otherwise, let the subscript r denote the row corresponding to this minimum ark is the pivot element Divide row r by ark Subtract ajk times the new row r from row j, where j=1, m+1 and jr

2.

If ck is negative

3.

Pivot on ark.

4. 5.

Go to step 1 and repeat The solution is complete


a) b) c)

If all associated with non-basic variables are positive, the solution is unique If some associated with a non-basic variable is zero, the solution is not unique If some is negative, the solution is unbounded 2011 K. English 70

Group Problem (In-Class)


A company has 2 grades of inspectors, who are to be assigned to a quality control inspection process. It is required that at least 1800 pieces be inspected per 8 hour day.
n

Grade 1 inspectors can check pieces at the rate of 25 per hour, with an accuracy of 98%. Grade 2 inspectors can check pieces at the rate of 15 per hour with an accuracy of 95%. The wage rate of a Grade 1 inspector is $40 per hour, while a Grade2 inspector earns $30 per hour. Each error made by an inspector costs the company $20. The company has available 8 Grade 1 inspectors and 10 Grade 2 inspectors.

n n

What is the optimal assignment of inspectors that will minimize the total cost of inspection?

2011 K. English

71

You might also like