Lecture 2 Linear Programming
Lecture 2 Linear Programming
Lecture 2
Formulating the LLP problem:
Albite Mines Company
The Albite Mines Company own two different mines that produce an ore which,
after being crushed, is graded into three classes: ‘High’, ‘Medium’ and ‘Low’-grade.
The company has contracted to provide a smelting plant with 12 tons of high-
grade, 8 tons of medium-grade and 24 tons of low-grade ore per week. The two
mines have different operating characteristics as detailed below.
Ore Grade Mine A 1 Day O/P Mine B 1 Day O/P
tons/day tons/day How many days per week
High 6 1 should each mine be
Medium 3 1 operated to fulfil the
smelting plant contract?
Low 4 6
Cost of operating per day 180 160
(Rs.’000)
Solution
Guess????
Guess1 :
To explore the Albite Mines problem further we might simply guess (i.e.
use our judgement) how many days per week to work and see how they
turn out.
1. Work one day a week on A, one day a week on B
Grade Mine A 1 Mine B Demand Per Mine A +Mine B Remarks
Day O/P 1 Day O/P week in Tons 1 Day O/P
Guess1 :
To explore the Albite Mines problem further we might simply guess (i.e. use our
judgement) how many days per week to work and see how they turn out.
1. Work one day a week on A, one day a week on B
Mine A Mine A Mine B Demand Per Mine A +Mine B Remarks
1 Day 1 Day O/P week in Tons 1 Day O/P
O/P
High 6 1 12 6+1 =7 7< 12 does not meet
demand.
Medium 3 1 8 3+1 =4 4<8
Low 4 6 24 4+6 = 10 10 < 24
• This does not seem like a good guess We say that such a solution is infeasible.
• This does not seem like a good guess as it results in only 7 tonnes a week of
high-grade, insufficient to meet the contract requirement for 12 tonnes of high-
grade a week. We say that such a solution is infeasible
Guess2 :
To explore the Albite Mines problem further we might simply guess (i.e.
use our judgement) how many days per week to work and see how they
turn out.
2. Work 3 days a week on A, 2 days a week on B
Mine A Mine A 1 Mine B Demand Per Mine A +Mine B Remarks
Day O/P 1 Day O/P week in Tons 3 +2 Day O/P
High 6 x3 1x2 12 18+2 =20 20 > 12 does meet demand.
Medium 3x3 1x2 8 9+2 =11 11> 8
Low 4x3 6x2 24 12+12 = 24 24 = 24
This seems like a better guess as it results in sufficient ore to meet the
contract. We say that such a solution is feasible. However it is quite
expensive (costly).
Formulating the LLP problem
Rather than continue guessing we can approach the problem in a
structured logical fashion as below. Reflect for a moment though that
really we would like a solution which supplies what is necessary under
the contract at minimum cost. Logically such a minimum cost solution
to this decision problem must exist. However even if we keep guessing
we can never be sure whether we have found this minimum cost
solution or not. Fortunately our structured approach will enable us to
find the minimum cost solution.
Albite Mines solution
• What we have is a verbal description of the Albite Mines problem. What we need
to do is to translate that verbal description into an equivalent mathematical
description.
• In dealing with problems of this kind we often do best to consider them in the
order:
1.Variables
2.Constraints
3.Objective.
• We do this below and note here that this process is often called formulating the
problem (or more strictly formulating a mathematical representation of the
problem).
Variables:
(1) Variables
These represent the "decisions that have to be made" or the
"unknowns".
Let
x = number of days per week mine A is operated
y = number of days per week mine B is operated
Note here that x >= 0 and y >= 0.
2) Constraints :
Let
x = number of days per week mine A is operated
y = number of days per week mine B is operated
Note here that x >= 0 and y >= 0.
It is best to first put each constraint into words and then express it in a
mathematical form. Ore production constraints - balance the amount
produced with the quantity required under the smelting plant contract
Mine A Mine A 1 Mine B Demand Per Mine A +Mine B Remarks
Day O/P 1 Day O/P week in Tons weekly O/P
High 6x 1y 12 6x+1y ≥ 12 Why greater than and not equal to 12?
Because :
If we choose an equality for the ore production constraints we
have the three equations
6x+y=12,
3x+y=8
4x+6y=24 and
there are no values of x and y which satisfy all three
equations (the problem is therefore said to be "over-
constrained").
• For example the (unique) values of x and y which satisfy
6x+y=12 and 3x+y=8 are x=4/3 and y=4, but these values do
not satisfy 4x+6y=24.
2) Constraints
Mine Cost per day (Rs.'000) Production (tons/day) Demand per week
High Medium Low High Medium Low
A 180 6 3 4 12 8 24
B 160 1 1 6
Ore
High 6x + 1y ≥ 12 x = number of days per week mine A is operated
Medium 3x + 1y ≥ 8 y = number of days per week mine B is operated
Low 4x + 6y ≥ 24
Note we have an inequality here rather than an equality. This implies that we may
produce more of some grade of ore than we need. In fact we have the general rule:
given a choice between an equality and an inequality choose the inequality.
• The reason for this general rule is that choosing an inequality rather
than an equality gives us more flexibility in optimising (maximising or
minimising) the objective (deciding values for the decision variables
that optimise the objective).
• days per week constraint - we cannot work more than a certain
maximum number of days a week e.g. for a 5 day week we have
x≤5 x = number of days per week mine A is operated
y≤5 y = number of days per week mine B is operated
Polishing 4x + 2y ≤ 13
Profit 5x + 3y
Formulating the LPP
Hence, the liner programming problem for the given problem is
formulated as follows
Maximize Z= 5x + 3y
Subject to Constraints
2x+4y ≤ 20
3x+2y≤ 24,
4x+2y ≤13,
And x≥0, y≥0 (Non- Negative Constraints)
Formulating the LPP
If we need to solve it further then :
CONVERT INEQUATIONS INTO EQUATIONS
Polishing 4x + 2y ≤ 13
Profit 5x + 3y
Formulating the LPP
Hence, the liner programming problem for the given problem is
formulated as follows
Maximize Z= 5x + 3y
Subject to Constraints
2x+4y ≤ 20
3x+2y≤ 24,
4x+2y ≤13,
And x≥0, y≥0 (Non- Negative Constraints)
Formulating the LPP
If we need to solve it further then :
CONVERT INEQUATIONS INTO EQUATIONS
0 20 40 60 80 90 X
FIGURE : 1
• These two points are then connected by a straight line as shown in
Figure 1 but the question is where are the points satisfying
4X + 6Y≤ 360 any point above the constraint line violates the
inequality condition but any point below the line does not violate the
constraint Thus the inequality and non negative condition can only be
satisfied by the shaded area (feasible region or solution space) as
shown in figure 1 similarly the constraints 3X≤ 80 and 5Y ≤ 200 are
also plotted on the graph and are indicated by the shaded area as
shown in figure 2
Since all constraints have been graphed, the area which is bounded by
all the constraints lines including all the boundary points is called the
feasible region (or solution space) The feasible region is shown in fig. 2
by the shaded area ABCD.
1 4X + 6Y =360
Y Y 2 3X =180
80
(X=0, Y=60) 80 3 5Y=200
60
60 1
2
X= 90, Y = 0 B(60,20)
20 Solution Space Solution
20 Space
A(60,00)
0 20 40 60 80 90 X 0 20 40 60 80 90 X
FIGURE : 2
FIGURE : 1
The constraint have been graphed, the area which is bounded by the
constraints lines including all the boundary points is called the feasible
region (or solution space) The feasible region is shown in fig. 1 by the
shaded area.
Y
80
(X=0, Y=60)
60
1 4X + 6Y =360
2 3X =180
1 4X+6Y = 360 3 5Y=200
40
(X= 90, Y = 0)
20 Solution Space /
Feasible Region
0 20 40 60 80 90 X
FIGURE : 1
Since all constraints have been graphed, the area which is bounded by
all the constraints lines including all the boundary points is called the
feasible region (or solution space) The feasible region is shown in fig. 2
by the shaded area ABCD.
1 4X + 6Y =360
Y Y 2 3X =180
80
(X=0, Y=60) 80 3 5Y=200
60
60 1
2
60
50
D(0,40) C(30,40)
40
30
B(60,20)
20 Feasible Region
10
0
0 10 20 30 40 50 60 70 80 90 100
O(0,0)
A(60,00)
3a) Since the optimal value of the objective function occurs at one of
the extreme points of the feasible region, it is necessary to determine
their coordinates. The coordinates of extreme points of the feasible
region are :
O(0,0,),A(60,00), B(60,20), C(30,40), D(0,40)
3b) Evaluate objective function value at each extreme point of the
feasible region as shown below
Extrem Coordinates (X Y) Objective Function Value
e Point , Z= 15X+ 10Y
4 FATS
3.5
2.5
1.5
0.5
Proteins
0
0 1 2 3 4 5 6 7
3.5
2.5
2 FEASIBLE REGION
1.5
M
1
The cost will be minimised at point B i.e. The stipulated intake of 18,
24 and 16 units of Fats, Proteins and Carbohydrates respectively could
be met at the least cost at point M
Example:
Use the graphical method to solve the following LP problem maximize
Z= 2X + Y
• subject to constraints
1 )X +2Y ≤ 10
2) X + Y ≤ 6
3) X-Y ≤2
4) X - 2Y ≤ 1
and X, Y ≥0
Solution
• Plotting a graph of each constraint by first treating them as a linear
equation in the same way as discussed earlier use the inequality
condition of each constraint to mark the visible region as shown in
figure the feasible region is shown by shaded area here it may be
noted that we have not considered the area below the lions X - 62 is
equal to 2 and x square - 2 x 2 is equal to one for the negative values
of x to this is because of the non negative condition Y is greater than
or equal to zero which implies that negative values of x to are not
desirable
• Linear Programming (Definition, Methods & Examples) (byjus.com)
THANK YOU