General LPP
General LPP
(LP):
A RESOURCE ALLOCATION MODEL
9/18/2024
Introduction
Organizations have various objectives to achieve using certain
available resources which are usually limited in supply, e.g.
i. A manufacturing firm aims to produce quality products and
make a profit. Resources it has would include material, labor,
machine time, employees etc.
ii. A private college aims at producing, among others, educated
persons at a profit. Resources include teaching staff, classroom
spaces, seats, administrative staff etc.
iii. A hospital has the main objective of maintaining and restoring
health at an affordable cost to the patients. Resources would
include doctors, nurses, support staff, machines, bed spaces,
labs etc.
9/18/2024
Introduction
LP is a quantitative technique which
helps organizations in solving resource
allocation decisions which assumes that
the mathematical relationships are
linear (hence linear programming),
among other assumptions and
requirements.
9/18/2024
Mathematical Programming Areas
Linear programming
Non-linear programming
Goal programming
Parametric programming
Stochastic programming
Dynamic programming
9/18/2024
Programming
9/18/2024
1. Certainty:
We assume that the decision variables (DVs), the parameters and the
constraints are known with certainty in advance and they do not change.
Decision Variables: are the unknowns in problem solving situations e.g.
for a furniture manufacturer, these could be the optimal number of
tables, chairs, desks, and so on.
Parameters: are the figures in the problem e.g. prices, costs, inputs
(labor, machine time), resource availability etc.
Constraints: are conditions imposed on the problem e.g. resource
availability (material, labor or machine time, demand, the budget),
contractual obligations and so on.
If any one of these factors is not certain, then use stochastic
(probabilistic) programming or perform sensitivity analysis (“what if”
analysis).
9/18/2024
2. Static Time Period
An LP solution is assumed to apply to all same
or such time periods in future as it was
formulated e.g. “production per day”. “Day”
is the static time period. To specifically
recognize possible differences in
requirements for different time periods, we
apply dynamic programming.
9/18/2024
3. Proportionality
We assume that activities in an LP problem are
proportional to the level of the decision variables
e.g.
If1 unit of X requires 7 hours, then 40 units of X
requires 40*7 = 280 hours
If1 unit of Y sells at sh. 5, then revenue of 100 units of
Y will be 5*100 = sh. 500
Proportionality is absolutely necessary for linearity
to hold.
9/18/2024
4. Additivity
We assume that the activities in an LP problem are
additive in the sense that the sum of the whole system
equals the sum of individual parts. This is an extension of
proportionality when we have two or more decision
variables e.g. if 1 unit of X requires 7 hours and 1 unit of
Y requires 10 hours, then 20 units of X and 10 units of Y
will require a total of 20 x 7 + 10 x 10 = 240 hours.
In other words, there is no interaction among the
decision variables, e.g. they are neither substitutes nor
complements, nor are there by-products or joint
products.
9/18/2024
5. Divisibility
9/18/2024
6. Non-Negativity
No decision variable can be negative e.g. no
production of negative number of tables nor chairs.
9/18/2024
STEPS IN FORMULATION AND SOLUTION
OF AN LP PROBLEM
1. Define the problem you require to solve.
2. Establish whether the problem is one of resource
allocation.
3. If the problem is one of the resource allocation, determine
if LP is the most suitable solution technique.
4. If the LP is the most suitable solution technique, establish
whether the problem is of maximization or minimization
type.
5. Define the decision variables.
9/18/2024
STEPS IN FORMULATION AND SOLUTION
OF AN LP PROBLEM
6. Determine the objective function.
7. Determine and list all the constraints or bottlenecks.
8. Collect the relevant data- this is field work.
9. Formulate the problem and solve it using any
technique.
10.Perform sensitivity analysis and make
recommendations.
11.Implement the solution.
9/18/2024
General structure of an LP problem
O.F: Max/Min Z = c1 X1 + c2 X2 + ……… cn Xn
St (1) a11 X1 + a12 X2 + ……. + a1n Xn (≤, =, ≥) b1
(2) a21 X1 + a22 X2 + ……… + a2n Xn (≤, =, ≥) b2
ꞌ ꞌ
ꞌ ꞌ
ꞌ ꞌ
(m) a21 X1 + am2 X2 + ………. + amn Xn (≤, =, ≥) bm
All xij ≥ 0 …………... Non- negativity
9/18/2024
Explanations
cj = the coefficient of the decision variable xj in the
objective function. E.g. price, cost, contribution etc. per
unit.
Xj = decision variable j
aij = left hand side coefficient e.g. unit inputs of material,
machine time etc.
bis = right hand side values e.g. resource availability,
demand for a product, contractual obligation etc.
Z = value of the objective function e.g. minimum cost,
maximum contribution. Conventionally, we use Z for
maximization and C for minimization.
9/18/2024
Max Question (Maridadi Furnitures)
Maridadi Furniture Ltd is planning to make tables and chairs. They both
require material and labor time. To manufacture a table and a chair
requires 3 units and 4 units of direct material respectively, of which they
are 96 units available in a week. Making a table or a chair each takes 6
hours and there are 168 labor hours available in a week. Whereas the
market for tables in unlimited, only 18 chairs can be sold weekly. The
price per table and chairs are £50 and £60 respectively whereas their unit
variable costs are £38 and £40 respectively. Fixed costs average £200 per
week.
Required:
Advise Maridadi Ltd on the weekly production schedule in order to
maximize contribution to profit.
9/18/2024
LPP Formulation: Maridadi Furnitures
Decision Variables
Let X1 = No. of tables produced and sold in a week
X2 = No. of chairs produced and sold in a week
Objective Function
Maximizing profit
If Cm1 is contribution margin of X1 and
Cm2 is contribution margin of X2, then
∏ = cm1X1 + cm2X2 – f where f = fixed cost
Maximizing contribution ensures that ∏ is maximized since fixed cost will not
influence the optimal values of the decision variables. Indeed, when solving LP
problems, we ignore fixed cost. It is only considered when calculating profit (∏).
9/18/2024
Parameters and Constraints
D i r e c t D i r e c t P r i c e ( P ) V a r i a b l e Contributio
m a t e r i a l s l a b o r (units) c o s t ( V ) n margin (P-
(units) (units) (unit) V) (units)
Tables X1 3 6 50 38 12
Chairs X2 4 6 60 40 20
Availability 96 168 - - -
9/18/2024
LP Formulation
9/18/2024
Linear Programming Problem (LPP)-
Solution Techniques
I. Graphical method – suitable for two DVs
II. Simplex method – suitable for any number
of DVs. There are 2 simplex approaches:
Manual
Computer
9/18/2024
Graphical Method: Steps
1. Derive the feasible region i.e. the region that
satisfies all the constraints simultaneously.
2. Within the feasible region, determine the optimal
point(s) using either the corner point (vertex)
method or Trial O.F method
Step I: Feasible region (Maridadi Furnitures)
Class Activity
9/18/2024
Computations
Constraint 1 – Constraint 2 - Constraint 3 – Constraint 4 –
Materials Labour Hours Chair Demand Non negativity
3X1 + 4X2 ≤ 96 6X1 + 6X2 ≤ 168
When X2 = 0 ; X1 = ? When X2 = 0 ; X1 = ?
3X1 + 4(0)=96 6X1 + 6(0)=168
3X1=96 6X1=168
X1=96/3 = 32 X1=168/6 = 28
When X2 = 0 ; X1 = 32 When X2 = 0 ; X1 = 28 X2 ≤ 18 X1 , X2 ≥ 0
When X1 = 0 ; X2 = ? When X1 = 0 ; X2 = ?
3(0) + 4X2=96 6(0) + 6X2=168
4X2=96 6X2=168
X2=96/4 = 24 X2=168/6 = 28
When X1 = 0 ; X2 = 24 When X1 = 0 ; X2 = 28
9/18/2024
GRAPHICAL METHOD Constraint 1- Materials
X2
When X2 = 0 ; X1 = 32
When X1 = 0 ; X2 = 24
30
Constraint 2 – Labour Hours
When X2 = 0 ; X1 = 28
Constraint 2 When X1 = 0 ; X2 = 28
10
Feasible Region
Constraint 1
A0
9/18/2024
X1
10 20 E 30 40
Step II- Optimal solution
Extreme Point Theorem
If a solution exists to an LPP, the optimal point(s)
will be at extreme corner point(s) or
vertex/vertices. This gives rise to one of two
methods; Corner Point Method and Trial Objective
Function Method.
Corner Point Method
Class Activity
9/18/2024
X2 CORNER POINT METHOD Fill the table
X1 X2 Z = 12X1 + 20X2
30 A
20 C
C
B
D
D
10
E
A 9/18/2024
X1
0 10 20 E 30 40
WORKINGS
At D
D X1 = 16 ; X2 = 12 Profit = 12(16) + 20(12) = 432 3X1 + 4X2 = 96……(i) 6X2 = 72
9/18/2024
Trial Objective Function Method
To construct an isoprofit line within the feasible region, select a point in the
region arbitrarily. Do not select one which is too close to the origin. It is also
convenient to select a point on an axis.
Let X1 = 15 and X2 = 0 be the point selected
Z = 12(15) + 20(0)
= £180
For the line, 12X1 + 20X2 = 180, it’s a line with different combinations of X1
and X2 but the ∏ is the same i.e. Iso at £180 thus it’s an Isoprofit line.
When X1 = 0, X2 = 180/20 = 9
Class Activity
9/18/2024
Trial Objective Function Method
Shifting the Isoprofit line as far as possible from the origin, as
possible but parallel to itself, point c is the optimal point since it
is the furthest optimal point.
Notes:
Ø As the isoprofit line is shifted away from the origin, values of
X1 and X2 are increasing and hence Z is also increasing. This is
done until we cannot improve Z any further without violating
the other by entering into the feasible region. This (last point)
becomes the optimal point.
Ø If isoprofit line is constructed in the infeasible region, we shift
as close to the origin as possible parallel to itself. The first
feasible point(s) from that direction will be optimal.
Activity: Draw Graph
9/18/2024
X2 TRIAL OBJECTIVE FUNCTION METHOD
30
OPTIMAL SOLUTION
20
C
B
10
A0
9/18/2024
40 X1
10 20 E 30
Graphical Solution: Minimization
Problem
The steps followed are the same as for Max except when isocost method is used.
If the isocost constructed in the feasible region, we shift it as close to the origin
as possible parallel to itself. The last feasible point(s) this line will touch will be
optimal i.e. it will have minimized cost.
9/18/2024
Graphical Solution: Minimization
Problem: Exercise
Ujuzi Ltd wants to mix up at least 500 kgs of a special
baby food. There are 2 ingredients in the mixture P1
and P2. P1 the 1st source of protein costs £5 a kg while
P2 the 2nd source costs £8 a kg. chemical constraints
dictate that the mixture contain not more than 400
kgs of P1 and at least 200 kgs of P2.
Required:
Determine the amount of P1 and P2 in the mixture
which will minimize total cost of the product.
9/18/2024
Special Cases of LP
1.Infeasibility
2.Unboundedness
3.Redundancy
4.Multiple (Infinite) Optimal Solutions
9/18/2024
1. Infeasibility
This means that there is no solution or set of decision variables which satisfy the
constraint simultaneously.
Example:
Consider Maridadi Furnitures, suppose there is an additional constraint of a
contractual obligation to supply a minimum of 30 chairs every week and everything
else remains the same. Derive the feasible region.
O. F Max Z = 12x1 + 20x2
St 1) 3x1 + 4x2 ≤ 96 …………...material
2) 6x1 + 6x2 ≤ 168 …………. labor hours
3) x2 ≤ 18 ……………………chair demand
4) x2 ≥ 30 ……………………contractual obligation
5) x1, x2 ≥ 0 …………………. non negativity
Activity: Draw Graph 9/18/2024
INFEASIBILITY Constraint 1- Materials
X2
When X2 = 0 ; X1 = 32
Region Satisfying 4th Constraint(Already Shaded)
When X1 = 0 ; X2 = 24
30
Constraint 2 – Labour Hours
When X2 = 0 ; X1 = 28
When X1 = 0 ; X2 = 28
10
Constraint 5 – Non Negativity
X1 , X2 ≥ 0
A0
9/18/2024
X1
10 20 E 30 40
1. Infeasibility
Observation;
With the additional constraint, all regions are shaded, meaning that
there is not a single point which satisfies all the constraints.
Causes of Infeasibility
Resource availability- this may not be enough to meet the obligations e.g.
consider materials.
Suppose we produce chairs, X2 = 30 and tables, X1 = 0. Total material
required will be,
= 3(0) + 4(30)
= 120 > 96
96 units of materials are not enough.
9/18/2024
2. Unboundedness
An LPP is said to be unbounded if the O.F. value can be
improved without limit.
For max = can increase infinitely
For min = can decrease to zero
Example
Suppose for Maridadi Co, the only constraints are contractual
obligations i.e. there are no demand, labor nor material
constraints. A min of 20 tables and 30 chairs are required per
week. Determine the optimal solution using isoprofit method.
Activity: Draw Graph
9/18/2024
X2 UNBOUNDEDNESS
Feasible Region
30
20
Constraint 2 – Chairs Demand
X2 ≥ 30
0 9/18/2024
X1
10 20 30 40
2. Unboundedness
Results
The isoprofit line can be shifted infinitely i.e. the solution is
unbounded. This is not practical. Practically, max problems
are bounded from above while min problems are bounded
from below. This means that max problems have at least one
(≤) constraint e.g. Maridadi Ltd. Min problems have at least
one (≥) constraint e.g. Ujuzi Co.
Activity: Draw Graph
If an LPP is unbounded, it means that it has not been
properly formulated.
9/18/2024
3. Redundancy
This concept is applied with regards to a constraint.
A constraint which does not affect the size (in terms
of area) of the feasible region is said to be
redundant.
Example
Suppose that the marketing manager of Maridadi
Ltd believes that the market for tables is not more
than 35 units, in addition to the other constraints,
obtain the feasible region.
Activity: Draw Graph
9/18/2024
REDUNDANCY Constraint 1- Materials
X2
When X2 = 0 ; X1 = 32
When X1 = 0 ; X2 = 24
30
Constraint 2 – Labour Hours
When X2 = 0 ; X1 = 28
When X1 = 0 ; X2 = 28
10 REDUNDANT
Constraint 5 – Non Negativity
Feasible Region CONSTRAINT
X1 , X2 ≥ 0
X1 ≤ 35
A0
9/18/2024
X1
10 20 E 30 40
3. Redundancy
Remark
This additional constraint is redundant since it appears in an
area which is already infeasible and can be removed without
affecting the feasible region size.
Note:
A redundant constraint is not necessarily a non-binding
constraint. A binding constraint is one which actually
determines the optimal solution; thus, it is represented by a
constraint which goes through the optimal point.
9/18/2024
Quiz: Determine which is binding and
redundant constrain in the following table
9/18/2024
X2 MULTIPLE OPTIMAL SOLUTIONS - CORNER POINT METHOD Fill the table
X1 X2 Z = 15X1 + 20X2
30
A 0 0 15(0)+20(0)=0
B 0 18 15(0)+20(18)=360
D
D 16 12 15(16)+20(12)=480
10
E 28 0 15(28)+20(0)=420
A 9/18/2024
X1
0 10 20 E 30 40
4. Multiple (Infinite) Optimal Solutions
Observation
Both point C and D are equally optimal. Actually,
any point along line segment C D is equally optimal.
Since they are an infinite number of points along a
line segment, the number of optimal solutions is
infinite. This is because the isoprofit/isocost line
has the same slope as (parallel to) a binding
constraint, in this case constraint 1.
Activity: Proof of Equality of Slopes
9/18/2024
PROOF THAT CONTRAINT 1 & O.F HAVE SAME SLOPE
9/18/2024
SHADOW PRICES
A shadow price is the max amount a firm is willing to pay to acquire an additional unit of a
given resource
9/18/2024
Graphical Sensitivity Analysis
This will be carried out for RHS ranging and O.F.
coefficient ranging. In either case, a single change
is considered, everything else remain constant.
9/18/2024
Sensitivity Analysis of O.F Coefficients
(range of optimality)
For range of optimality, the question is; within what range can
an O.F coefficient change before the current optimal solution
(optimal combination of DVs and O.F value) change? It is also
known as the range of optimality. Basically, a change in an O.F
coefficient will also change the slope of isoprofit/isocost line.
If this change goes beyond certain limits, the optimal solution
will change. Just before this occurs, the isoprofit/isocost line
will be parallel to a binding constraint i.e. they will have the
same slope.
Activity: Range of Optimality
9/18/2024
X2
30
OPTIMAL SOLUTION
20
C
B
10
A0
9/18/2024
40 X1
10 20 E 30
Change in O.F coefficients
Objective Function for X1 (Tables); Current value = 12
Let C1 be the new value, Isoprofit line is
C1X1+20X2=Z
20X2=Z-C1X1
Parallel to Constraint 1
X2= Z - C1
X1 3X1+4X2=96
20 20
∂ X2 -C1 X2= 96 - 3
Slope = = X1
∂ X1 20 4 4
∂ X2 -3
Slope = =
Parallel to Constraint 3 ∂ X1 4
Slope of Constraint 3 = 0 -C1 -3
-C1 =
=0 20 4
20
C2= ∞
…………..UPPER LIMIT C2= 16…………..LOWER LIMIT
NB: BOTH CONSTRAINTS 1 AND 3 ARE USED (EQUATED) BECAUSE THEY ARE BINDING
Changes in RHS of constraints (RHS
ranging)
For RHS ranging, the question is; within what range
can a given RHS parameter (e.g. a resource) change
before the current shadow price changes? It is also
called the range of feasibility. For a given RHS
p a r a m e t e r, t h e s h a d o w p r i c e w i l l c h a n g e
immediately after the optimal solution point
coincides with another corner point.
10 6X1 =168-108
X1 =60/6 = 10
Material at G = 3(10)+4(18)=102…….(Upper Limit)
Material
A 9/18/2024
0 10 20 E 30 F X1
X2
20
Chair DD
Upper limit = ∞
G
B C
Slack: Any excess resources eg. For material = 0
D and labour hrs = 12
10 Surplus: an excess of a variable above the
minimum used in (≥) constraints
Example: If X4≥17 and actual value of X4=21 then
Material surplus = 21-17=4
9/18/2024
Range of Optimality
The 100% rule for range of optimality states that
simultaneous changes in O.F coefficients will not
change the optimal solution as long as the sum of
the percentages of the change divided by
corresponding maximum allowable change in the
range of optimality for each of coefficient does not
exceed 100%.
9/18/2024
Range of Feasibility
The 100% rule for range of feasibility states that simultaneous
changes in the RHS parameters will not change the shadow
prices as long as the sum of the percentages of the changes
divided by the corresponding maximum allowable change in the
range of feasibility for each RHS does not exceed 100%.
Note:
For the 100% rule, a reduction does not negate or cancel out an
increase; hence the percentages are added irrespective of the
direction of change.
9/18/2024
Q1. Suppose C1, decrease by sh.4 and C2 increases by sh.40, will the current optimal solution
change?
% ∆ in C1 =4/12 =33%
% ∆ in C2 =40/ ∞ =0%
Total % ∆ = 33%<100%
Q2. Suppose material increases by 4 units, labour hours decreases 8hrs while chair demand
increases by 5units. Will the SP of resources change?
% ∆ in material =4/6 =67%
Total % ∆ = 217%>100%
9/18/2024
Question on range of feasibility
Investigate whether the shadow prices of the
resources will change for the following
simultaneous changes
i. Increase in material by 2 units
ii. Increase in labor hour by 10 units
iii.Decrease in chair demand by 5 units
9/18/2024
COMPUTER OUTPUT
COMPUTER OUTPUT
Reading Assignment
9/18/2024
END
I Hope We Are Now Wiser on
Resource Allocation Decisions
9/18/2024