0% found this document useful (0 votes)
0 views

Or Ch -2 Linear Programming

This document provides an introduction to linear programming (LP), detailing its history, definition, and significance in management science for optimizing resource use. It outlines the main elements of LP, including decision variables, objective functions, and constraints, and explains the formulation of LP problems through examples. Additionally, it discusses methods for solving LP problems, such as the graphical method and the simplex algorithm.

Uploaded by

barkhadmaarley
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Or Ch -2 Linear Programming

This document provides an introduction to linear programming (LP), detailing its history, definition, and significance in management science for optimizing resource use. It outlines the main elements of LP, including decision variables, objective functions, and constraints, and explains the formulation of LP problems through examples. Additionally, it discusses methods for solving LP problems, such as the graphical method and the simplex algorithm.

Uploaded by

barkhadmaarley
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 117

1

Chapter Two
INTRODUCTION TO LINEAR PROGRAMMING

Gemechu Abdissa (PhD)


Email- [email protected]
Mob. 0927119356
Introduction 2

 Linear programming- developed by Kantorovich in 1939 and


extended by G. Dantzig in 1947
 The original name, "programming in a linear structure," which
was later shortened to "linear programming.“
 Programming- “planning or optimization”
 LP- Planning with linear models
Meaning of LP 3

 LP is a mathematical technique for choosing the best


alternative from the set of feasible alternatives.

 It is the most commonly applied form of constrained optimization,

which is harder than uncontained optimization


…. 4

 Linear Programming (LP) a field of


management
is science that finds most
efficient way of using limited resources to
achieve the objectives of a business.

Optimization
5

 Simple: easy to manipulate


 Easy to understand: easy to explain
 Robust: strong (good enough for every thing)
Main elements LP
 Decision variables –value of unknown variables
Goal- to find values of the variable that provide a best value of the objective function

 Objective function- mathematical expression that

combines the variables to express your goal.


• Represent profit, efficiency, yield, cost etc

• Requirement: maximize or Minimize objective function

 Constraints- a mathematical expression that combine the

variables to express limits on the possible solutions


 Variable bound- Right hand side (rhs) or quantity, budget
6
7
Expressing optimization problems mathematically

 Decision variables
X1 , X2 , X3 , … , Xn
e.g. the quantities of different
products
Index n = the number of
product types
f(X1 , X2 , X3 , … , Xn) < b
 Constraints f(X1 , X2 , X3 , … , Xn) > b
– a less than or equal to constraint :
f(X1 , X2 , X3 , … , Xn) = b
– a greater than or equal to constraint :
– an equal to constraint :
 Objective

– MAX(or MIN) Z : f(X1 , X2 , X3, …,


Xn)
8

MAX(MIN) : f(X1 , X2 , X3 , … , Xn)

Subject to:
f(X1 , X2 , X3 , … , Xn) < b1

f(X1 , X2 , X3 , … , Xn) > bk

f(X1 , X2 , X3 , … , Xn) = bm

note : n variables, m
constraints
STEPS IN FORMULATION OF LP PROBLEMS
9

There are three basic steps in formulation of LPM

Step 1 : define the decision variables how many

x1, x2, x3……xn to produce


Step 2 : define the objective function

maximize profit or minimize a cost

Step 3 : define the constraints

resources available to produce something


Exampl
10
eundecided at the most profitable mix for
 An electronic firm is
its products. The products manufactured are
transistors, resistors and carbon tubes with a profit of
(per 100 units) $ 10, $6 and $4 respectively. To
produce
transistorsa shipment
containingof 100 units 1 hour
engineering, 10 hours of
administrative service. To produce
requires of 100 units 2of hours
direct resistors
requires 1 hour, 4 hours and 2 hours
labor ofand
engineering, ofdirect
labor and administrative time respectively. For 100 unit of
carbon tubes it needs 1 hour, 6 hours and 5 hours of
engineering, direct labor and administrative time
respectively. There are 100 hours of engineering time, 600
hours of direct labor and 300 hours of administrative time
available. Formulate the corresponding LPP.
11

 Let X1- 100 units of transistors


 X2- 100 units of resistors
X3- 100 units of carbon

tubes Z= 10X1+6X2+4X3
each product will requires
X1+X2+X3
10X1+4X2+6X3
2X1+2X2+5X3
But the total time available for engineering, direct labour and
administrative services is 100, 600 and 300 hours respectively.
12


A minimization model example
 A farmer is preparing to plant a crop in the spring and needs to
fertilize a field. There are two brands of fertilizer to choose from,
Super-gro and Crop-quick. Each brand yields a specific amount of
nitrogen and phosphate per bag, as follows:
Chemical contribution
Brand Nitrogen (lb/bag) Phosphate (lb/bag)
super-gro 2 4
Crop-quick 4 3

The farmer's field requires at least 16 pounds of nitrogen and 24 pounds


of phosphate. Super-gro costs $6 per bag, and Crop-quick costs $3. The
farmer wants to know how many bags of each brand to purchase in order to
the total cost of fertilizing.
minimize
13
14
 Decision Variables

x1 = bags of Super-gro x2 = bags of Crop-quick

The Objective Function minimize Z = $6x1 + 3x2

