Simplex Method
Simplex Method
Operations
Research
Introduction to Operations
Research
• Operations research/management science
– Winston: “a scientific approach to decision making, which
seeks to determine how best to design and operate a
system, usually under conditions requiring the allocation of
scarce resources.”
– Kimball & Morse: “a scientific method of providing
executive departments with a quantitative basis for
decisions regarding the operations under their control.”
Introduction to Operations
Research
• Provides rational basis for decision making
– Solves the type of complex problems that turn up in the
modern business environment
– Builds mathematical and computer models of organizational
systems composed of people, machines, and procedures
– Uses analytical and numerical techniques to make
predictions and decisions based on these models
Introduction to Operations
Research
• Draws upon
– engineering, management, mathematics
• Closely related to the "decision sciences"
– applied mathematics, computer science,
economics, industrial engineering and systems
engineering
Methodology of OR
The Seven Steps to a Good OR Analysis
Identify the Problem Feedback loops
or Opportunity at all levels!
Formulate a
*Adapted from
Mathematical Model
Winston, Wayne L.,
Operations Research:
Verify the Model
Applications and
Algorithms,
Select the Best Alternative 3rd Edition, Duxbury
Press, 1994, p. 2.
Present the Results of
the Analysis
• Is it too broad?
Select the Best Alternative
• Do outputs
Identify the Problem
or Opportunity match current
observations for
Understand the System current inputs?
• This is where
Select the Best Alternative software tools will
help us!
Present the Results of
the Analysis
Formulate a
• System must be user
Mathematical Model friendly!
Kg of Product P2 = x2
P1 P2 Total available
Profit/kg (Time in (Time in Machine
hrs.) hrs.) hours/day
Machine 1 3 2 600
Machine 2 3 5 800
Machine 3 5 6 1100
Example 2.1
• Decision variables
– Product P1 = x1
– Product P2 = x2
• Objective function
– Z = 30x1 + 40x
• Constraints
– 3x1 + 2x2 ≤ 600
– 3x1 + 5x2 ≤ 800
– 5x1 + 6x2 ≤ 1100
– x1 ≥ 0, x2 ≥ 0
Example 2.2
• A company owns two flour mills viz. A and B, which have different production
capacities for high, medium and low quality flour. The company has entered a
contract to supply flour to a firm every month with at least 8, 12 and 24
quintals of high, medium and low quality respectively. It costs the company
Rs. 2000 and Rs. 1500 per day to run mill A and B respectively. On a day, Mill
A produces 6, 2 and 4 quintals of high, medium and low quality flour, Mill B
produces 2, 4 and 12 quintals of high, medium and low quality flour
respectively. How many days per month should each mill be operated in
order to meet the contract order most economically?
Example 2.2
• Decision variables
– Mill A = x1 days
– Mill B = x2 days
Objective
– Minimize Z=2000x1 + 1500x2
Constraints
– 6x1 + 2x2 ≥ 8
– 2x1 + 4x2 ≥ 12
– 4x1 + 12x2 ≥ 24
– x1 ≥ 0, x2 ≥ 0
3. Assumptions underlying linear
programming
• Based on the assumptions of
· Proportionality
· Additivity
· Continuity
· Certainty
· finite choices
Simplex Method
Basic X1 X2 S1 S2 bi bi/aij
S1 0 2 3 1 0 60 30
24
Outgoing
S2 0 4* 3 0 1 96
variable
(key row)
cj 40 35 0 0
zj 0 0 0 0
40
Incoming
Δj 35 0 0
variable
(key column)
Derive new table
• Divide each element of the key row
(including bi) by the key element.
• The replacement row would be:
1, ¾, 0, ¼, 24
• For each row other than the key row: New
row element = Old row element – (Row
element in the key column * Corresponding
replacement row value)
Derive new table
Basic x1 x2 S1 S2 bi bi/aij
8
S1 0 0 3/2* 1 - 1/2 12 Outgoing
variable
x1 40 1 3/4 0 1/4 24 32
cj 40 35 0 0
zj 40 30 0 0
5
Δj 0 Incoming 0 -10
variable
Improved solution
• Z = 40 x 24 + 35 x 0 + 0 x 12 + 0 x 0 = 960.
Revised solution
Basic x1 x2 S1 S2 bi
x2 35 0 1 2/3 -1/3 8
x1 40 1 0 -1/2 1/2 18
cj 40 35 0 0
zj 40 35 0 0
Δj 0 0 -10/3 -25/3
Revised solution
Max 16x1+15x2+20x3-18x4
ST
2x1 + x2 + 3x3 ≤ 3000 [1]
3x1 + 4x2 + 5x3 – 60x4 ≤ 2400 [2]
x4 ≤ 32 [3]
X2 ≥ 200 [4]
X1 + x2 + x3 ≥ 800 [5]
X1 – x2 –x3 =0 [6]
Xj ≥ 0 for all J
Simplex method when some constraints are not “≤”
constraints (cont.)
We assign a very
Example: large negative
objective function
coefficient , -M , (
Max 16x1+15x2+20x3-18x4
+M for
ST minimization
2x1 + x2 + 3x3 ≤ 3000 [1] problem) to each
3x1 + 4x2 + 5x3 – 60x4 ≤ 2400 [2] artificial variable
x4 ≤ 32 [3]
X2 ≥ 200 [4]
X1 + x2 + x3 ≥ 800 [5] We add artificial :
R4, R5, R6, respectively
X1 – x2 –x3 =0 [6]
to the fourth, fifth, and
Xj ≥ 0 for all J sixth equations.
Simplex method when some constraints are not “≤”
constraints (cont.)
The solution
Max 16x1+15x2+20x3-18x4
–MR4 –MR5 –MR6
ST
2x1 + x2 + 3x3 + s1= 3000 [1]
3x1 + 4x2 + 5x3 – 60x4 + s2 = 2400 [2]
x4 + s3 = 32 [3]
X2 – s4 + R4 = 200 [4]
X1 + x2 + x3 – s5 + R5 = 800 [5]
X1 – x2 –x3 + R6= 0 [6]
Xj ≥ 0 The
, Sj simplex
≥ 0, Rjalgorithm
≥ 0 for can
all Jthen be used to solve this problem
Solving For the optimal solution of [Maximization]
when there are artificial variables
Example # 1:
X1,x2,s1,s2,R1,R3 ≥ 0
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
R1, S2, R3 are
S2 1 4 0 1 0 0 32 basic
variables.
R3 3 2 0 0 0 1 24
Z -2 -5 0 0 +M +M 0
• Make z consistent; (R1, R3) in z-row coefficient (+M,+M) it must be zero; By apply:
• Starting table:
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
S2 1 4 0 1 0 0 32
R3 3 2 0 0 0 1 24
Z -2-4M -5-2M +M 0 -M -M -28M
Solving For the optimal solution of [Maximization]
when there are artificial variables (cont.)
Entering Variable
Basis X1 X2 S1 S2 R1 R3 RHS
R1 1 0 -1 0 1 0 4
S2 1 4 0 1 0 0 32
R3 3 2 0 0 0 1 24
Z -2-4M -5-2M +M 0 -M -M -28M
• First iteration
Min 4x1 + x2
ST
3x1+ x2 = 3
4x1 + 3x2 ≥ 6
X1+ 2x2 ≤ 4
X1, x2 ≥ 0
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
The Solution
• By adding the appropriate slack, surplus, and artificial
variables, we obtain the following:
Basis X1 X2 S1 R1 R2 S2 RHS
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
S2 1 2 0 0 0 1 4
Z -4 -1 0 -M -M 0 0
Entering Variable
Basis X1 X2 S1 R1 R2 S2 RHS
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
S2 1 2 0 0 0 1 4
Z -4+7M -1+4M -M 0 0 0 9M
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• First iteration
Leaving Variable
Entering Variable
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 1/3 0 1/3 0 0 1
R2 0 5/3 -1 -4/3 1 0 2
S2 0 5/3 0 -1/3 0 1 3
Z 0 (1+5M)/3 -M (4-7M)/3 0 0 4+2M
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• Second iteration
Entering Variable
Leaving Variable
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 0 1/5 3/5 -1/5 0 3/5
X2 0 1 -3/5 -4/5 3/5 0 6/5
S2 0 0 1 1 -1 1 1
Z 0 0 1/5 8/5 - M -1/5 -M 0 18/5
Solving For the optimal solution of [Minimization]
when there are artificial variables (cont.)
• Third iteration
Basis X1 X2 S1 R1 R2 S2 RHS
X1 1 0 0 2/5 0 -1/5 2/5
X2 0 1 0 -1/5 0 3/5 9/5
s1 0 0 1 1 -1 1 1
Z 0 0 0 7/5 – M -M -1/5 17/5
max z c1 x1 c 2 x 2 c n x n
s .t . a11 x1 a12 x 2 a1 n x n b1
a 21 x1 a 22 x 2 a 2 n x n b2
a m 1 x1 a m 2 x 2 a mn x n bm
x j 0(i 1,2 , ,n)
Finding the dual of an LP
min w b1 y1 b2 y2 bm ym
s.t. a11 y1 a21 y2 am1 ym c1
a12 y1 a22 y2 am 2 ym c2
a1n y1 a2 n y2 amn ym cn
yi 0(i 1,2 , ,m)
Finding the dual of an LP
• A tabular approach makes it easy to find the dual of
an LP. A normal min problem is found by reading
down; the dual is found by reading across in the
table.
Finding the dual of an LP
max z
min w x1 0 x2 0 xn 0
x1 x2 xn
y1 0 y1 a11 a12 a1n b1
y2 0 y2 a21 a22 a2 n b2
ym 0 ym am1 am 2 amn bm
c1 c2 cn
Finding the dual of an LP
max z 60 x1 30 x2 20 x3
s.t. 8 x1 6 x2 x3 48
4 x1 2 x2 1.5 x3 20
2 x1 1.5 x2 0.5 x3 8
x j 0(i 1,2 ,3 )
Finding the dual of an LP
max z
min w x1 0 x2 0 x3 0
x1 x2 x3
y1 0 y1 8 6 1 48
y2 0 y2 4 2 1.5 20
y3 0 y3 2 1.5 0.5 8
60 30 20
Finding the dual of an LP
max w 48 y1 20 y2 8 y3
s.t. 8 y1 4 y2 2 y3 60
6 y1 2 y2 1.5 y3 30
y1 1.5 y2 0.5 y3 20
x j 0(i 1,2 ,3 )
Finding the dual of a nonnormal LP
max z
min w ( x1 0) ( x2 urs )
x1 x2
( y1 urs ) y1 1 1 2
( y 2 0) y2 2 1 3
( y 3 0) y3 1 1 1
2 1
REFERENCES
• Production and Operations Management By
Bedi
• Production Management by B. S. Goyal