Professional Documents
Culture Documents
1
Diagrammatically,
Resource
constraints
Objectives Constraints
Non-negativity
Constraints
Optimization
Maximization Minimization
LP is a method for choosing the best alternative from a set of feasible alternatives.
To apply LP, the following conditions must be satisfied:
a) Objective Function: -Is the goal or objective of a management, stated as an intent
to maximize or to minimize some important quantity such as profits or costs.
b) Constraints: -Are limitations or restrictions imposed by the problems and
constraints include:-
1. Resource constraints: -Are restrictions that should be clearly identifiable and
measurable in quantitative terms, which arise from limitation of available
resources.
Examples of limited resources:
Plant capacity
Raw materials availability
Labor power
Market demand, etc
2. Non-negativity constraints: -Are constraints that require the decision variables
not to take on negative values.
2
c) Linearity
The Objective Function and the constraints must be linear in nature in order to have a
Linear Programming Problems (LPP)
d) Feasible alternative
There should be a series of feasible alternative course of action available to the
decision-making determined by resource constraints. Thus, we have to choose the best
alternative. Linear Programming Problems can be solved by using:
The Geometric method called” Graphical Method”
The Algebraic method called” Simplex Method”
3.2. Formulation of LP
Decision variables are the variables whose values are unknown and are searched. The
coefficients of the variables in the Objective Function are called the profit or
cost coefficients. They express the rate at which the value of the Objective
function increases or decreases by including in the solution one unit of each of
the decision variables.
The coefficients of the constraints’ variables are called the input- output coefficients
that indicate the rate at which the given resources are depleted or utilized.
Example:
3
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
i. Availability of only 40hrs of labor each day in the production department.
ii. A daily availability of only 45 hrs on machine time
iii. 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?
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 +X2< 40
X1 +3X2< 45 LPP Model
X1 < 12
X1, X2 > 0
2. Convert constraints inequalities into equalities
2X1 +X2 = 40
X1 +3X2= 45
X1 = 12
3. Draw the graph by intercepts
2X1 +X2 = 40 ==> (0, 40) and (20, 0)
X1 +3X2= 45==> (0, 15) and (45, 0)
X1 = 12==> (12, 0)
X1, X2 = 0
4
2X1 +X2 =
X2
40
X1=0
40 X1=12
X1 +X2 = 45
15 B
B Minimization Problem
==>Minimize Z with inequalities of constraints in > form
Example: Suppose that a machine shop has two different types of machines; machine
A and machine B, which can be used to make a single product .These machine vary in
the amount of product produced per hr., in the amount of labor used and in the cost of
operation.
Assume that at least a certain amount of product must be produced and that we would
like to utilize at least the regular labor force. How much should we utilize each
machine in order to utilize total costs and still meets the requirement?
Resources used per unit
5
Constraints Machine A Machine B Maximum Available hrs.
(X1) (X2)
Product 20 15 100
produced/hr
Labor/hr 2 3 15
Cost $25 $30
Solution
_____________________________________________________________________
Resource used
Machine A (X1) Machine B(X2) Minimum required
hours
_____________________________________________________________________
LPP Model
Constraint equation:
20X1 +15X2=100 ==> (0, 20/3) and (5, 0)
2X1+3X2=15 ==> (0, 5) and (7.5, 0)
X1 =0
A (0, 20/3)
Feasible Region
X1 X2> 0
B (2.5, 3.33)
X2 =0 6
X1
5 C (7.5, 0)
_____________________________________________________________________
Corners Coordinates MinZ=25 X1 + 30X2
A (0, 20/3) 200
Required:
7
a. Formulate this problem as a LPP
b. Find the optimal solution
Solution
__________________________________________________________________
Products Resource available
Resources A B per week
_____________________________________________________________________
X2
(0, 32)
X1
A (0, 0) D (24, 0) (26, 0) (30, 0)
8
Corners Coordinates MinZ=40 X1 + 35X2
A (0, 0) 0
B (0, 20) 700
C (18, 8) 1000
D (24, 0) 960
X1 =18
X2=8 and
MinZ= 1000
Interpretation:
The company should produce and sale 18 units of product A and 8 units of product B
per week so as to get a maximum profit of 1000.
By this production plan the entire raw material will be consumed.
2X1 +3X2 <60
2(18) +3(8) =60
60=60==> N o idle or unused raw material
4X1 +3X2 <96
4(18) +3(8) <96
96=96 ==>the entire labor hour will be consumed
4X1 +3.5X2 <105
100<105==>There is to be idle or unused capacity of 5hrs in the packaging
department.
Note:
The packaging hour’s constraint does not form part of the boundary making the
feasible region. Thus, this constraint is of no consequence and is therefore, redundant.
The inclusion or exclusion of a redundant constraint does not affect the optimal
solution of the problem.
2. Multiple optimal Solutions /Alternative optimal solutions/: This is a situation
where by a LPP has more than one optimal solution. Multiple optimal Solutions
will be found if two corers give optimal solution, then the line segment joining
these points will be the solution.
==>We have unlimited number of optimal solution with out increasing or decreasing
the objective function.
9
Department Product A Product B per week
_____________________________________________________________________
Cutting 3 6 900
Assembly 1 1 200
Profit per unit $8 $16
_____________________________________________________________________
Assume that the company has a marketing constraint on selling products B and
therefore it can sale a maximum of 125units of this product.
Required:
a. Formulate the LPP of this problem
b. Find the optimal solution
Solution:
Let X1 =The No of units f product A produced per week
X2 =The No of units f product B produced per week
a. The LPP Model of the problem is:
X2 X1=0
(0, 200)
FR X2=0
X1
A (0, 0) (300,0)
10
C (50, 125) 2400
D (100, 100) 2400
E (200, 100) 1600
Interpretation:
Both C and D are optimal solutions. Any point on the line segment CD will also lead
to the same optimal solution.
==>Multiple optimal solutions provide more choices for management to reach their
objectives.
3. Infeasible Solution
A solution is called feasible if it satisfies all the constraints and the constraints and
non-negativity condition. However, it is sometimes possible that the constraints may
be inconsistent so that there is no feasible solution to the problem. Such a situation is
called infeasibility.
Example: MaxZ=20X1+30X2
St:
2X1+X2< 40
4X1+X2< 60
X1 > 30
X1, X2 > 0
Solution:
11
X2 X1=0
(0, 60) X1=30
4X1+X2= 60
(0, 40)
2X1+X2= 40
X2=0
X1
(15, 0) (20, 0) (30, 0)
Note:
-In the above graph, there is no common point in the shaded area.
-All constraints cannot be satisfied simultaneously and there is no feasible solution to
the problem.
4. Mix of constraints
Example: ABC Gasoline Company has two refineries with different production
capacities. Refinery A can produce 4,000gallons per day of SUPER UNLEADD
GASOLINE, 2000 gallons per day of REGULAR UNLEADED GASOLINE and
1000 gallons per day of LEADED GASOLINE. On the other hand, refinery B can
produce 1000 gallons per day of SUPER UNLEADED, 3000 gallons per day of
REGULAR UNLEADED and 4,000 gallons per day of LEADED.
The company has made a contract with an automobile manufacturer to provide 24000
gasolines of SUPER UNLEADED, 42000 gallons of REGULAR UNLEADED and
36000 gallons of LEADED .The automobile manufacturer wants refinery A delivery
in not more than 14 days. The cost of running refinery A is $1500 per day and refinery
B is $2400 per day.
Required:
a. Formulate this problem as a LPP
b. Determine the number of days the gasoline company should operate each refinery in
order to meet the terms of the above contract most economical.(i.e. At a minimum
running cost)
c. Which grade of gasoline would be over produced?
Solution:
12
_____________________________________________________________________
Production per day Contract with an
Grade of (in gallons) automobile manufacturer
gasoline A B
_____________________________________________________________________
The automobile manufacturer wants refinery B delivery in not more than 14 days.
Let X1 =The No of days refinery A should work.
X2 =The No of days refinery B should work.
a. LPP of the problem
MinZ=1500X1+2400X2
St:
4000X1+1000X2>24000
2000X1+3000X2>42000
1000X1+2000X2> 36000
X1 < 14
X2< 14
X1, X2 > 0
==>T o simplify the problem divide by 1000 the constraints
MinZ=1500X1+2400X2
St:
4X1+1X2>24
2X1+3X2>42
X1+4X2 > 36
X1 < 14
X2< 14
13
X1, X2 > 0
FR
D (12, 6)
LG: X1+4X2=36
RUG: 2000X1+3000X2>42000
2000(12) +3000(6)>42000
42000 > 42000
Therefore, there is no over production of RUG
14
LG: 1000X1+4000X2>36000
1000(12) +1000(6)>36000
36000 > 36000
There fore, No over production of LG
15
An inequality of less than or equality type is converted in to equality by adding slack
variable on the left hand side of the equation.
To convert 2X + 5Y ≤ 35, we need to add slack variable on the left hand side of the
equation. Therefore, in standard form the above equation will be;
2X + 5Y +S = 35
3. Surplus variable –A variable subtracted from the left hand side of greater than or
equal to constraint to convert the constraint in standard form. The value of this
variable can usually interpreted as the amount over and above the required
minimum value.
An inequality of the greater than or equal to type is transformed to standard form by
subtracting a surplus variable from the right hand side of the equation. Therefore,
5X + 2Y ≥ 50
Becomes
5X + 2Y –S = 50, in standard form.
4. Basic solutions
A solution obtained by setting n-m variables equal to zero and solving for the
remaining m variables is termed a basic solution. In addition the solution for the
variables must be unique. The n-m variables set equal to zero are non basic variables.
The other m variables whose values are obtained by solving the remaining system of
equations are referred to as basic variables.
5. Basic feasible solution
It is a basic solution for which the m variables solved are all greater than or equal to
zero.
6. Optimal solution
Any basic solution that optimizes the objective functions of general LP problem.
Consider the following general formula of linear programming model
Maximize Z = C1X1+C2X2+……..+ CnXn
Subject to
a11X1+ a12X2+ …..a1nXn ≤ b1
a21X1+ a22X2+ …..a2nXn ≤ b2
. . . .
16
. . . .
am1X1 + am2X2 +………≤ bm
X1, X2,…..Xn ≥ 0
17
b. Set up the initial simplex tableau
The initial simplex tableau looks like the following
Contribution per C1 C2………….. Cn 0 0 0 0
unit
BV CB X1 X2 Xn S1 S2 S3 Sm RHs
S1 0 a11 a12 a1n 1 0 0 0 b1
S2 0 a21 a22 a2n 0 1 0 0 b2
. . . . . . . . .
. . . . . . . .
Sm 0 0 0 0 1 bm
am1 am2 amn
Con/loss Z 0 0 0 0 0 0 0 0
Net cont C-Z C1 c2 Cn 0 0 0 0
18
the table and the column with that largest positive number is the entering
variable
d. Identify the leaving variable – to identify the leaving variable make a ratio of
the RHS and elements in the leaving variable column. Then select the smallest
positive ratio. The row that contains this smallest ratio is the leaving variable.
e. Conduct computation – to conduct computation we need to apply matrix
operation where the element in the pivot cell should be one and all other
elements in that column must be zero. Therefore the rule is searching for a
matrix operation that makes pivot element one and all other elements in the
pivot column zero.
Some important definitions
Pivot row- a leaving variable row or a row with the smallest positive
ration identified on step 5 above.
Pivot column a column with the largest positive ration in the C-Z row.
Or it the column that contains an entering variable
Pivot cell is an intersection of pivot column and pivot row.
f. Check for optimality – to decide whether the solution arrived on is not optimal
or not look for any positive value in the C-Z row of the tableau. If there is any
it shows that the solution can improved further and if not it indicates that the
solution is optimal.
g. If not optimal conduct the above steps starting form step 4 above
19
Summary of simplex procedure
Optimal yes
No stop
?
20
c. In the Cj column, enter the objective function coefficient of zero for each slack
variable.
d. Compute values for row Zj. Cj = Coeff of variable J in the obj function.
e. Computer values for Cj – Zj.
bj = RHSV of constraint i.
Aij – coefficient of variable j in constraint i
Pivot column Pivot element
Solution Cj 60 50 0 0 0 100/4 = 25
Basis X1 X2 S1 S2 S3 RHSV leaving
22/2 = 11
S1 0 4 10 1 0 0 100 39/3 = 13
S2 0 2 1 0 1 0 22
S3 0 3 3 0 0 1 39
Zj 0 0 0 0 0 0
Cj - Zj 60 50 0 0 0
Initial feasible solution
S1 = 100 Obtained by
Entering variable
S2 = 22 equating two
S3 =39 Variables to
X1 = 0 Zero
X2 = 0 Decision
Z = 0 Variable
Incoming Variable
21
Solution Cj 60 50 0 0 0 RHSV
Basis X1 X2 S1 S2 S3
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
Opportunity cost
Cj – Zj 0 0 0 -10 -40/3
4. Compute Cj – Zj row
5. If all Cj – Zj Values are zeros and negatives, you have reached optimality
6. If this is not the case (step 6), repeat 2 to 5 until you get optional solution.
“A simplex solution in a maximization problem in optional if the Cj – Zj row
consists entirely of zeros and negative numbers (i.e. there are no positive values in
the bottom row.)”
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, in row C – Z in every column whose
variable is in solution, indicating that its maximum contribution to the objective
function has been realized.
Example 2
A manufacture of lawn and garden equipment makes two basic types of lawn mowers;
a push type and a self propelled model. The push type requires 9 minutes to assemble
and 2 minutes to package; the self-propelled mover requires 12 minute to assemble
and 6 minutes to package. Each type has an engine. The company has 12hrs of
assembly time available, 75 engines, and 5hrs of packing time profits are Birr 70 for
the self propelled model and br 45 for the push type mower per unit.
Required:
1. a. To determine how many units of each type of mower to produce so as to
maximize profit.
b. Let X1 be push type mower
X2 be self propelled mower
c. Determine the objective function
Z max = 45X1 + 70 X2
d. Identify constraints
9X1 + 12X2 720 minutes ……assembly time
2X1 + 6X2 300 minutes ……..packing time
X1 + X2 75 engine ………….Engines
X1, X2 0
In summary
Z max = 45X1 + 70X2
22
S.t. 9X1 + 12X2 720
2X1 + 6X2 300
X1 +X2 75
X1, X2 0
2. a. Write the Lpm in a standard form
Z max = 45X1 + 70X2 + 0S1 + 0S2 + 0S
S.T. 9X1 + 12X2 + S1 = 720
2X1 + 6X2 + S2 = 300
X1 + X2 + S3 = 75
X1 X2, S1, S2, S3 0
b. Develop the initial tableau
Solution C 45 70 0 0 0 RHSV
Basis X1 X2 S1 S2 S3
S1 0 9 12 1 0 0 720 Qij = Bi/aij
S2 0 2 6 0 1 0 300 720/12 = 60
S3 0 1 1 0 0 1 75
300/6 = 50 – Leaving
Z 0 0 0 0 0 0
75/1 = 75
C-Z 45 70 0 0 0
Entering
Entering
23
C 45 70 0 0 0 Optimal solution
Solution Basis X1 X2 S1 S2 S3 RHSV X1 = 24units
X1 45 1 0 1/5 -2/5 0 24
X2 = 42units
X2 70 0 1 -1/15 3/10 0 42
S1 = 0
S3 0 0 0 -2/15 1/10 1 9
S2 = 0
Z 45 70 13/3 3 0 4020
S3 = 9 engine
C-Z 0 0 -13/3 -3 0
Z = 4020
24