Or Chapter Two Linear Programming
Or Chapter Two Linear Programming
Linear programming
Department
Management
Learning objectives
• Structure of LPM
• Assumptions of LPP
• Formulating LPPs
• LP
• developed by the Russian mathematician L. V. Kantorovich in 1939 and
[email protected]
Meaning of LP
• LP is a mathematical technique for choosing the best alternative
from the set of feasible alternatives.
• Is an optimization technique where the objective function and the constraints
of the problem are all linear.
Optimization
[email protected]
Structure of linear programming problems
• Constraints – limitations
• a less than or equal to constraint : f(X1 , X2 , X3 , … , Xn) < b
• a greater than or equal to constraint : f(X1 , X2 , X3 , … , Xn) > b
• an equal to constraint : f(X1 , X2 , X3 , … , Xn) = b
• Objective
• MAX(or MIN) : f(X1 , X2 , X3, …, Xn)
[email protected]
Structure …
Subject to:
f(X1 , X2 , X3 , … , Xn) < bm
f(X1 , X2 , X3 , … , Xn) = bm
[email protected]
Requirements For Application Of LP
4. The r/ships b/n the objective function and the resource limitation
consideration must be linear in nature.
[email protected]
ASSUMPTIONS UNDERLYING LINEAR PROGRAMMING
[email protected]
Model formulation
• A linear programming model consists of certain common components and
characteristics.
• Components of LPM:
✓Decision variables,
✓Model constraints,
Decision variables are mathematical symbols that represent levels of activity by the
firm.
[email protected]
STEPS IN FORMULATION OF LP PROBLEMS
[email protected]
A maximization model example
[email protected]
Cont’d..
Resource Requirements
Required:
product Labor Clay (lb/unit) Profit/unit formulate
(hr/unit) linear model
Bowl 1 4 40
Mug 2 3 50
There are 40 hours of labor and 120 pounds of clay available each day
for production.
[email protected]
Summary of LP Model Formulation Steps
Step 1.
Define the decision variables
Step 2.
Define the objective function
Maximize profit
[email protected]
Solution
o Decision Variables
[email protected]
Completed model
[email protected]
Activity 1
• DeReal wood co., produces wooden soldiers and trains. Each soldier sells for $27,
uses $10 of raw materials and takes $14 of labor& overhead costs. Each train sells
for $21, uses $9 of raw materials, and takes $10 of overhead costs. Each soldier
needs 2 hours finishing and 1 hour carpentry; each train needs 1 hour finishing and
1 hour carpentry. Raw materials are unlimited, but only 100 hours of finishing and
80 hours of carpentry are available each week. Demand for trains is unlimited; but at
most 40 soldiers can be sold each week.
[email protected]
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 minimize the total cost of fertilizing.
• Formulate a LPM
[email protected]
Summary of LP Model Formulation Steps
Step 1.
Define the decision variables
Step 2.
Define the objective function
Minimize cost
• x1 = bags of Super-gro
• x2 = bags of Crop-quick
where
[email protected]
Activity 2
• DeReal makes luxury cars and jeeps for high-income men and
women. It wishes to advertise with 1 minute spots in comedy
shows and football games. Each comedy spot costs 50birr and is
seen by 7M high-income women and 2M high-income men.
Each football spot costs 100birr and is seen by 2M high-income
women and 12M high-income men. How can DeReal reach 28M
high-income women and 24M high-income men at the least cost.
[email protected]
Solution of Linear Programming Problems
• Simplex method.
[email protected]
LP:
Graphical method
GRAPHICAL METHOD
[email protected]
STEPS IN GRAPHICAL METHOD
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 below the line for the constraint < and shading above the
[email protected]
Contd
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.
[email protected]
Example 1 (problem of Maximizing Z)
[email protected]
solution
Step I. Formulate LP Problem.
The information available can be put into structural matrix form as follow.
Commodities
Requirement Total
P1 P2
Machine I 4 2 60
Machine II 2 4 48
Profit $ per unit 8 6 -
By these coordinates (15,30) we get line BD in graph. Similarly, taking constraint (ii).
2x1 + 4x2 = 48 X1 X2
0 12
24 0 ∴ 2x1= 48 or x1 =24
∴ 4x2 = 48 or x2 = 12
• Now, any point on line BD satisfies (i) constraint and any point on line
AE satisfies (ii) constraint. The constraints cannot be violated, they
must be satisfied. Any solution which satisfies all the know constraints
is called optimal solution. Since both the constraints are of the type <
hence any point on the right hand side (RHS) of BD or AE becomes
infeasible area/solution for which we are not concerned.
[email protected]
Contd
Feasible
Feasible
region
region D
[email protected]
Cont’d…
[email protected]
contd
Step IV. Evaluate the objective function Z= 8x1 + 6x2 for all points of
feasible region i.e. O,A,C,D.
(from graph)
[email protected]
How to solve LPP using LINGO
Ctrl+U
[email protected]
A maximization model (activity 3)
[email protected]
Cont’d…
Resource Requirements
• There are 40 hours of labor and 120 pounds of clay available each day
for production.
[email protected]
LP: Cost Minimization
[email protected]
Problem of Minimizing C
[email protected]
Solution:
x1 =1, x2=2
[email protected]
contd
• 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.
[email protected]
contd
[email protected]
contd
• For feasible area we need to examine all the there 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.
[email protected]
Contd
• 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.
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.
[email protected]
Activity 4
feeding farm animals.
• Animals need:
• 14 units of nutrient A, 12 units of nutrient B, and 18 units of nutrient C.
Two feed grains are available, X and Y.
• A bag of X has 2 units of A, 1 unit of B, and 1 unit of C.
• A bag of Y has 1 unit of A, 1 unit of B, and 3 units of C.
• A bag of X costs $2. A bag of Y costs $4.
• Required: 1. Minimize the cost of meeting the nutrient requirements.
2. Solve the problem graphically
3. Find the optimal solution in the graph
[email protected]
Answer
Min C = 2x1+4x2
Feed Nutrients cost
st: 2x1+x2>= 14 grains A B C
x1+x2>= 12
X 2 1 1 2
x1+3x2>= 18
Y 1 1 3 4
x1+x2>= 0
Total 14 12 18
needs
[email protected]
Change inequalities in to equalities
X1 X2 X 1 X2
0 14 X1 X2
0 12
7 0 12 0 0 6
18 0
[email protected]
Plot the graph Calculate the cost
X2
and identify the
14 A 2X1+X2= 14 optimum corner
12
10
2X1+X2= 14
B
8
6 Feasible region
4 C
2X1+X2= 14
2
D
0 X1
2 4 6 8 7 10 12 14 16 18
[email protected]
Solve this on excel
• Max Z = 10x1+50x2+20x3
• st: 2x1+3x2+x3<=40
• x1+x2+x3<= 30
• x1-2x2>=0
Simplex method
[email protected]
Simplex method of solving LP
• When a large number of variables (more than 2) are involved in a problem,
the solution by graphical method is difficult/ not possible.
• The simplex method provides an efficient technique which can be applied for solving
LPPs of any magnitude, involving two or more decision variables.
• In this method, the objective function is used to control the development and evaluation
of each feasible solution of the problem.
[email protected]
Cont’d…
• The simplex Algorithm is an iterative procedure for finding, in a systematic
manner, 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.
• The technique also has the merit to indicate whether a given solution is optimal or not.
[email protected]
Cont’d…
[email protected]
Basic terms in simplex
[email protected]
Cont’d…
[email protected]
Cont’d…
6. Simplex Table:
A table used for calculations during various iterations of the simplex procedure, is called
Simplex table.
7. Variable Mix:
The values of the column that contains all the variables in the solution.
8. Basis:
The set of variables which are not set to zero and figure in the column of "Product Mix" are
said to be in the 'Basis'.
9. Iteration:
steps of moving from one solution to another to reach optimal solution are called Iterations.
[email protected]
Cont’d…
10. Cj Row:
It is the row containing the coefficients of all the variables (decision variables, slack
or artificial variables) in the objective function.
11. Constraints:
The row containing net profit or loss resulting from introducing one unit of the
variable in that column in the solution.
[email protected]
Cont’d…
• The smallest +ve value of the ratio will be outgoing/leaving variable and replaced
by the entering variable.
[email protected]
Cont’d…
[email protected]
Standard form of simplex method
To apply a simplex technique, LPP must be formulated as follow
Objective Function
• Optimize (Maximise or minimise) Z = C1 x1 + C2 x2 + . . .+ Cn xn
• where Cj (j = 1,2,. . . . . . . . . n) are called profir/cost coefficients.
• Constraints (linear)
St: a11 x1 + a12 x2 + a1n xn = b1
a21 x1 + a22 x2 + a2n xn = b2
aml x1+ am2 x2 + amm xn = bm.
Where bi (i = 1, 2…m) are resources constraints and
constants aij (i = l,2,….m; j = 1,2,…..n ) are called the input output coefficients.
[email protected]
Slack and Artificial variables :
To solve LPP, first inequalities must be converted into equalities
• For constraints with < , slack variables or unused resources (S1, S2. . . Sn ) will be added.
• The slack variables contribute nothing towards the objective function and hence their
coefficients in the objective function are to be zeros.
[email protected]
Cont’d…
• Similarly, for the constraints of the type ≥, the addition of slack variables has to be
in the form of subtraction. Thus, equation of constraints can be written as
• To bring it to the standard form, we add another variable called artificial variable
(Ai), as follows:
• This is done to achieve unit matrix for the constraints. But artificial variables
cannot figure in the solution as there are artificially added variables and have no
significance for the objective function. These variables, therefore, are to be
removed from the solution.
Standardization/Tableau Form/
[email protected]
Steps in Simplex Method
Characteristics: tableau:
▪ All constraints are expressed in the form of equalities or
i. List the variables in the model across the top of the
equations. tableau
▪ All right hand sides are non-negative ii. Next fill-in the parameters of the model in the
[email protected]
Cont’d…
iv. The Cj at the top second column indicates that the values in that column and the
values in the top row are objective function coefficients.
v. The last column at the right is called the quantity column. It refers to the right hand
side values (RHS) of the constraints.
vi. There are two more rows at the bottom of the tableau. The first raw is a Zj-row. For
each column the Zj – value is obtained by multiplying each of the number of the column
by their respective row coefficient in column C. The last row is Cj-Zj row.
[email protected]
Cont’d…
3. Interpreting the initial simplex tableau
• For a maximization problem; the entering variable is 5. Determining the leaving variable:
• the leaving variable is identified as the one with the
identified as the one which has the largest positive value in
Cj-Z row. The column which corresponds to the entering smallest non-negativity ratio for quantity divided
by respective positive pivot columnar entries. The
variable in the simplex tableau is called pivot column.
row of the leaving variable is pivot row.
• In a minimization problem, the entering variable is identified 6. Make the entering variable basic and the leaving
as the one which has the largest negative Cj-Z row value in non-basic by applying elementary row operations of
[email protected]
7. Iteration for improved solution: (d) The same procedure is
(a) Replace outgoing variable with the entering variable and followed for modification to bi
enter relevant coefficients in Zj column. column also.
(b) Compute the, Pivot row with reference to the newly (e) Having obtained the revised
entered variable by dividing the old row quantities by the key
simplex table, evaluate ∆j = Cj -
element.
Zj and test for optimality as per
(c) new values for the other rows. In the revised simplex
step 3 above.
table, all the other rows are recalculated as follows.
Remark: A simplex solution for a maximization problem is optimal if and only if cj – z row contains only zeros and negative value (i.e. if
there are no positive values in the cj – z row).
• The simplex solution for a minimization problem is optimal if Cj-Z row contains only zero
and positive values (Cj-Z ≥ 0).
(a) Obtaining Optimal Solution- If the table indicates optimality level by examining ∆j or
index row, the iteration stops at this point and values of bi's for corresponding variables in
the product mix column will indicate the values of the variables contributing towards the
objective function. The value of the objective function can be then worked out by
substituting these Values for corresponding decision variables.
[email protected]
9. Revise or improve the Solution-For this purpose, we repeat Step 4 to
Step 7 till optimality conditions are fulfilled and solution is obtained.
• Rule for Ties. Whenever two similar values are encountered in index
row or ratio column, we select any column or ratio, but to reduce
computation effort, following can be helpful.
(a) For key column, select the left most tie element.
[email protected]
• The artificial variables in a minimization problem will be expressed
in the objective function with a large positive coefficient so that they
are quickly eliminated as we proceed with the solution.
Note that: if the solution is not optimal the steps will be repeated again
and again until the optimal solution is obtained!
[email protected]
Simplex Algorithm-Maximization Problem
[email protected]
A. Simplex Algorithm-Maximization Problem
[email protected]
Solution
• We convert the inequality into equations by adding slack variables. Above statements can thus be
written as follows.
x1 + x2 + S1 = 200
x2 + S2 = 125
3x1 + 6x2 + S3 = 900 and
x1, x2, S1, S2, S3 > 0.
where S1,S2, S3 are slack variables and objective function is re-written as: Max. Z = 8x1 + 16x2
+ 0S1 + 0S2 + 0S3
Now there are five variables and three equations and hence to obtain the solution, any two
variables will have to be assigned zero value. Moreover, to get a feasible solution, all the constraints
must be satisfied.
• To start with, let us assign x1 = 0; x2 = 0 (Both decision variables are assigned zero values) Hence,
S1 = 200, S2 = 125, S3 = 900 and Z=0
[email protected]
This can be written as initial simplex table 1
Unit Cj 8 16 0 0 0 Ratio
profit
BV Q X1 X2 S1 S2 S3 Q/aij
(Zj)
0 S1 200 1 1 1 0 0 200/1=200
0 S2 125 0 1 0 1 0 125/1=125 LV
EV
Key No.
Where: EV= entering variable (Key column)
LV= leaving variable (key row)
[email protected]
• Entering variable
Since Cj - Zj is maximum at 16, i.e., profit is more for each unit for x2 variable, we
introduce x2 into the solution. It is the marked as key column and x2 becomes the
entering variable. Dividing Quantities (bi's) by the corresponding key elements of
each row, we obtain the ratio (Q/aij) column such as for row S1, it is 200 ÷ 1 = 200,
S2= 125 and S3=150.
• Leaving variable
The leaving variable is, the row which has least ration (Q/aij), here, S2 has 125 ratio
which small compare to other BV, it will be replaced by X2.
[email protected]
• Now each of the elements of the Key row is divided by Key element to
get x2 row in the new table. Thus we get the key row as follows:
Unit profit Q X1 x2 S1 S2 S3
16 125/1 0/1 1/1 0/1 1/1 0/1
125 0 1 0 1 0
[email protected]
Arranging these values into the simplex table, we obtain:
Zj Cj 8 16 0 0 0
variable Q x1 x2 s1 s2 S3
0 S1 75 1 0 1 -1 0
16 X2 125 0 1 0 1 0
0 S3 150 3 0 0 -6 1
Zj 2000 0 16 0 16 0
Cj-Zj 8 0 0 -16 0
0 S3 150 3 0 0 -6 1 150/3=50
Zj 200 0 16 0 16 0
0
Cj-Zj 8 0 0 -16 0
[email protected]
• Now each of the elements of the Key row is divided by Key element to
get x2 row in the new table. Thus we get the key row as follows:
Unit profit Q X1 x2 S1 S2 S3
8 150/3 3/3 0/3 0/3 -6/3 1/3
50 1 0 0 -2 1/3
[email protected]
Arranging these values into the simplex table, we obtain:
Zj Cj 8 16 0 0 0
variable Q x1 x2 s1 s2 S3
0 S1 25 0 0 1 1 -1/3
16 X2 125 0 1 0 1 0
8 X1 50 1 0 0 -2 1/3
Zj 2400 8 16 0 0 8/3
Cj-Zj 0 0 0 0 -8/3
Now, all the values of ∆j being zero or negative, suggesting that the solution
is optimal and Z = 2,400 for x1 = 50 and x2 = 125. S1 indicates surplus.
[email protected]
Activity 5
[email protected]
SOLUTION
6 2 34 0 0 0
BV Q Q/ai
j
0 60 1 2 2 1 0 0 60
0 90 3 1 1 0 1 0 30
0 80 2 1 2 0 0 1 40
0 0 0 0 0 0
6 2 4 0 0 0
[email protected]
SOLUTION
6 2 4 0 0 0
BV Q Q/ai
j
0 30 0 1 0
6 30 1 0 0
0 20 0 0 1
180 6 2 2 0 2 0
0 0 2 0 -2 0
[email protected]
SOLUTION
6 2 4 0 0 0
BV Q Q/ai
j
0 30 0 1 0 30
6 30 1 0 0 90
0 20 0 0 1 15
180 6 2 2 0 2 0
0 0 2 0 -2 0
[email protected]
SOLUTION
6 2 4 0 0 0
BV Q Q/ai
j
0 5 0 0 1
6 25 1 0 0
4 15 0 1 0
210 6 4 0 1
0 -1 0 -1
Optimum
[email protected]
Activity 6
[email protected]
Class work
Maximise Z = 10x1 + 15 x2 + 20 x3
S.T.
10 x1+ 5x2 + 2x3 ≤ 2,700
5x1 + 10x2 + 4x3 ≤ 2,200
1x1 + 1x2 + 2x3 ≤ 500 and
All 1x,x2 andx3 are ≥ 0
[email protected]
B. Simplex Algorithm- Minimization problem
• Some of the important aspects of minimization problem
[email protected]
This can be done by assigning very large penalty (+M) for Big M-Method
a minimisation problem, so that these do not enter the
In this method, we assign the
solution.
coefficients of the artificial
3. If artificial variables cannot be removed from the
variables, as a very large positive
solution, then the solution so obtained is said to be Non-
Feasible. This would indicate that the resources of the
penalty i.e., +M therefore called
system are not sufficient to meet the expected demand. Big M-method.
[email protected]
• The Big M-method for solving LP problem can be adopted as follows:
[email protected]
Step 3: Initial basic feasible solution is obtained Step 4: Determine the key row as in
in the form of the simplex table as above and then case of maximisation problem i.e.,
values of ∆j = Cj - Zj are calculated.
selecting the lowest positive value of
✓If ∆j ≥0, then the optimal solution has been
the ratio Q or bi/aij, obtained by
obtained.
dividing the value of quantity bi by
✓If ∆j< 0, then we select the largest negative
corresponding element of the key
value of ∆j and this column becomes the key
column.
column indicating the entering variable.
[email protected]
• Step 5: Repeat steps 3 and 4 to ensure optimal If at least one artificial variable is
solution with no artificial variable in the solution.
present in the basis with positive
If at least one artificial variable is present in the
basis with zero value and coefficient of M in each value, and coefficient of M in each Cj
Cj - Zj values is negative, the LP problem has no - Zj values is non-negative, then LP
solution. This basic solution will be treated as
problem has no optimal basic
degenerate.
feasible solution. It is called pseudo-
• A tie for the pivot row is broken arbitrarily and
optimum solution.
can lead to degeneracy.
[email protected]
Example
• 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.
[email protected]
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 Contraint) and x1, x2 > 0
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 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
[email protected]
Activity 7
[email protected]
Activity 8
Mixed constraints
[email protected]
Mixed constraints
[email protected]
Initial non-optimal solution is written as follows:
simplex table I
Zj Cj 4 2 0 0 M M Ratio
BV Q x1 x2 s1 s2 A1 A2
M A1 3 3 1 0 0 1 0 1
M A2 6 4 3 -1 0 0 1 6/4
0 S2 3 1 2 0 1 0 0 3
Zj 9M 7M 4M -M 0 M M
Cj-Zj 4-7M 2-4M M 0 0 0
[email protected]
• X1= Q X1 X2 S1 S2 A2
3 3 1 0 0 0
3/3 3/3 1/3 0/3 0/3 0/3
new row= 1 1 1/3 0 0 0
• New row= old row – corresponding coefficient new tableau
in pivot column X row value
[email protected]
Revised simplex table II
Zj Cj 4 2 0 0 M Ratio
BV Q x1 x2 s1 s2 A2
4 X1 1 1 1/3 0 0 0 3
M A2 2 0 5/3 -1 0 1 6/5
0 S2 2 0 5/3 0 1 0 6/5
Zj 4+2M 4 4/3+5/3 -M 0 M
M
Cj-Zj 0 2-5M/3 M 0 0
Select near to
the top
[email protected]
• X2= Q X1 X2 S1 S2
2 0 5/3 -1 0
2/5/3 0/5/3 5/3/5/3 -1/5/3 0/5/3
new row= 6/5 0 1 -3/5 0
• New row= old row – corresponding coefficient new tableau
in pivot column X row value
[email protected]
Optimal solution simplex table III
Zj Cj 4 2 0 0
BV Q x1 x2 s1 s2
4 X1 9/15 1 0 1/5 0
2 X2 6/5 0 1 -3/5 0
0 S2 0 0 0 1 0
Zj 72/15 4 2 -2/5 0
Cj-Zj 0 0 0 0
[email protected]
Example
Min C = 2x1-3x2+6x3
st: 3x1-x2+2x3<= 7
2x2+4x2 >= -12
-4x1+3x2+8x3<=10
xi>= 0
Here all the RHS values must be Min C = 2x1-3x2+6x3
positive, therefore st: 3x1-x2+2x3<= 7
Multiply the second constraint by -1 -2x2-4x2 <= 12
Here even the inequality sign will be -4x1+3x2+8x3<=10
changed
xi>= 0
Irregular types of LPP
• The basic simplex solution of typical maximization and minimization
problems has been shown in this chapter. However, there are several
special types of atypical linear programming problems.
• For irregular problems the general simplex procedure does not always
apply.
These special types include problems with more than one optimal
solution, infeasible problems, problems with unbounded solutions,
problems with ties for the pivot column or ties for the pivot row, and
problems with constraints with negative quantity values.
[email protected]
Multiple optimal solution
40
Profit @ corner B
30
A and C is equal
20
(1200)
10
B
FR
C
10 20 30 40 50
An infeasible solution
[email protected]
Infeasible problem
The three constraints do not overlap to form a feasible solution area.
Because no point satisfies all three constraints simultaneously, there is no
solution to the problem.
X1= 4
8
D X2=6
6
B
4
4X1+2X2=8
2
A
C
2 4 6 8 10
[email protected]
An unbounded problem
[email protected]
An unbounded solution
But unlimited profits are not
possible in the real world;
unbounded solution, like an
infeasible solution,
atypically reflects an error in
defining the problem or in
formulating the model
10
8
FR
never reached
2 4 6 8 10
Sensitivity analysis (post optimality)
reading assignment
[email protected]
Sensitivity analysis
• Carried out after the optimal solution is found
[email protected]
Example: a change in the RHS of a constraints
• Change in RHS or Q of one constraint is considered at a time
• Shadow price: is a marginal value; it indicates the impact that a one unit change
in the value of the constraint would have on the value of the objective function.
[email protected]
• The LPM of the micro computer problem above is:
Max Z: 60x1+50x2
Subject to:
x1, x2≥0
[email protected]
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.
• This tells us that if the amount of assembly time was increased by one hour, there
would be no effect on profit; if the inspection time was increased by one hour, the
effect would be to increase profit by $ 10, and if storage space was increased by
• Thus, the shadow prices in the final simplex tableau will remain the same so long
as the same constraints give the intersection for the optimal solution.
• For what range of changes in the RHS value of those constraints the current
shadow prices remain valid? This is answered by range of feasibility.
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.
Range of feasibility
Step 2. identify the smallest +ve ratio and –ve ratio closest to zero
Step 3. find the upper limit or allowable increase and lower limit
or allowable decrease (range of feasibility)
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
Solution
1. Recall the original value of the resources
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 = -27
4/0= undefined 4/-1= -4 4/2/3= 6
3. Find the range of feasibility
Constrain Original Lower limit Upper limit Range of
ts 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:
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.
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.
• Range of insignificance
S1= below zero
S2= (0-10)
S3= (0-40/3)
Determine the range of feasibility for each of the 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
Solution
1. Recall the original value of the resources
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= -27
4/0= undefined 4/-1= -4 4/2/3= 6
3. Find the range of feasibility
Therefore:
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.
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.
Example 2. A change of coefficient of objective function
• Two cases
1. Range of insignificance
the range over which the non basic variables objective function coefficient can
change without making these variables entering in the solution
2. 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.
Steps for range of optimality
0 1 0 -1 2/3
∞ ∞ ∞ -10 40
2
Example:
• 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 every day. 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 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.
cost of ETB 3 per unit of A and ETB 2.50 per unit of B. The patient has to