where

$6x1 = cost of bags of Super-gro

$3x2 = cost of bags of Crop-quick


Cont’
15
d
16

LP Solutions
17
Solution of Linear Programming
Problems
 The linear programming problems can be
solved to determine optimum strategy by
two methods- Graphical and Simplex
method.
A. GRAPHICAL METHOD 18
 Graphical method is suitable when there are only two
decision variables.
 Models with three decision variables can be graphed in
three dimensions, but the process is quite cumbersome, and
 Models of four or more decision variables cannot be
graphed at all.
STEPS IN GRAPHICAL METHOD
Step I.
Formulate the LP Problem as explained in the previous class.

Step II.
Convert the inequalities in to equalities to obtain graphical form of
the

constraints.

(Draw the line of each constraint, first putting x1=0 to find the value of x2 and

then putting x2=0 to find the value of x1. Then draw the line for the values of

x1 and x2 which represents the particular constraint. Once the lines are drawn

for all the constraints, identify the feasible polygon (area) by shading the area
19
below
> type).the line for the constraint < and shading above the line for the
Cont’d
20
Step III.
Identify the extreme points of the feasible polygon and name the Corners.

Step IV.
Evaluate the objective function Z or C for all points of feasible region.

Step V.
In case of maximizing objective function Z, the corner point of feasible
region giving the maximum value of Z becomes the value of decision
variables. Similarly in minimizing case, the point of minimum value of C
gives the answer.

 NB: an optimum solution to the LP is always at corner point.


21

Maximization Problem ==>Maximize Z with inequalities of


constraints in < form.
Example:
Consider two models of color TV sets; Model A and
B, are
produced by a company to maximize profit. The profit
realized is
$300 from A and $250 from set B. The limitations are;
a. availability of only 40hrs of labor each day in the production
department.
b. a daily availability of only 45 hrs on machine time.
c. ability to sale 12 set of model A.
 How many sets of each model will be produced each day so that
the total profit will be as large as possible?
Maximization 22
Problem…
Resources used per unit
Constraints Model A Model B Maximum Available hrs.
(X1) (X2)

Labor hr. 2 1 40

Machine hr. 1 3 45

Marketing hr. 1 0 12

Profit $300 $250

Solution
1. Formulation of mathematical modeling of LPP
Max Z=300X1 +250X2
St:
2X1 +X 2 < 40
X 1 +3X2< 45 LPP Model
X1 <
12
X1 , X2 >0
Maximization
23
Problem…
2.Convert constraints inequalities into
equalities 2X1 +X 2 = 40
X 1 +3X2= 45
X1 = 12
3. Draw the graph by intercepts
2X1 +X 2 = 40 ==> (0, 40) and (20, 0)
X 1 +3X2= 45==> (0, 15) and (45, 0)
X1 = 12==> (12, 0)
X1 , X2 =0

X2
X =0
1
2X1 +X 2 = 40

40 X1=12

15
B

X 1 +X 2 = 45
Feasible C(12,
Region 11) X 2 =0
X1
D
A 12 20 45
Maximization Problem… 24
4. Identify the feasible area of the solution which satisfies all constrains.
5.Identify the corner points in the feasible region A (0, 0), B (0, 15), C
(12, 11) and D (12, 0)
6. Identify the optimal point
7. Interpret the result

Corners Coordinates MaxZ=300 X1 +250X2


A (0, 0) $0
B (0, 15) $3750

C (12, 11) $6350


D (12, 0) $3600

Interpretation:
12 units of product A and 11 units of product B should be produced so that the total profit will be $6350.
25

Minimize C= 50x1 + 20x2


Subject to
2x1 – x2> 0 x1 + 4x2 >
80
0.9x1 + 0.8x2 >40
x1 ,x2 > 0
Solution:
26
 The first step is skipped as LP problem is already
formulated. We will follow other steps simultaneously. In
constraint (i) 2x1 –x2 > 0 there is no constant value, hence
it must pass through the origin. First convert it into
equality.

2x1 –x2 = 0 . Now give x1 any arbitrary value.

When x1 =0, x2=0

x1 =1, x2=2

x1 =2, x2=4 and so on.


Cont’d
27
 We draw the line with these coordinates and get line I drawn in the graph
passing through origin.
 Now, convert constraint (ii) in equality
x1 + 4x2 = 80
When x1 =0, x2=20
X2 =0, x1=80
 We draw the line II (80, 20) as shown in graph.
 Now, convert constraint (iii) in equality
0.9x1 + 0.8x2 =40
 When x1 =0, x2=50
X2 =0, x1=44.4
 We draw line III (44.4, 50) as shown in
graph.
C
o
n
t’
d
Cont’
d
 29
For feasible area we need to examine all the three constraints
equations (Note, all are > type)
 In equation (i) if we move vertically upward, meaning x1=o and
x2 increasing, the equation becomes negative or less than, which
is not permitted. Hence feasible area should be on RHS.
 In equation (ii), the feasible area should be above the line
because it is greater than the sum of x1 and x2.
 Similarly in equation (iii) it is on the RHS therefore feasible area
(region) is indicated by three rows or shading and extends up to
infinity.
Cont’ 30
d
 Now we have to find out different values of Z at different corner
