Professional Documents
Culture Documents
CH 2 LPPM
CH 2 LPPM
1
Introduction to Linear Programming
A Linear Programming model seeks to maximize or
minimize a linear function, subject to a set of linear
constraints.
LPM is a problem solving approach to decision
making.
A LPM a technique used for economic allocation of
scarce resource for several competing activity that
optimize the benefit of the organization.
Formulation of LPM mean converting the description
& numerical data into mathematical expression which
represent the relevant relationship among decision
2 factor, objective & restriction.
Cot’d
The term linear implies a change in one variable will
always cause a resulting change in another variable, while
the term programming refers to the method of
determining a particular program or plan of action or
Modelling & solving.
linear programming refers to a family of mathematical
techniques for determining the optimum allocation of
resources and obtaining a particular objective when
there are alternative uses of the limited or constrained
resources.
Linear programming models are mathematical
representations of LP problems.
3
Application/Importance of Linear Programming
linear models.
Agriculture-
4
These characteristics can be grouped as components and
assumptions. The components relate to the structure of a model,
where as the assumptions reveal the conditions under which the
model is valid.
COMPONENTS OF LP MODELS
There are four major components of LP models including:
Objective function, decision variables, constraints and parameters.
Objective and Objective Function
The objective in problem solving is the criterion by which all
decisions are evaluated. It provides the focus for problem solving.
Decision variables (set of activities)
They represent unknown quantities to be solved for.
Constraints
However, the ability of a decision maker to select values of the
decision variables in an LP problem is subject to certain restrictions
5
or limits coming from a variety of sources.
Only solutions that satisfy all constraints in a model are
acceptable and are referred to as feasible solutions.
Generally speaking, a constraint has four elements:
A right hand side (RHS)- quantity that specifies the
limit for that constraint. It must be a constant, not a
variable.
An algebraic sign that indicates whether the limit is an
upper bound that cannot be exceeded, a lower bound that
is the lowest acceptable amount, or an equality that must
be met exactly.
The decision variables to which the constraint applies.
The impact that one unit of each decision variable will
have on the right-hand side quantity of the constraint.
6
Constraints can be arranged into three groups:
The parameters are fixed values that specify the impact that
1
1
Type 1 Type 2
Profit per unit 60 50
Assembly time/unit 4hrs 10hrs
Inspection time/unit 2hrs 1hrs
Storage space/ unit 3 cubic feet 3 cubic feet
Resources available
Assembly time 100hrs
Inspection time 22 hrs
Storage space 39 cubic feet
1
2
Required
Formulate the problem as LPM
1
3
Cont’d
Decisions variables:
1
4
Cont’d
Max 60X1 + 50X2 (Weekly profit)
subject to
4X1 + 10X2 100 (Assembly time)
2X1 + X2 22 (Inspection Time)
3X1 + 3X2 39 (storage space)
Xj> = 0, j = 1,2 (Nonnegativity)
1
5
GRAPHICAL LINEAR PROGRAMMING
METHODS
Graphical linear programming is a relatively straightforward for
It is simple
19
Availability of company resources:
Resources Amount available
Assembly time 100 hrs
Inspection time 22 hrs
Storage space 39 cubic feet
The model is then:
Maximize 60X1 + 50X2
Subject to Assembly 4 X 1 +10 X 2 < 100 hrs
Inspection 2 X 1 + 1 X 2 < 22 hrs
Storage 3 X 1 + 3 X 2 < 39 cubic feet
X1, X 2 > 0
20
Step 1:Plot graphically
21
Step 2. Identify the feasible region
23
24
The Extreme Point Approach
Corner or extreme point graphic method states that for
problems that have optimal solutions, a solution will occur at
the corner point in the case of unique solution.
We then substitute the values at each corner point into the
objective function to obtain its value at each corner point and
select the one with the highest value of the objective function
(for a maximum problem) or lowest value (for a minimum
problem) as the optimal solution.
25
The extreme pints are A (0,10), B (4,9), C (9,4) & D
(11,0)
Using this method for our example, simultaneously
solving for corner points a, b, c, and d, we find
corresponding profit values of 500, 700, 740, and 660,
respectively giving us the same solution as the above one
at C. Therefore, the optimal solution is x1= 9 units and x2
= 4 units while the optimal value of objective function is
740.
Interpretation:
For a firm to maximize its profit (740), it should produce
9 units of the Model I microcomputer and 4 units of
26
model II.
Product Mix Example:
ABC private limited company is engaged in the production of
power and traction transformers. Both of these categories of
transformers pass through three basic processes: core
preparation, core to coil assembly, and vapor phase drying. A
power transformer yields a contribution of Birr 50,000 and
traction transformer contributes Birr 10,000. The time
required in the production of these two products in terms of
hours for each of the processes is as follows.
Power transformer Traction Transformer
Core preparation 75 15
Core to Coil Assembly 160 30
Vapor Phase Drying 45 10
If the capacities available are 1000, 1500, and 750 machine
hours in each processes respectively, formulate the problem as
27 LP solve using graphic Approch?
LPP Formulation Example 2
Addis Wood work furniture Company produces tables and
chairs. Each table takes four hours of labor from the carpentry
profit of $50. Formulate LPP and How many chairs and tables
28
should be made?
1.3. Graphical Solution to LP Problems (1)
Graphical Solution to LP Problems (2)
• An equation of the form 4x1 + 5x2 = 1500 defines a straight line in
the x1-x2 plane. An inequality defines an area bounded by a
straight line. Therefore, the region below and including the line
4x1 + 5x2 = 1500 in the Figure represents the region defined by
4x1 + 5x2 1500.
• Same thing applies to other equations as well.
• The shaded area of the figure comprises the area common to all
the regions defined by the constraints and contains all pairs of xI
and x2 that are feasible solutions to the problem.
• This area is known as the feasible region or feasible solution
space. The optimal solution must lie within this region.
• There are various pairs of x1 and x2 that satisfy the constraints
such as:
The corner points are;
A (X1, X2)=(0,0) = 0
B(X1, X2)= (0,210) = 2310
C(X1,X2)= (270, 75) = 4335
D(X1, X2)= (315,0)= 4095
31
Graphical Solution to LP Problems (3)
Trying different solutions, the optimal solution will be:
X1 = 270
X2 = 75
This indicates that maximum income of $4335 is obtained by
producing 270 units of product I and 75 units of product II.
•In this solution, all the raw material and available time are used,
because the optimal point lies on the two constraint lines for these
resources.
•However, 1500- [4(270) + 5(75)], or 45 ft2 of storage space, is not
used. Thus the storage space is not a constraint on the optimal solution;
that is, more products could be produced before the company ran out of
storage space. Thus this constraint is said to be slack.
Minimization problem
Solve the following Example
Min Z=3x1 + 2x2
Subject to
5x1 +X2≥10
X1 + X2 ≥ 6
X1 +4x2 ≥ 12
X1, x2 ≥ 0
Intercepts (0,10) (2,0)
(0,6), (6,0)
(0,3), (12,0)
33
Cont’d
Solution, Extreme points are:
A (12,0) =36
B (4,2) =16
C (1,5) =13 the optimal point that minimize cost
D (0,10) =20
34
Cont’d
Example: Based on analysis of the current inventory level
and potential demand for the coming month, A & G
management has specified that the total production for
product 1 & 2 combined must be 350 gallon. Separately, a
major customer order for 125 gallon of product 1 must also
be satisfied. Product one requires 2 hour of processing time
per gallon while product 2 require 1 hour processing time per
gallon and for the coming month 600 hr of processing time is
available. A&G’s objective is to satisfy the above
requirement at a minimum total production cost. Production
costs are $2 per gallon for product 1 & $ 3 per gallon for
product 2. solve the problem using the graphic approach of
the linear programing problem
35
Solution
X1= number of gallon of product 1 produced
X2=number of gallon of product 2 produced
Objective function
Min Z=2x1 + 3x2
Constraints
X1≥125- product type 1 demand
X1 + X2 ≥ 350- combined production must satisfy
2X1 +X2 ≤600- processing time
X1, X2 ≥
36
Mixed constraints
Min Z=20x1 + 10x2
Subject to
X1 + 2x2≤40
3x1 +x2 ≥30
4x1 +3x2 ≥60
X1,x2 ≥ 0
Intercepts : (0,20) (40,0)
(0,30) (10,0)
(0,20) (15,0)
37
Exercise
Solve the following maximization problem using graphic
approach
300x1+ 400x2
Subject to
5x1 +x2 ≤200
3x1 +5x2 ≤ 150
5x1 +4x2 ≥ 100
8x1 +4x2 ≥80
X1,x2 ≥0
38
Cont’d
Solution, Extreme points
A (15,0) =300
B (40,0) =800
C (4,18)=260
D (6,12) =240
Hence it is minimization the optimal point is D
(6,12)=240 cost
39
The Simplex Algorithm/Algebraic Solution
Method
40
The Simplex Algorithm/Algebraic Solution
Method
The simplex method is an iterative technique that begins
with initial feasible solution.
Through algebraic manipulation, the solution is
improved until no further improvement is possible
Each iteration moves one step closer to the optimal
solution.
In each iteration, one variable that is not in the solution
is added to the solution and one variable that is in the
solution is removed from the solution in order to keep
the number of variables in the basis equal to the
number of constraints.
41
Cont’d
The simplex procedure for a maximization problem with all
constraints consists of the following steps
Step 1. Formulate the LPM
Step 2. Write the LPM in a standard form
Convert all the constraints & objective function in to equalities by
adding slack variables, of the constraints are written as inequalities
We convert the LPM in to a standard form by applying the slack
variables, S, which carries a subscript that denotes which constraint
it applies to.
For example, S1 refers to the amount of slack in the first constraint,
S2 to the amount of slack in the second constraint, and so on.
Slack variables can be in the form of labor hr, money & machine.
42
Step1 cont’d
Taking the microcomputer problem its standard form is as
follows:
Zmax = 60X1 + 50X2 Zmax = 60X1 + 50X2 + 0S1 + S2 + 0S3
: 4X1 + 10X2 100 : 4X1 + 10X2 + S1 = 100
2X1 + X2 22 2X1 + X2 + S2 = 22
3X1 + 3X2 39 3X1 + 3X2 + S3 = 39
X1, X2 0 X1, X2, S1, S2, S3 0
43
Step 3. Develop the initial tableau:
The initial tableau always represents the “Do Nothing” strategy, so
that the decision variables are initially non-basic.
List the variables across the top of the table and write the
objective function coefficient of each variable jut above it.
Write slack variables in the basis solution & decision variables in
non-basis with a value equals to zero.
There should be one row in the body of the table for each
constraint. List the slack variables in the basis column, one per
raw.
In the Cj column, enter the objective function coefficient of zero
for each slack variable. (Cj - coefficient of variable j in the
objective function)
Compute values for row Zj
Computer values for Cj – Zj.
44
Step 3 cont’d
Basic Cj 60 50 0 0 0
variable
X1 X2 S1 S2 S3 RHSV Ratio
S1 0 4 10 1 0 0 100 100
S2 0 2* 1 0 1 0 22 22
S3 0 3 3 0 0 1 39 39
Zj 0 0 0 0 0 0
Cj-Zj 60 50 0 0 0 0
45
Step 2 cont’d
Basic Cj 60 50 0 0 0
variable
X1 X2 S1 S2 S3 RHSV Ratio
S1 0 4 10 1 0 0 100 100/4 = 25
S2 0 2* 1 0 1 0 22 22/2 = 11
S3 0 3 3 0 0 1 39 39/3 = 13
Profit Zj 0 0 0 0 0 0 0
given
up
46
Step 4. Develop subsequent tableaus
Follow the five steps until optimal solution is reached.
i. Identify the entering variable - a variable that has a largest
positive value in the Cj – Zj raw.
ii. Identify the leaving variable - Using the constraint coefficients or
substitution rates in the entering variable column divide each one
into the corresponding quantity value. The smallest non-negative
ratio that results indicate which variable will leave the solution.
iii.Compute the new value for the pivot row; divide the elements by
the pivot element.
iv.Calculate the new value for the remaining row using row
operations.
v. Compute Zj & Cj-Zj to determine whether it is optimal or not.
The table is optimal if the value of all Cj-Zj row zero & negative.
47
Basic Terminologies
Basic feasible solution- zero for real variable &
the slack variables are equals to the RHS
Pivot row
Pivot column
Pivot element
Entering variable
Leaving variable
Basic variable- variables in the solution mix
Non-basic variable-
48
Step 4. Find unique vectors for the new basic
variable using row operations on the pivot element.
Basic Cj 60 50 0 0 0
variable
X1 X2 S1 S2 S3 RHS Ratio
V
S1 0 0 8 1 -2 0 56 56/8 = 7
X1 60 1 1/2 0 1/2 0 11 11/. 5 = 22
49
Optimal tableau
Basic
variable Cj 60 50 0 0 0 Ratio
X1 X2 S1 S2 S3 RHSV
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
Zj 60 50 0 10 40/3 740
Cj-Zj 0 0 0 -10 -40/3
50
Cont’d
Optimal solution:
X1 = 9
X2 = 4
S1 = 24 hrs
Z = Birr 740
“A simplex solution is a maximization problem
is optimal if the Cj – Zj row consists entirely of
zeros and negative numbers (i.e., there are no
positive values in the bottom row).”
51
Cont’d
Note:
The variables in solution all have unit vectors in their
respective columns for the constraint equations.
Further, note that a zero appears in row c - z in every
column whose variable is in solution, indicating that
its maximum contribution to the objective function
has been realized.
52
Minimization problems
Manual solution of minimization problems using simplex
5
4
In standard form
Minimize Z= 7X + 9Y + 0S1 + 0S2+MA1+MA2
Subject to: 3X + 6Y –S1 +A1 = 36
8X + 4Y –S2 + A2 = 64
All variables ≥ 0
5
5
Initial table
BV CBV X Y S1 S2 A1 A2
7 9 0 0 M M
A1 M 3 6 -1 0 1 0 36
A2 M 8 4 0 -1 0 1 64
5
6
2nd table
BV CBV X Y S1 S2 A1 A2
7 9 0 0 M M
A1 M 0 9/2 -1 3/8 1 0 12
X 7 1 1/2 0 -1/8 0 1/8 8
5
7
3rd Table
BV CBV X Y S1 S2
7 9 0 0
be in standard form.
Constraints that are ≤ can be put in to standard form
differently.
5
9
Cont’d
To change equality constraints to standard form add
artificial variables
To covert this inequality to standard form subtract
6
0
Solve using simplex method
Max! 6X + 8Y
Subject to: Y≤4
X+Y=9
6X+ 2Y ≥ 24
X, Y ≥ 0
6
1
In standard form
Max! 6X + 8Y + 0S1 + 0S3 – MA2 – MA3
Subject to: Y+ S1 = 4
X+Y + A2 = 9
6X+ 2Y –S3 + A3 = 24
All variables ≥ 0
6
2
Initial table
BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M
S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24
6
3
Second table
BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M
S1 0 0 1 1 0 0 0 4
A2 -M 0 2/3 0 1/6 1 -1/6 5
X 6 1 1/3 0 -1/6 0 1/6 4
6
4
Third table
BV CBV X Y S1 S3 A2 Quantity
6 8 0 0 -M
Y 0 0 1 1 0 0 4
A2 -M 7/3
X 6 0 0 -2/3 1/6 1 8/3
1 0 -1/3 -1/6 0
6
5
Z 6 8 6 + 2M/3 -M/6 -1 -M 48 -7M/3
Fourth table
BV CBV X Y S1 S3 Quantity
6 8 0 0
Y 8 0 1 1 0 4
S3 0 14
X 6 0 0 -4 1 5
6
6
The Role of Sensitivity Analysis of the
Optimal Solution
6
7
Sensitivity Analysis of
Objective Function Coefficients.
Range of Optimality
The range of optimality for each objective function coefficient
provides the range of values over which the current solution will
remain optimal.
◦ The optimal solution will remain unchanged as long as
optimality
There are no changes in any other input parameters.
6
8
Cont’d
Managerial attention should be focused on those
objective function coefficients that have a narrow
range of optimality and coefficients near the end points
of the range.
With these coefficients, a small change can necessitate
modifying the optimal solution
6
9
Sensitivity analysis helps to test the sensitivity of the optimum
solution with respect to changes of the coefficients in the
objective function, coefficients in the constraints inequalities, /
the constant terms in the constraints. Example;
The actual selling prices (or market values) of the two products
may vary from time to time. Over what ranges can these prices
change without affecting the optimality of the present solution?
Will the present solution remain the optimum solution if the
amount of raw materials, production time, or storage space is
suddenly changed because of shortages, machine failures, or
other events?
The amount of each type of resources needed to produce one
unit of each type of product can be either increased or
decreased slightly. Will such changes affect optimal solution ?
70
Example
Consider:
Max! X1+ 2X2
Subject to: 2X1 + 3X2≤ 12
5X1 + 2X2 ≤ 15
X1, X2 ≥ 0
Solve using simplex method.
7
1
Optimal solution
1 2 0 0
BV CB X1 X2 S1 S2 RHS
V
X2 2 2/3 1 1/3 0 4
S2 0 11/3 0 -2/3 1 7
Z 4/3 2 2/3 0 8
C-Z -1/3 0 -2/3 0
7
2
Cont’d
For all non-basic variables range of insignificance will
be given by -∞≤ Cj ≤ Z.
The non-basic variable will remain non-basic so long
as Cj ≤ Zj.
Hence, the range of insignicance for X1 is
-∞≤ Cj ≤ 4/3
7
3
For basic variable
For variables which are in the solution, the
determination of range of optimality requires different
approach.
The value in C-Z row must be divided by the
corresponding row values of the variable in question.
The smallest positive ratio will indicate the allowable
increase and the smallest negative ratio (absolute value)
indicates the allowable decrease.
If there is no positive ratio there is no upper limit in
variables objective function coefficient
7
4
Cont’d
Therefore ratios calculated for the row are:
7
5
Cont’d
As you can see, the smallest negative ration (in terms
of absolute value) is -1/2 and there is no positive ratio.
Hence, the coefficient of X2 can be reduced by 0.5 and
increased indefinitely without making it non basic.
7
6
Cont’d
Therefore, the range of optimality for X2 is:
(2-0.5) ≤ C2 ≤∞ = 1.5 ≤ C2 ≤ ∞
7
7
Sensitivity Analysis of
Right-Hand Side Values
a change in the right-hand side for a constraint may
affect the feasible region and perhaps cause a change in
the optimal solution to the problem
In sensitivity analysis of right-hand sides of constraints
we are interested in the following questions:
◦ Keeping all other factors the same, how much would the
optimal value of the objective function (for example, the profit)
change if the right-hand side of a constraint changed by one
unit?
◦ For how many additional or fewer units will this per unit
change be valid?
7
8
Shadow price
Shadow prices are values in the Z row of the final
(optimal) simplex table.
It is a marginal value.
It shows the impact that a one unit change in the
amount of constraint would have on the value of the
objective function
7
9
60 50 0 0 0 RHS
Basis c X1 X2 S1 S2 S3
S1 0 0 0 1 6 -5.3333 24
X1 60 1 0 0 1 -0.3333 9
X2 50 0 1 0 -1 002/3 4
z 60 50 0 10 40/3 740
C-Z 0 0 0 -10 -13.333
Shadow prices
Negative of Shadow
8 prices
0
From the above table one can clearly see that:
If resource one is increased by one unit, there would be
no effect on the profit.
If the second resource is increased by one unit, profit
will increase by ten birr and
If the third resource is increased by one unit, profit will
increase by 40/3 birr.
shadow prices do not tell us by how much the level of
scarce resources can be increased and still have the
same impact per unit
8
1
resources with positive shadow prices as scarce goods
(binding constraints) and resources with zero shadow
prices as free goods (surplus resource).
At some point, the ability to use additional resources
will disappear because of the fixed amounts of the other
constraints.
We need to determine the range over which we can
change the right hand side quantities and still have the
same shadow prices.
This is called range of feasibility/ right hand range
8
2
Sensitivity Analysis of
Right-Hand Side Values
Any change to the right hand side of a binding
constraint will change the optimal solution.
8
3
Cont’d
To find range of feasibility for the right hand side,
divide the entries in the quantity column by associated
slack column values.
The smallest positive ratio indicates the allowable
decrease and negative ratio closest to zero indicates
allowable increase
8
4
Cont’d
For the previous example:
For the first variable Allowable decrease
4/ (1/3) = 12
7/ (-2/3) = -21/2
There are only two ratios one positive and Allowable
the other Increase
negative.
Hence, the first resource can be reduced by 12 and
increased by 21/2.
8
5
Cont’d
Hence, range of feasibility for resource one is:
0 ≤ b1≤ 45/2
Construct the range of feasibility for resource two.
8
6
For second constraint
4/0=undefined
7/1=7
Hence, 15-7≤b2≤∞
8 ≤b2≤∞ Allowable decrease
8
7
End of the slide
Thank you for your attention
8
8