Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Operations Research

Module 03 – M Technique
Artificial Variables – (Maximum Objective Function)

Amjad Ali
References

1. “Introduction to Operations Research” by Frederick S. Hillier

2. “Operations Research: An Introduction“ by Hamdy A. Taha

3. Video Lectures by Prof G. Srinivasan, IIT Madras


M Technique – Max Objective Case
EXAMPLE: Solve the following LP Model using M Technique

Max Z = 3 x1 + 5 x2
Subject to

x1 ≤ 4

2 x2 ≤ 12

3 x1 + 2 x2 = 18

x1, x2 ≥ 0
M Technique – Max Objective Case
Step 1: Determine a Starting Basic Feasible Solution
STANDARD FORM:
Max Z = 3 x1 + 5 x2
Max Z - 3 x1 - 5 x2 = 0 Subject to

x1 + S1 = 4 x1 ≤ 4

2 x2 ≤ 12
2 x2 + S2 = 12
3 x1 + 2 x2 = 18
3 x1 + 2 x2 = 6
x1, x2 ≥ 0
x1, x2 ≥ 0
M Technique – Max Objective Case
Assuming
x1 = 0, x2 = 0 (non-basic variables ) STANDARD FORM:

Z=0 Max Z - 3 x1 - 5 x2 = 0
S1 = 4 Starting Basic Solution ? x1 + S1 = 4
S2 = 12
0 = 18 2 x2 + S2 = 12

To obtain Staring Basic Feasible Solution, we introduce 3 x1 + 2 x2 = 18


Artificial Variable(s).
x1, x2 ≥ 0
M Technique – Max Objective Case
al ty
Introducing Artificial Variables Pen Max Z = 3 x1 + 5 x2
Add Artificial Variable in equation having equal (=) Max Z = 3 x1 + 5 x2 - M R1
type of constraint.

Max Z - 3 x1 - 5 x2 = 0
Z - 3 x1 - 5 x2 + M R1 = 0

x1 + S1 = 4 x1 + S1 = 4

2 x2 + S2 = 12 2 x2 + S2 = 12

3 x1 + 2 x2 + R1 = 18 e nts
ge m 3 x1 + 2 x2 = 18
n
A rra
m n
x1, x2 , S1, S2, R1 ≥ 0 lu x1, x2 ≥ 0
Co
M Technique – Max Objective Case
Assuming
x1 = 0, x2 = 0
Z - 3 x1 - 5 x2 + M R1 = 0

S1 = 4 x1 + S1 = 4
Starting Basic Feasible solution
S2 = 12 2 x2 + S2 = 12
R1 = 18 3 x1 + 2 x2 + R1 = 18

x1, x2 , S1, S2, R1 ≥ 0


M Technique – Max Objective Case
S1 = 4
S2 = 12
M = 100 R1 = 18

Basic x1 x2 S1 S2 R1 Sol Z - 3 x1 - 5 x2 + 100 R1 = 0


Z -3 -5 0 0 100 0 x1 + S1 = 4
S1 1 0 1 0 0 4 2 x2 + S2 = 12
S2 0 2 0 1 0 12
R1 3 2 0 0 1 18 3 x1 + 2 x2 + R1 = 18

x 1, x 2 , S 1, S 2 , R 1 ≥ 0

Basic Variables: S1, S2 , R1


Non-Basic Variables: x1, x2
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol
Z -3 -5 0 0 100 0
S1 1 0 1 0 0 4
S2 0 2 0 1 0 12
R1 3 2 0 0 1 18

New Z Row = (Current Z Row ) – (100) * (R1 Row)


New Z-Row = (-3 -5 0 0 100 0 ) – (100) * (3 2 0 0 1 18)
New Z-Row = (-3 -5 0 0 100 0) – (300 200 0 0 100 1800)
New Z-Row = (-303 -205 0 0 0 -1800)
M Technique – Max Objective Case
Max
e =
cti v
O bj e Basic x1 x2 S1 S2 R1 Sol
Optimal ?
Z -303 -205 0 0 0 -
Not Optimal 18004
S1 1 0 1 0 0
S2 0 2 0 1 0 12
R1 3 2 0 0 1 18
M Technique – Max Objective Case