points, B,C,E by finding out their coordinates (x1, x2) then putting
them in objective function Z. The point which gives the
minimum value is the answer.
At corner B x1=16,x2=32 therefore Z= 1440

At corner C x1=34.4,x2=11.4 therefore Z= 1948

At corner E x1=80,x2=0 therefore Z= 4000


From the above we can see that minimum value of Z is at point B
where x1=16 and x2 =32 and hence it is the answer.
31

B. Simplex
Algorithm
32

 Geometric (graphical method) of solving LPP is useful only


for problems involving two DVs and relatively few
problem constraints.
 What happen when we need more DVs and more problem
constraints?
 We use an algebraic method called the simplex method,
which was developed by George B Dantzig in 1947.
Cont’d…
 The simplex
.
Algorithm is an iterative
33
procedure for
finding the optimal solution that comes from the corner
points of the feasible region.
 Simplex algorithm considers only those feasible solutions
which are provided by the corner points and that too not all
of them. It is very efficient algorithm.
 The technique also has the merit to indicate whether a
given solution is optimal or not.
34
Basic terms in simplex approach
 Standard Form: linear relationships of objective
function and constraints, making RHS of constraints as equal
produces standard form, whereas the inequality situation is
called canonical form
 Slack/surplus and Artificial Variables: these are generally
designated as S1, S2 . . . . etc. and A1, A2 etc. respectively
 Slack variables indicate unused capacity of a constraint
added in ‘≤’ constraints
 Slack variables represent the unused resources between
the
left-hand side and right-hand side of each inequality.
 Since, slack and surplus variables are insignificant with no
contribution, they are represented with coefficient of zero in
the objective function.
Basic terms in 35

simplex
 Artificial approach
variables …imaginary
are variables added ≥
toinhave the standard
‘=‘ & formconstraints
 Simplex Table: A table used for
calculations during various iterations of the
simplex procedure, is called Simplex table
Example 36

 Max Z = 6X1 + 8X2


– S.t 5X1 + 10X2 ≤ 60
4X1 + 4X2 ≤ 40
X1, X2 >= 0

The Standard form of the LPM:


 Max Z = 6X1 + 8X2 + 0S1 + 0S2
– S.t 5X1 + 10X2 + S1 = 60
4X1 + 4X2 + S2 = 40
X1, X2, S1, S2, ≥ 0
 Since slack does not provide any real contribution to
the
obj. fun, each slack variable is assigned a coefficient
of
zero in the objective function
37
Interpretati 38
on
 Cj = the coefficient of the variables in the
objective function in the standard form.
 Cb = the coefficient of basic variables in the
obj. fun.
 X1, X2, ..Xn = decision variables .
 S1, s2, Sn = basic variables (slack).
 a11, a12,… coefficient of DV in the constraint
set.
 1, 0, 1 are coefficient of basic variables in the
constraints set.
 RHSV = the right hand side value of the
constraints.
..con 39
 Cj - Zj = Index t The
Row: row containing net
profit
or loss resulting from introducing one unit of
the variable in that column in the solution. A
positive
number in the index row would indicate an
algebraic reduction or increment in the objective
function if one unit of the variable of that column
is introduced in the basis
 Pivot -Column: The column with the largest
positive number in Cj - Zj row in a
maximization problem or the largest negative
number in a
minimization problem is called Pivot column.
This
indicates the variable entering the solution in
the next iteration by replacing an appropriate
variable.
… 40
 Pivot Row:
cont
it is the ratio of
quantities
divided by of the Pivot column which
indicates the outgoing variable to be
replaced by the entering variable. This
would be the one with the smallest
positive value of the ratio column

 Pivot Element: The element at the point


of intersection of the key column and the
key row is called the Pivot element
A. Simplex Algorithm - Maximization
problem 41
Exampl
e:
Steps in Simplex Method 42

 Step1: Write the problem in Standard form


– Max Profit = $70T + $50C + 0S1 + 0S2
 Subject to:

• 2T + 1C + 1S1 + 0S2 = 100


• 4T + 3C + 0S1 + 1S2 = 240
• T, C, S1, S2 ≥ 0
Step 2: develop Initial Simplex 43
Tableau
Interpretation for Initial
simplex tablea 44
 The number in the first row represent the coefficients in the
first constraint and the u
numbers in the second row is the
coefficients in the second constraint
 Initial solution is T = 0 and C= 0 a, So, S1 = 100 and S2 =
240, max
of Z = 0
 The two slack variables are the initial solution mix where the
values are found in the Quantity column
 The Substitution Rates:
– The coefficient of the constraint equations
are the substitution rates
– Using variable T, to produce 1table; 2 units of
S1 and 4units of S2 have to be removed from
the solution, has to be consumed
– Using variable C: to produce 1 chair; 1 unit of
S1 and 3units of S2 should be consumed or
removed from the solution mix
– The slack variables should make an identify
matrix
Cj - 45
 The Cj – Zj number in each column represents the
Zjresult from introducing 1 unit of
net profit that will
each DV
 It is computed by subtracting the Zj total for
each column from the Cj value at the very
top of that variable's column
 Obviously with a profit of $0, the initial solution
