Linear Programming Problem Overview
Linear Programming Problem Overview
3
General Mathematical Expression of Optimization ?
4
Types of Optimization Problems
➢ Integer Programming
✓ LPP but the decision variables required to be integers
➢ Transportation Problem
5
Linear Programming Problem - Definition
6
Linear Programming Problem – Application Areas
• Examples of application areas of LPP:
• A product mix problem
Example: Furniture companies
• A blending problem
Example: Food industries
• A transportation problem
Example: Cement factory
Assignment 1. Give LPP example for each of the above application areas.
7
Linear Programming Problem - Requirements
8
Linear Programming Problem - Expression
• L.P.P can be generally described mathematically as:
Where, Cj’s, bj’s and aij’s are constants and xj’s are variables.
n
In short: Optimize(max . or min . ) z = c j x j
j =1
subject to
n
x j 0, j = 1, 2, ..., n
Example:
10
Linear Programming Problem - Formulation
12
Linear Programming Problem - Formulation
Example 1:
A metal manufacturing firm engaged in producing two models of block making
machine (model A and B) performs three operations painting, assembly and
testing. The relevant data are as follows:
Total number of hours available are: Assembly 600; painting 100, and testing
30. Formulate this as a LPP to maximize the profit.
13
Linear Programming Problem - Formulation
Solution:
Decision Variables:
Let x1 be the number of Model A produced and x2 be the number of Model
B produced.
Constraints:
Working hours for assembly : x1+ 1.5x2 600
Working hours for Painting: 0.2x1+ 0.2x2 100
Working hours for testing : 0.1x2 30
S G
A market survey indicates that during the month of February, there will be a
demand for 24000 bottles of 7-up, 16000 bottles of Pepsi and 48000 bottles of
Mirinda. The operating costs per day of running S and G respectively are 60000
birr and 40000 birr, how many days should the company run each plant in
February so that the production cost is minimized?
15
Linear Programming Problem - Formulation
Solution:
The LPP
Min. Z = 60000x1+40000x2
subject to
3x1+ x2 24
x1+ x2 16
x1+ 3x2 24
and x1, x2 0
16
Linear Programming Problem - Formulation
Example 3:
A real estate company constructs two models
of residential houses (Model A and Model B).
Each Model A house requires twice as much
labor time as Model B. If all houses are model
B only, the company can construct a total of
500 houses a year. The market limits yearly
sales of Model A houses and Model B houses to
150 and 250, respectively. The profits on
Model A and B houses are 80,000birr and
50,000birr, respectively. Formulate the
problem as a LPP.
17
Linear Programming Problem - Formulation
Solution:
• Let x1 be number of Model A and x2 be number of model B houses
constructed by the company.
• The problem is a maximization problem. Therefore, the objective function
is:
Z = 80,000x1+50,000x2
The following four cargoes are available for shipment on the next flight:
Any proportion of these cargos can be accepted. The objective is to determine how
much (if any) of each cargo C1, C2, C3 and C4 should be accepted and how to
distribute each among the compartments so that the total profit for the flight is
maximized.
19
Linear Programming Problem - Formulation
12 10
Solution:
Variables:
• Let xij be tonnes of cargo i (i=1,2,3,4 for C1, C2, C3 and C4 respectively)
that is put into compartment j (j=1 for Front, j=2 for Centre and j=3 for
Rear) where xij >=0, i=1,2,3,4; j=1,2,3
• Note here that we are explicitly told we can split the cargoes into any
proportions (fractions) that we like.
Constraints:
• cannot pack more of each of the four cargos than we have available
x11 + x12 + x13 ≤ 18
x21 + x22 + x23 ≤ 15
x31 + x32 + x33 ≤ 23
x41 + x42 + x43 ≤ 12
20
Linear Programming Problem - Formulation
Solution:
Constraints:
• the weight capacity of each compartment must be respected
x11 + x21 + x31 + x41 ≤ 10
x12 + x22 + x32 + x42 ≤ 16
x13 + x23 + x33 + x43 ≤ 8
Objective:
• The objective is to maximize total profit, i.e.
Max. Z= 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43]
21
Linear Programming Problem - Formulation
Solution:
Therefore,
Max. Z= 310[x11+ x12+x13] + 380[x21+ x22+x23] + 350[x31+ x32+x33] + 285[x41+ x42+x43]
Subject to
x11 + x21 + x31 + x41 ≤ 10
x12 + x22 + x32 + x42 ≤ 16
x13 + x23 + x33 + x43 ≤ 8
x11 + x12 + x13 ≤ 18
x21 + x22 + x23 ≤ 15
x31 + x32 + x33 ≤ 23
x41 + x42 + x43 ≤ 12
480x11 + 650x21 + 580x31 + 390x41 ≤ 6800
480x12 + 650x22 + 580x32 + 390x42 ≤ 8700
480x13 + 650x23 + 580x33 + 390x43 ≤ 5300
and
x11, x21, x31 , x41 , x12 , x22 , x32 , x42 , x13 , x23 , x33 , x43 ≥ 0
22
Home Take Assignment 1
Exercise 1:
• A construction site requires a minimum of 12,000 cubic meters of
sand and gravel mixture. The mixture must contain no less than
5,000 cubic meters of sand and no more than 6,000 cubic meters
of gravel. Materials may be obtained from two sites: 35% of sand
and 65% gravel from site 1 at a delivery cost of $5.00 per cubic
meter and 70% sand and 30% gravel from site 2 at a delivery cost
of $7.00 per cubic meter. Formulate the problem as a LP model
23
Home Take Assignment 1
Exercise 2:
Medroc Cement Company plans on building a maximum of 11 new
stores in Addis Ababa and Nazareth. The company will build these
stores in one of three sizes: a small store, a medium store, and a
large store. The small-sized store requires birr 41.25 million to
build and 30 employees to operate. The medium-sized store
requires birr 82.5 million to build and 15 employees to operate.
The large-sized store requires birr 123.75 million to build and 45
employees to operate. The corporation can dedicate birr 825
million in construction capital, and 300 employees to staff the
stores. On average, the small store nets birr 12 million annually,
the medium store nets birr 20 million annually, and the large
store nets birr 26 million annually. Formulate the LPP.
24
Graphical Solution of L.P.P
25
Graphical Solution of L.P.P
A region or set of points is said to be convex if the line joining any two
points lies completely within the region.
26
Graphical Solution of L.P.P
A 3 5
B 1 2
27
Graphical Solution of L.P.P
Solution:
Step 1. Formulate the problem.
• Let x1 and X2 be the number of model A & B houses to be constructed,
respectively.
• Constraints: Money and land area
– Money: 30,000x1+10,000x230,000,000
– Land: x1+x2 2000
• The complete LPP formulation is:
Maximize Z =2x1+x2 (Remember: Z= 20000x1+10000x2)
Subject to
3x1+x23000
x1+x2 2000
x1, x2 0
Step 2. Change the constraints to straight line equations.
• To obtain the feasibility region by graphical method, the constraints are
expressed into equality as :
3x1+x2 = 3000 and x1+x2 = 2000
28
Graphical Solution of L.P.P
Step 3. Draw the lines on x-y axis with x1 as x-axis and x2 as y-axis
• To draw the straight lines, for each equation, determine where the line
intersects each axis.
a. To find where it crosses the x2 axis, set x1 equal to zero and
solve the equation for the value of x2.
b. To find where it crosses the x1 axis, set x2 equal to zero and
solve the equation for the value of x1.
29
Graphical Solution of L.P.P
Note:
• For less than or equal to constraints, shade the area to the left of the
line, or otherwise.
30
Graphical Solution of L.P.P
• But to find the optimal point, take the corner coordinates and check the
optimality of the objective function.
Exercise 1:
32
Home Take Assignment 2
Exercise 2:
• A construction site requires a minimum of 12,000 cubic meters of
sand and gravel mixture. The mixture must contain no less than
5,000 cubic meters of sand and no more than 6,000 cubic meters
of gravel. Materials may be obtained from two sites: 35% of sand
and 65% gravel from site 1 at a delivery cost of $5.00 per cubic
meter and 70% sand and 30% gravel from site 2 at a delivery cost
of $7.00 per cubic meter. Solve the problem using graphical
technique.
33
Home Take Assignment 2
Exercise 3:
A real estate company plans to build 5-storey
and 3-storey apartments on a 60,900 m² plot
of land. The company has a budget of 200
million USD for construction and working
hours of 4800. Based on the details provided
below, what is the maximum number of each
type of apartment that can be built to
accommodate the greatest number of
residents?
34
Home Take Assignment 2
Exercise 4:
A total of 1000 m³ of soil needs to be
excavated within one week (5 working days)
using five different types of rental machines.
Each machine has a specified hourly cost
(including machine and operator), and each
machine can operate up to 8 hours per day.
Determine the allocation of machine usage
that minimizes the total excavation cost.
• The maximum value of Z occurs at one vertex of the feasible region(say A).
• Thus, this problem has a unique optimal solution.
36
Possible Cases to Solution of L.P.P
37
Possible Cases to Solution of L.P.P
• Here the solution space is unbounded. i.e. there are points in the feasible
region for which z will have much higher values. The maximum value z
occurs at infinity. Thus, this problem has an unbounded solution.
38
Possible Cases to Solution of L.P.P
• There are no point (x1, x2) common to both the shaded regions.
• Thus, the problem cannot be solved. Hence the problem has no feasible
solution.
39
Possible Cases to Solution of L.P.P
40
Possible Cases to Solution of L.P.P
– An unbounded solution,
41
Graphical Solution of L.P.P
Disadvantages:
– But it can effectively solve LPP if the problem involves only two
variables.
– Moreover, even though the problem involves only two variables, if the
number constraints are large, a large number of lines make the graph
difficult to read.
– Thus, it is not the powerful tool of linear programming as most of the
practical situations do involve more than two variables.
42
Cases to Solution of L.P.P
Redundant Constraints
43
Simplex Method
Simplex Method
• Simplex method is the most popular method used for the solution of
Linear Programming Problems (LPP).
44
Simplex Method
Important terms:
Given a system of m linear equations with n variables (m < n), the
solution obtained by setting (n - m) variables equal to zero and
solving for the remaining m variables (basic variables) is called
basic solution.
45
Simplex Method
46
Simplex Method
• Step 2. Check whether all bi’s are positive. If any of the bi’s is negative,
multiply both sides of that constraint by -1 so as to make its right hand
side positive.
47
Simplex Method
48
Simplex Method
49
Simplex Method
Step 4. Find an initial basic feasible solution and express the above information
conveniently in the following simplex table.
n
Optimize(max . or min . ) z = c j x j
j =1
subject to
n
Where,
• Cj row = coefficients of the variables in the objective function
• CB column = coefficients of the basic variables in the objective function
• YB column = the basic variables
• The body matrix = the coefficients of the non-basic variables in the
constraint equations.
• Unit matrix = the coefficients of the basic variables in the constraints
equation.
• The (Zj-Cj) row = the net evaluations or index for each column.
• Step 5. Compute the net evaluations (Zj-Cj) (j=1,2, …,n) by using the relation:
Zj-Cj = CBaj –Cj
Examine the sign of (Zj-Cj )
a) if all (Zj-Cj ) 0, then the current basic feasible solution XB is
optimal.
b) if at least one (Zj-Cj ) < 0, then the current basic feasible solution
is not optimal, go to the next step.
51
Simplex Method
• Step 8. Drop the leaving variable and introduce the entering variable
along with its associated value under CB column. Convert the pivot
element to unity by dividing the pivot equation by pivot element and all
other elements in its column to zero by making use of
Note:
If the net evaluation, Zj-Cj > 0, for all non-basic variables, then the problem has a unique
optimal solution
If the net evaluation, Zj-Cj = 0, for at least one non-basic variables, then the problem has
alternative or infinite number of solution.
53
Simplex Method
0 s1 50 2 1 1 0 0 50
0 s2 100 2 ( 5) 0 1 0 20*
0 s3 90 2 3 0 0 1 30
Pivot column
Since there are some (Zj – Cj)<0, the current basic feasible solution is not
optimal.
55
Simplex Method
= Min50,20,30 = 20
• This corresponds to s2 . Therefore, the leaving variable is the basic variable s2.
• The leaving variable row is the pivot equation and 5 is the pivot element.
• Now, the new pivot equation is:
• New pivot equation = old pivot equation pivot element
56
Simplex Method
• New pivot equation = old pivot equation pivot element
= (100 2 5 0 1 0) 5
= (20 2/5 1 0 1/5 0)
57
Simplex Method
• First iteration:
Cj (4 10 0 0 0)
CB YB XB x1 x2 s1 s2 s3
X Bi
= Min , air 0
air
0 s1 30 8/5 0 1 -1/5 0
10 x2 20 2/5 1 0 1/5 0
0 s3 30 4/5 0 0 -3/5 1
Since all (Zj – Cj)0, the current basic feasible solution is optimal.
Therefore, the optimal solution is Max. Z = 200, x1= 0, x2= 20
58
Simplex Method
60
Sensitivity Analysis in L.P.P
• Sensitivity analysis/post-optimality analysis, is the study of how sensitive
the solution is to parameter changes.
• Once the optimal solution to a LPP problem has been attained, it may be
desirable to study how the current solution changes when the parameters
of the problem changes.
• Such analysis converts the static LPP solution into a dynamic tool to study
the effect of changing conditions.
62
Sensitivity Analysis Approaches
Let,
X1 = number of Televisions to be produced;
X2 = number of Radios to be produced
Limitations:
Hours for electronic works: 4x1+ 3x2 240
Hours for Assembly: 2x1+ x2 100
Max. Z = 7x1+5x2
subject to
4x1+ 3x2 240
2x1+ x2 100
and x1, x2 0
63
Adjustable cells table – the impact of changes of the coefficients in the objective
function on the optimal solution
Constraints table – the impact of changes of the RHS of the constraints on the optimal
solution
64
Sensitivity Analysis Approaches
Exercise 1: Do a sensitivity analysis on the following LPP.
65
Advantages and Disadvantages of LPP
• Advantages
– It provides an insight into the problem environment.
– It makes a scientific and mathematical analysis of the problem
situations.
– It gives an opportunity to decision makers to formulate his/her
strategies consistent with the constraints and the objectives.
– It deals with changing situations. That is, once a plan is arrived through
the LPP it can also be reevaluated for changing conditions.
• Limitations
– LPP treats all relationships as linear. But it is not true in real life
situations.
– The decision variables in some LPP would be meaningful only if they
have integer values .
– All the parameters in the LPP are assumed to be known constants. But in
real life they may not be known completely or they may be probabilistic
and liable to changes.
– The problems are complex if the number of variables and constraints are
large.
– LPP deals with only a single objective problems.
66
Other Forms of Linear PP
67
Other Forms of Linear PP
Max. Z = 600C+700F
subject to
2C+ 3F 12
6C+ 5F 30
C, F ≥0 and integers
68
Other Forms of Linear PP
Solution: Graphical LP Solution
The shaded region shows the feasible region for the LP problem.
Optimal corner point solution: C = 3.75; F = 1.5 Profit of $3,300
71
Home Take Assignment 3
72
Questions?
THANK YOU
73