Entering Variable Basic x1 x2 S1 S2 R1 Sol


Z -303 -205 0 0 0 -
x1 enters 18004
S1 1 0 1 0 0
S2 0 2 0 1 0 12
R1 3 2 0 0 1 18
M Technique – Max Objective Case

Leaving Variable Basic x1 x2 S1 S2 R1 Sol Ratio


Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
M Technique – Max Objective Case
Pivot lement

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Current Pivot Row
Z
New Pivot Row x1
S2
R1

New Pivot Row = (Current Pivot Row ) / Pivot Element


New Z-Row = (1 0 1 0 0 4) / 1
New Z-Row = (1 0 1 0 0 4)
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z
x1 1 0 1 0 0 4
S2
R1
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
x1 1 0 1 0 0 4
S2
R1
New Z Row = (Current Z Row ) – (-303) * (Pivot Row)
New Z-Row = (-303 -205 0 0 0 -1800) – (-303) * (1 0 1 0 0 4)
New Z-Row = (-303 -205 0 0 0 -1800) + (303 0 303 0 0 1212)
New Z-Row = ( 0 -205 303 0 0 0 -588)
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
R1
New S2 Row = (Current S2 Row ) – (0) * (Pivot Row)
New S2 Row = (0 2 0 1 0 12) – (0) * (1 0 1 0 0 4)
New S2 Row = (0 2 0 1 0 12)
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
R1 0 2 -3 0 1 6
New R1 Row = (Current R1 Row ) – (3) * (Pivot Row)
New R1 Row = ( 3 2 0 0 1 18) – (3) * (1 0 1 0 0 4)
New R1 Row = (3 2 0 0 1 18) – (3 0 3 0 0 12)
New R1 Row = (0 2 -3 0 1 6)
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Computation
Z -303 -205 0 0 0 -
x1 enters 18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S1 leaves S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
R1 0 2 -3 0 1 6
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Z -303 -205 0 0 0 -
18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
Optimal ? x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
NO R1 0 2 -3 0 1 6
x2 enters
R1 leaves
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Z -303 -205 0 0 0 -
18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
Computation x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
R1 0 2 -3 0 1 6
x2 enters
Z 0 0 -4.5 0 102.5 27
R1 leaves
x1 1 0 1 0 0 4
S2 0 0 3 1 -1 6
x2 0 1 -1.5 0 0.5 3
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Z -303 -205 0 0 0 -
18004 4/1 = 4 min ratio
S1 1 0 1 0 0
S2 0 2 0 1 0 12 12/0 = INV Ignore
R1 3 2 0 0 1 18 18/3 = 6
Z 0 -205 303 0 0 -588
Optimal ? x1 1 0 1 0 0 4
S2 0 2 0 1 0 12
NO R1 0 2 -3 0 1 6
Z 0 0 -4.5 0 102.5 27
x1 1 0 1 0 0 4
S2 0 0 3 1 -1 6
x2 0 1 -1.5 0 0.5 3
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Z 0 0 -4.5 0 102.5 27
x1 1 0 1 0 0 4
S1 enters S2 0 0 3 1 -1 6
S2 leaves x2 0 1 -1.5 0 0.5 3
Z 0 0 0 1.5 101 36
x1 1 0 0 -0.33 0.33 2
S1 0 0 1 0.33 - 0.33 2
x2 0 1 0 0.5 0 6
M Technique – Max Objective Case

Basic x1 x2 S1 S2 R1 Sol Ratio


Optimal ? Z 0 0 -4.5 0 102.5 27
x1 1 0 1 0 0 4
YES S2 0 0 3 1 -1 6
x2 0 1 -1.5 0 0.5 3
Optimal Solution Z 0 0 0 1.5 101 36
x1 1 0 0 -0.33 0.33 2
X1 = 2 S1 0 0 1 0.33 - 0.33 2
S1 = 2 x2 0 1 0 0.5 0 6
X2 = 6

Z = 36

You might also like