is not optimal
 By examining the numbers in the Cj – Zj row in the
table, we can see that the total profits can be
increased by $70 for each unit of T and $50 for
each unit of C
 A negative number in Cj – Zj row would tell us
that the profits would decrease if the
corresponding variables were added to the
solution mix
 An optimal solution is reached when there
are no positive numbers in the Cj - Zj row in
Step 3: Determining Entering and leaving variables 46
 Determining the entering variable: For a
maximization problem; the entering variable is
identified as the one which has the largest positive
value in Cj-Zj
row. The column which corresponds to the
entering variable in the simplex tableau is called
pivot column.
 In a minimization problem, the entering variable is
identified as the one which has the largest negative
Cj-Z row value in the simplex tableau.
 Determining the leaving variable: the
leaving variable is identified as the one with the
smallest non-negativity ratio for quantity divided by
respective positive pivot columnar entries. The row
of the leaving variable is pivot row
 The number at the intersection of the pivot row
and pivot column is the pivot number
The Second simplex Tableau 47

 All the pivot column elements except the pivot number


(has to be 1) should be changed to Zero by applying row
operation
… 48
2 1 cont
1 0 100
Divide all the pivot row by the pivot number i,e,. By 2
1 0.5 0.5 0 50
Apply row operation to change the pivot column elements to be zero,
keeping that the pivot number to be one
The operation is applicable to all of the row elements
Row operation: -4R1 + R2 = R2
-4 -2 -2 0 -200
4 3 0 1 240
When you sum up the above two rows using the operation the resulting R2
value will be:
0 1 -2 1 40
49
The Resulting simplex is:
50
In terp retatio n of th e 2 n d sim
p
Thelex tabsolution
current le is 50 tables and zero chairs
generates a profit of $3500
 T is a basic variable and C is a non-basic variable
here
 Slack variable S2 is the unused time in the carpentry
dep’t and is in the basis.. Its value implies there is
40 hours of unused carpentry time remaining.
 Slack variable S1 is non basic and it means no
unused time in the painting dep’t
… 51
continued
 The substitutions:
– In column C, if 1 unit of C is added to the current
solution,
0.5 unit of T and 1 unit of S2 must be given up
– Because these are marginal rate of substitution, so
only 1 more unit of S2 is needed to produce 1 chair
– In column S1, the substitution rates means that if 1
hour of slack painting time is added to produce a chair,
0.5 less of a table will be produced
 Cj – Zj row is important for two reasons:
– First, it indicates whether the current solution is
optimal – when there are no positive values in the
bottom row, an optimal solution to a maximization LP
has been reached
– Second, we use it to determine which variable will
enter the solution mix
Developing the Third Simplex 52
tableau
Developing the Third Simplex 53
tableau
Optimal solution 54

 Therefore,optimal solution is reach now because all


the elements in the last row is zero and negative and
hence:
– T = 30units
– C= 40 units and
– Max Profit = $4100

– S1 = 0 and S2 = 0
Exercis 55
e
 Max Z = 60X1+ 50X2
Subject to
4X1+10X2 ≤ 100
2X1 + X2 ≤ 22
3X1 + 3X2 ≤ 39
X1, X2 >=0
Standard form of 56
the LPP is as
follows:
Determining the Entering
57
and Exiting Variables

Select the leaving variable as the one that has the smallest nonnegative
ratio of quantity divided by substitution rate.
58
Completed Second
Tableau

Interpreting the Second Tableau


At this point, variables s1, x1, and s3 are in solution. Not only are
they listed in the basis, they also have a 0 in row C – Z. The solution
at this point is s1 = 56, x1 = 11, and s3 = 6.
Note, that x2 and s2 are not in solution. Hence, they are each equal
to zero. The profit at this point is $660, which is read in the
Quantity column in row Z. Also, note that each variable in
solution has a unit vector in its column.
59
60
Completed Third
Tableau

Interpreting the Third Tableau


In this tableau, all of the values in the bottom row are either negative or
zero, indicating that no additional potential for improvement exists.
Hence, this tableau contains the optimal simplex solution, which is
s1 = 24
x1 = 9
x2 = 4
Class 61
work
 Maximize Z = 30x1 + 40x2
Subject to, 60x1 + 120x2 < 12,000
8x1 + 5x2 < 600
3x1 + 4x2 < 500
x1, x2 > 0
Answer X=
1

200/11 X =1000/11
2

Profit= 46,000/11
62

Simplex Algorithm-
Minimization problem
B. Simplex Algorithm- Minimization
problem 63
 Some of the important aspects of minimization problem

1. Artificial variables have no economic significance


• Introduced only to bring in the standard form of simplex method.
• Need be removed from the solution as soon as they become non-
basic.

2. Since these variables are added for computation purpose only,


• ensure their zero value in the optional solution.
• This can be done by assigning very large penalty (+M) for a
minimisation problem, so that these do not enter the solution.
64
Cont’d…
3.If artificial variables cannot be removed from the solution,
then the solution so obtained is said to be Non-Feasible. This
would indicate that the resources of the system are not
sufficient to meet the expected demand.

4.Equality Constraints also can be handled by using artificial


variables to obtain initial solution.
Cont’d

 The Big M-method for solving LP problem can be adopted as

follows:

Step 1 : The standard simplex table can be obtained by


subtracting a surplus variable and adding an artificial
variables.
 Slack variables are assigned zero coefficients and artificial
variables assigned +M coefficients in the objective
function.

Step 2: We obtain initial basic feasible solution by assigning


zero value to the decision and slack variables.
65
Cont’d 66
… solution is obtained in the form
Step 3: Initial basic feasible
of the simplex table as above and then values of ∆j = Cj - Zj
are calculated.
 If ∆j ≥0, then the optimal solution has been obtained.
 If ∆j< 0, then we select the largest negative value of ∆j and
this column becomes the key column indicating the
entering variable.
67

Step 4: Determine the key row as in case of maximisation


problem i.e., selecting the lowest positive value of the ratio Q or
bi/aij, obtained by dividing the value of quantity bi by
corresponding element of the key column.
Cont’d
68
…3 and 4 to ensure optimal solution
 Step 5: Repeat steps

with no artificial variable in the solution.


 If at least one artificial variable is present in the basis with
zero value and coefficient of M in each Cj - Zj values is
negative, the LP problem has no solution. This basic
solution will be treated as degenerate.
69
Cont’d…
 If at least one artificial variable is present in the basis
with positive value, and coefficient of M in each Cj -
Zj values is non-negative, then LP problem has no
optimal basic feasible solution. It is called
pseudo-optimum solution.
Exampl 70
e
 Food A contains 20 units of vitamin X and 40 units of

vitamin Y per gram. Food B contains 30 units each of


vitamin X and Y. The daily minimum human requirements
of vitamin X and Y are 900 and 1200units respectively.
How many grams of each type of food should be
consumed so as to minimise the cost, if food A costs 60
cents per gram and food B costs 80 cents per gram.
71
Solution:

 LPP formulation is as follows

Min. Z = 60x1+ 80x2 (Total Cost)

Subject to, 20x1 + 30x2 > 900 (Vitamin X Constraint)

40x1 + 30x2 > 1,200 (Vitamin Y Constraint)


and x1, x2 > 0
72
Cont’d…
 Adding slack and artificial variables, we
get

Min. Z = 60x1 + 80x2 + 0S1 + 0S2 + MA1 + MA2

Subject to, 20x1 + 30x2 – S1 + A1 = 900

40x1 + 30x2 - S2 + A2 = 1,200

and x1, x2, S1, S2, A1,


A2 > 0
Initial non-optimal solution is written as
follows:
simplex table I
Zj Cj 60 80 0 0 M M Ratio
BV Q x1 x2 s1 s2 A1 A2
M A1 900 20 30 -1 0 1 0 45
M A2 1200 40 30 0 -1 0 1 30

Zj 2100M 60M 60M -M -M M M


Cj-Zj 60-60M 80-60M M M 0 0

Since ∆j = 60 – 60M is the largest negative, x 1


becomes the entering variable, similarly Ratio
bi/aij = 30 is lowest positive value, hence it
Simplex table
II
Zj Cj 60 80 0 0 M Ratio
BV Q x1 x2 s1 s2 A1 Q/aij

M A1 300 0 15 -1 1/2 1 20
60 X1 30 1 3/4 0 -1/40 0 40

Zj 1800+300M 60 45+15M -M -3/2+1/2M M


Cj-Zj 0 35-15M M (3-M)/2 0

Since ∆j = 35 – 15M is the largest negative , x 1


becomes the entering variable, similarly Ratio
bi/aij = 20 is lowest positive value, hence it
Initial non-optimal solution is written as
follows: Simplex table III

Zj Cj 60 80 0 0
BV Q x1 x2 s1 s2
80 X2 20 0 1 -1/15 1/30
60 X1 15 1 0 1/20 -1/20

Zj 2500 60 80 -7/3 -1/3


Cj-Zj 0 0 7/3 1/3

Since ∆j = zero and positive value, hence this the


solution.
75
Class
Work
Solution

77
Initial
Tableau

 X1 – entering variable and A2 – the leaving variable and the


Pivot element is 8
 Row operation:
– New R2 = 1/8 *Old R2 to make the pivot element
ONE
– New R1 = -3 * New R2 + Old R1 to make the pivot
column elements ZERO except the key element
Second
Tableau

 X2 – entering variable and A1 – exiting variable


and key element is 9/2
 Row operation:
– New R1 = 2/9 * Old R1 to make the pivot element
ONE
– New R2 = -1/2 * New R1 + Old R2 to make the pivot
column elements ZERO except the key element
Third
Tableau

 Do we reach at optimal? Yes, b/c in case of


minimization, if all the C-Z row are zero and
positive, it indicates optimality is attained
 Therefore, X1 = 20/3 X2 = S1 = 0 S2
8/3
=0
– and Min Z = 212/3
Special Issues in the Simplex Method (Reading
Assignment)

1. Non-feasible Solution/ Infeasibility


– Whenever the optimality criteria is satisfied but still
there exist an artificial variable in the basis or solution
mix, this is the indication of infeasibility.
2. Unbounded Solution
– It is detected when trying to decide which variable to
leave [while computing replacement ratio for all
variables]
– If the entire ratios turn out to be negative or undefined,
it indicates that the problem is unbounded.
Cont…

– A negative ratio means that increasing that


variable would increase resources.
– A zero ratio means that increasing the variable would not
use any resources.
3. Degeneracy
– Tie for leaving basic variable (key row)
– If there is a tie for the smallest ratio, this is a signal that
degeneracy exists.
– Such problems can be overcome by trial and
error method.
Cont…

 Degeneracy could lead to a situation known as cycling,


– in which the algorithm puts a new variable in, then takes
it out in the next tableau, puts it back in, and so on.
 Adopt the following rules to minimize the number of
iterations:
a) Divide the coefficient of slack variables in the simplex
table where degeneracy occurs by the corresponding
positive numbers of the key column in the row, starting
from left to right.
b) The row which contains smallest ratio comparing from
left to right column wise becomes the key row.
Cont…

4. Tie for entering variables


 Selection can be made arbitrarily. However, the
following
rules help to minimize iterations.
a) If there is a tie between two decision variables, then the
selection can be made arbitrary.
b) If there is a tie between a decision variable and a slack
(or surplus) variable, then select the decision variable.
c) If there is a tie between slack or surplus variable, then
selection can be made arbitrary.
Cont…

5. Multiple Optimum Solutions


– A situation when there can be infinite number of
solutions possible for a given problem.
– This can be recognized when one of the non-basic
variables in the Cj-Zj, row have a value of
zero.
– To obtain the other solution, we will make a non-
basic variable with a zero Cj-Zj value to enter
in to the basis and solve.
86
POST OPTIMALITY ANALYSIS

• SENSITIVITY ANALYSIS
• DUALITY

• Carried out after


the optimal solution is
found
• Is begins with the final simplex
87
Sensitivity analysis
 Examination of the impacts of changes of parameters on
the optimal solution.
 i.e. change of coefficient of the constraints, change
of coefficient of the objective function, change of quantity
of RHS values.
 Starts with the final tableau of the LPP (simplex tableau)
Example: 1. a change in the RHS of88
a constraints
 Shadow prices: ==>How much should a firm be
willing to pay
 to make additional resources available?
 Shadow prices signify the change in the optimal
value of the objective function for 1 unit increases in
the value of the RHS of the constraint that
represent the availability of scarce resources.
 The negative of the number of Cj - Zj row in its slack
variable columns provide as with shadow prices. Or:
shadow prices are found in the Zj row of the final
simplex tableau in the slack variable columns.
 RHS ranging is the range over which shadow
prices remain valid.
 The 89
LPM of the micro computer
problem above is:
Max Z: 60x1+50x2

Subject to:

Assembly time: 4X1+10x2≤100

Inspection time: 2x1+x2≤22

Storage space: 3x1+3x2≤39

x1, x2≥0
Cont’d 90

Basis Cj 60 50 0 0 0 Quantit
X1 X2 S1 S2 S3 y
S1 0 0 0 1 6 -16/3 24
X1 60 1 0 0 1 -1/3 9
X2 50 0 1 0 -1 2/3 4
Z 60 50 0 10 40/3 740

Cj-Z 0 0 0 -10 -40/3

Shadow price
 From the above tableau; the shadow prices are $ 0 for S1, $10

for S2 and $40/3 for S3.

 for example, an increase of S1 by one unit will


resulted

increment of objective value by $0.

 Similarly the opposite is true, i.e. decrease of 1 unit of S1 will

be resulted in reduction of objective value by $0.

 But to what extent this change hold true?

 Because we can’t increase or decrease the constraint infinitely,

there are upper and lower limits, i.e. allowable increase


91
decrease.
92
Range of Feasibility (Right hand side
range)
 The range of feasibility is the range over which
the RHS value of a constraint can be
changed and still have the same shadow
prices.
93
Step
s ratio)
Step 1. compute the ratio (feasibility quantity

respective slack value = Q/S

both –ve and +ve ratio are considered

Step 2. identify the smallest +ve ratio


and –ve ratio closest to zero

Step 3. find the upper limit or allowable


increaseand lower limit or allowable decrease (range
Upper limit= the original value - negative ratio
of feasibility) Closest to zero
Lower limit= the original value – positive ratio
For both max and min problems
Determine the range of feasibility for each of the 94
constraints in the ff LPP, whose final
tableau
Cj 60 50 0 0 0
Zj Bv Q X1 X2 S1 S2 S3
0 S1 24 0 0 1 6 -16/3
60 X1 9 1 0 0 -1 -1/3
50 X2 4 0 1 0 -1 2/3
Zj 740 60 50 0 10 40/3
Cj-Zj 0 0 0 -10 -40/3
95
Solutio
n of the resources
1. Recall the original value
Original value constraints S1 S2 S3
100 S1 1 6 -16/3
22 S2 0 -1 -1/3
39 S3 0 -1 2/3
2. ratio = Q/respective slack values
S1= 24/1= 24 S2= 24/6= 4 S3= 24/-16/3= -4.5
9/0= undefined 9/-1= -9 9/-1/3= -
4/0= undefined 4/-1= 27
4/2/3=
-4
6
96
3. Find the range of feasibility

Constrai Origina Lower limit Upper limit Range of


nts l value feasibility
S1 100 100-24= 76 100+∞ 76 - ∞
S2 22 22-4= 18 22+4= 26 18 - 26
S3 39 39-6 = 33 39+4.5= 43.5 33 - 43.5

Therefore:

Constraint one (assembly line): 100-24 up to 100+∞= 76 -



Constraint two (inspection time): 22-4 up to 22+4= 18 - 26

Constraint three (storage space): 39-6 up to 33 - 43.5


39+4.5=
Interpretati
97
on
First constraint:
Each hour decrease in assembly time will decrease the current
profit by Birr 0 (i.e no effect-indicated by shadow price) as long
as the decrease is up to 24 hours. But if the assembly time
decreases by more than 24 hours (or if the total available
assembly time is lower than 76 hours), the current shadow price
will no longer be valid. That is, the profit will be affected. But
available assembly time can increase indefinitely (=allowable
increase is ∞ ) without affecting the current profit level.
98
Second constraint:

Similarly, Each hour increase or decrease in inspection time will


increase or decrease the current profit by $10, respectively as long as
the total inspection time is between 18 and 26 hours. Out side the
range of feasibility, the current shadow price ($10) will not be valid.

Third constraint:

Each cubic feet increase or decrease in storage space results in an


increase or decrease, respectively, of profit by $13.33 (i.e 40/3) as
long as the total storage space is between 33 and 43.5 cubic feet.
99
Example 2. A change of coefficient of objective function

Range of optimality

the range over which the objective function coefficient


of basic variables can change without changing the
optimal values i.e. without changing basic and non
basic variables but change the optimal function value.
100

For both max and min problems

Upper limit= Current coefficient + smallest +ve


Closest to zero
ratio Lower limit= Current coefficient + smallest -ve
ratio
101
Exampl
Zj BV
Cj
Q
60
X1
50
X2
e 0 0
S1 S2
0
S3
0 S1 24 0 0 1 6 -16/3
60 X1 9 1 0 0 1 -1/3
50 X2 4 0 1 0 -1 2/3
Zj 740 60 50 0 10 40/3
Cj-Zj 0 0 0 -10 -40/3
Solution
102


X1 Cj-Zj 0 0 0 -10 -40/3
X1 values in the
tableau 1 0 0 1 -1/3 X2 Cj-Zj 0 0 0 -10 -40/3

∞ ∞ ∞ -10 40 0 1 0 -1 2/3

• Upper limit= 60+40= 100 ∞ ∞ ∞ 10 -20

• Lower limit= 60+ (-10)= 50 • Upper limit= 50+10= 60

• Range of optimality of X1(1st DV)= 50-100 • Lower limit= 50 )+(-20)= 30

• Range of optimality of X2(2nd DV)=


30-60
EXERCISE: 103
Solve the following LPP using simplex method. A firm
that manufactures both lawn mowers and snow blowers:
X1 =the number of lawn mowers
X2 =the number of snow
blowers
Max.Z=$30x1+$80x2
Subject to:
2 x1+4x2 < 1000 Labor hours available 6x1
+ 2x2 < 1,200 pound of steel
available
x2 < 20 snow blower engine
available x1, x2 >0
a. What is the best product mix?
What is the optimal profit?
Answer:
b. What are the shadow prices? When the
optimal solution has been reached,
which resource has the highest marginal
value?
Answer:
The shadow price for 1 additional
labor=$0 The shadow price for 1
additional pound of steel=$5.01
The shadow price for 1 additional
snow blowers engine made available
=$70.01
 Thus, snow blower engine have the
highest marginal value at the optimal
104
solution.
c. Overwhatrange in each of the RHS
values are these
shadows valid?
 The shadow price for labor hours is valid from 466.66
Answer:
hours to an infinite.
 The shadow price for pounds of steel is valid from 40
pounds up to
2800pounds
 The shadow price for snow blower engines ranges from 0
engines up to 180 engines
d. What are the ranges over which the
objective function coefficients can vary for
each of the two decision variables?
Answer:
 With out changing the current solution mix, the profit
coefficient
the blowersfor the
can mowers
range fromcan
$10range
to from $0 to 240, 105
while
the coefficient for
infinity.
106
Duality
 The mirror image of LPP
A given LPP has two forms
1. The Primal: the original LP Model
2. The Dual: alternative
How to convert the primal to its dual and vice versa?
Maximization objective of the primal= minimization objective of
the Dual.
DUALITY 107
 Every LPP has another LPP associated with
it, which is called its dual.
 The first way of starting a linear problem is
called the primal of the problem.
 The second way of starting the same problem
is called the dual.
 The optimal solutions for the primal and the
dual are equivalent, but they are derived
through alternative procedures.
Primal-Dual
Relationship
Primal Dual
Objective is minimization Objective is maximization and vice versa

> type constraints < type constraints

No of columns No of rows

No of rows No of columns

No of decision variables No of constraints

No of constraints No of decision variables

Coefficient of Object function RHS value

RHS value Coefficient of Object function

Duality Advantage
1. The dual form provides an alternative form
2. The dual reduces the computational difficulties associated with some formulation
3. The dual provides an important economic interpretation concerning the value
scars of
resources used. 108
Example: 1
Write the duals to the following problems
a. Max.Z=5x1+6x2
Subject to:
2x1+3x2 < 3000
(Labor
constraint) < 5000 (Market
x1 + x2
5x1 +x7x
1, 2 <x2constraint)
>0
1000
So lu tio n
(Machine
constraint)
Represent primal in the conventional table as follows
Dual variables x1 x2 Constraints
u1 2 3 < 3000
u2 5 7 < 1000
u3 1 1 < 500
MaxZ 5 6

By referring the above table, dual for this can be


stated as: 109
110
MinZ*=3000 u1 +1000 u2 +500 u3
St:
2u1+5u2 + u3> 5
3u1+7u2 + u3> 6
u1, u2 , u3> 0
Note:
For maximizing, all
constraints must be
brought to “<” form
For minimizing, all
constraints must be
brought to “>” form
If they are not, use
multiplication factor -1
b. Max.Z=60x1+50x2
Subject to:
2x1+4x2 < 80
3x1 + 2x2
111
< 60
x1

< 15
2x2
Dual variables x1 x2 Constraints
< 36
u 2 4 < 80
x11,
u2 3 2 < 60
x2u3> 0 1 0 < 15
u4
Solution 0 2 < 36
MaxZis
Primal 60 50
represented
Theindual form is:
the tableMinZ*=80
as u1 +60u2 +15u3+36u4
follows:
St::
2u1+3u2 + u3

u1, u>2 60
, u4 >
u3,
4u1+2u2 +0

u4
C. Obtain the dual problem of the following primal LPP
Min.Z=x1 +2x2
Subject to:
112
2x1+4x2 < 160
x1 - x2 = 30 x1
>
10
x1,

x2 > 0
Solution
Rule:
1. For a maximization primal
with all < type constraints
there exists a minimization
dual problem with all > type constraints and vice versa. Thus, the inequality sign is reversed
in all the constraints except the non-negativity conditions.
2. Transform the < type constraint to a > type constraint by multiplying the
constraint by -1.
3. Write the = type constraint equivalent to two constraints of the type > and <.
The standard primal LPP so obtained is:
Min.Z=x 1 +2x 2

Subject to:
-2x1-4x2 > -160
x1 - x2 > 30
 Let u1, and u4 be the dual variables corresponding to the four
constraints in
u3,
given order, then the dual of the given primal
113
problem can be
u2 ,
formulated as follows:
MaxZ*=-160 u1+30 u2-30 u3+10 u4

St:
-2u1+ u2- u3+ u4 < 1
-4u1- u2+ u3 <2
u1, u2 , u3, u4 >0
Let u= u2-u3, then the above dual problem reduces to the form:
MaxZ*=-160 u1+30 u2-30 u3+10
St:
-2u1+ u+ u4 < 1
-4u1-u <2
u 1, u4 > 0, u unrestricted in sign
Here it may be noted that the second constraint in the primal
is equality. Therefore, the corresponding dual u2 should be unrestricted in
sign.
 The doctor advises a patient visited him that the patient is weak in

his health due to shortage of two vitamins, i.e., vitamin X and

vitamin Y. He advises him to take at least 40 units of vitamin X and

50 units of Vitamin Y everyday. He also advises that these vitamins

are available in two tonics A and B. Each unit of tonic A consists of

2 units of vitamin X and 3 units of vitamin Y. Each unit of tonic B

consists of 4 units of vitamin X and 2 units of vitamin Y. Tonic A

and Bare available in the medical shop at a cost of ETB 3 per unit of

A and ETB 2.50 per unit of B. The patient has to fulfill the need of
114
vitamin by consuming A and B at a minimum cost.
 If we solve and get the solution of the primal problem, we can
read the answer of dual problem from the primal solution.

Primal problem: Dual Problem:

Min C= 3X1+ Max Z= 40Y1+ 50Y2


2.5X2
st: 2X1+ 4X2 ≥40 St: 2y1+ 3y2 ≤3

3X1+ 2X2 ≥50 4y2+ 2y2 ≤2.50

X1, X2≥0 Y1, Y2 ≥0.

115
Solution to primal (minimization)
CJ 3 2.5 0 0 M M
Zj Bv Q X1 X2 S1 S2 A1 A2
2.5 X2 5/2 0 1 -3/8 1/4 3/8 -1/4
3 X1 15 1 0 1/4 -1/2 -1/4 1/2
Zj 51.25 3 2.5 -3/16 -7/8 3/16 7/8
Cj-Zj 0 0 3/16 7/8 M-3/16 M-7/8

Answer: X1= 15 X2= 2.5 cost=


51.25

CJSolution to
40 dual 50
(maximization)
0 0
Zj Bv Q Y1 Y2 S1 S2
50 Y2 7/8 0 1 1/2 -1/4
40 Y1 3/16 1 0 -1/4 3/8
Zj 51.25 3 2.5 15 5/8
Cj-Zj 0 0 -15 -5/2

Answer: Y1= 3/16 Y2= 7/8 profit= 51.25 116


The END!

117

You might also like