Chapter 4
Chapter 4
4.1 INTRODUCTION
Linear Programming is a widely used mathematical technique designed to help
managers in planning and decision making relative to resource allocation.
Requirements of a LP problem:
All problems seek to minimise or maximise some quantity
All problems have restrictions or constraints that limit the degree to which we
can pursue our goal
There must be alternative courses of action to choose from
The objective and constraints in LP problems must be expressed in terms of
linear equations or inequalities
b1 x1 + b2 x2 + b3 x3 + … + bn xn
where the b’s are the coefficients (constants) of the x’s and the x’s are variables. The
corner point method, one of the methods for the optimisation (maximisation and
minimisation) of the linear function subject to certain constraints will be studied in this
course.
In Linear Programming there exists theoretical backing to the statement that an
optimal solution will lie at a corner point of the feasible region, where the feasible
region is the region where all constraints are satisfied. This holds true to any LP
problem.
The equation to be optimised will from now on be known as the objective function.
The goal of this section involves the scheduling of all tasks to obtain the optimal
production quantities and in so doing, optimising the objective function.
This procedure is useful only when there are two decision variables.
Example 1
Cellphones4U owns two small factories where they manufacture two types of cellular phones,
namely Habari and Mzuri. Each Habari cellular phone requires 10 manhours to manufacture
and 3 manhours in the testing department. Each Mzuri cellular phone requires 8 manhours to
manufacture and 4 manhours in the testing department. The manufacturing department has a
maximum of 800 manhours available per week, while the testing department has a maximum
of 360 manhours available per week. The factory has to manufacture at least 60 of the Mzuri
models each week. The profit on one Habari phone is R200 while the profit on one Mzuri phone
is R270.
How many of each type of phone must the company manufacture to maximise the profit?
Firstly, consider the inequality as an equality, and sketch the straight line:
10 x1 8x2 800
x1 intercept: Let x2 = 0, then x1 = 80 Point (80; 0)
x2 intercept: Let x1 = 0, then x2 = 100 Point (0; 100)
120 x2
100
80
60
40
20
x1
20 40 60 80 100 120
10(0) + 8(0) = 0 800, therefore the graphical representation of the first constraint is:
120 x2
100
80
60
40
20
x1
20 40 60 80 100 120
x1 , x2 0
10 x1 8 x2 800
3x1 4 x2 360
120 x2
100
80
60
40
Finally the last inequality can be added:
x1 , x2 0
10 x1 8 x2 800
3x1 4 x2 360
x2 60
120 x2
100
80
60
40
20
x1
20 40 60 80 100 120
120 x2
100
80
60
40
20
x1
Step 6: Identify the corner points of the feasible region and calculate the profit
associated to each corner point:
120 x2
100
(b)
(c)
80
60
(a) (d)
40
20
x1
20 40 60 80 100 120 Therefore it can be
Corner points: concluded that profit is
(a): (0; 60): P = 200x1 + 270x2 = 0 + 270 (60) = 16 200 maximized at point (b), hence
(b): (0; 90): P = 200x1 + 270x2 = 0 + 270 (90) = 24 300 0 units of Habari and 90 units
(c): (20; 75): P = 200x1 + 270x2 = 200(20) + 270 (75) = 24 250 of Mzuri needs to be
(d): (32; 60): P = 200x1 + 270x2 = 200(32) + 270 (60) = 22 600 manufactured to maximize
profit.
Note: The coordinates of point (c) are found by setting the equations for the two lines
that cross at (c) equal to each other:
10 x1 8x2 800 and 3x1 + 4x2 = 360 (multiply the second equation
by 2):
10 x1 8x2 800
6x1 + 8x2 = 720 Subtract the second equation from the first:
4 x1 80
Substitute into one of the original equations:
x1 20
x2 = 75
The coordinates of point (d) are found by setting the equations for the two lines that
cross at (d) equal to each other:
x2 = 60 and 10 x1 8x2 800 10 x1 8(60) 800
x1 = 32
Example 2
The Bradlows Furniture Company
The Bradlows furniture company produces inexpensive tables and chairs. The production
process for each is similar in that both require a certain number of hours of carpentry work and
a certain number of labour hours in the painting and varnishing department. Each table takes
four hours of carpentry work and two hours in the painting and varnishing shop. Each chair
requires three hours in the carpentry and one hour in painting and varnishing. During the current
production period, 240 hours of carpentry and 100 hours of painting and varnishing time are
available. Each table sold yields a profit of R7; each chair produced may be sold for a profit of
R5. This company would like to maximize their profits.
4.3 OBJECTIVE: MINIMISE THE COST BY USING THE CP METHOD
Example 3
A travel agency has to transport a minimum of 1 200 passengers and 36 000kg of luggage
from one airport to another. Two types of aircraft are available. The SilverJet can transport a
maximum of 120 passengers and 2 000kg of luggage in one flight. The GoldenFlyer can
transport a maximum of 60 people and 3 000kg of luggage in one flight. The travel agency
may not use more than 16 aircraft. The rental of a SilverJet is R40 000 per flight and R48 000
per flight on a GoldenFlyer.
How many of each aircraft must the travel agency hire in order to mimimise cost?
20 x2
15
10
x1
5 10 15 20
Step 6: Identify the feasible region
20 x2
15
(a)
10
(b)
5 (c)
x1
5 10 15 20
Step 7: Identify the corner points of the feasible region and calculate the profit
associated to each corner point:
(a): 120 x1 60 x2 1200 -------------(1)
and x1 x2 16 -------------(2)
and x1 x2 16 ------------(2)
Corner Points:
(4; 12): C = 40000 x1 48000 x2 = 40 000(4) + 48 000(12) = 736 000
Therefore it can be concluded that cost is minimised when hiring 6 SilverJet aircraft
and 8 GoldenFlyers.
Example 4
Ace Auto manufacturers
Ace Auto manufactures luxury cars. The company believes it is most likely that their
customers are high – income people. In order to reach these groups, Ace Auto has embarked
on an ambitious tv advertising campaign and has decided to purchase one minute commercial
spots on two types of programs; comedy shows and cricket games shows. Seven million high
– income women and two million high - income men see each comedy commercial. Two
million high – income women and twelve million high – income men see each cricket
commercial. A one - minute comedy ad costs R50 000 and a one - minute cricket ad costs
R100 000. Ace Auto would like the commercials to be seen by at least 28 million high – income
women and at least 24 million high – income men, but at a minimum cost. How many
commercial spots must Ace Auto purchase on comedy shows and cricket games to minimize
cost?
EXERCISES ON SECTIONS 4.1 –4.3
2. A farmer wishes to minimize the cost of feeding his 50 camels weekly. There
are two types of feed available, Type A and Type B. Type A costs 60c per kg while
Type B costs 100c per kg. Each camel must receive at least 100 units of energy weekly
and at least 120 units of protein weekly. Each kg of Type A contains 2 units of energy
and 1 unit of protein, while Type B contains 1 unit of energy and 3 units of protein. Use
the graphical method to find the most affordable combination of the two types of feed
that the farmer should purchase.
3. A manufacturer makes two products. The first product requires five hours for
processing, three hours for assembling and four hours for packaging. The
second product requires two hours for processing, twelve hours for
assembling and eight hours for packaging. The plant has forty hours available
for processing, sixty for assembling and forty eight for packaging. The profit
margin for the first product is R7 and R21 for the second product.
type B. This is done in a workshop that is available for only 20 days each
month. The paint shop can handle a maximum of 8 units per month. At least 2
units of type A must be produced each month.
Units of type A yield a profit of R700 per unit while units of type B yield a profit
of R900 per unit. Maximise the profit.
7. Maximize profit: P 12 x 10 y
Subject to:
x 3 y 15
3 x y 13
y 1
x0
8. Minimize: z 40 x 60 y
Subject to:
x y 5
x 2y 4
x, y 0
9. Maximise profit, P = 4 x 5 y
Subject to:
4 x1 8 x2 40
3 x1 x2 20
x1 5
x1 , x2 0
Subject to:
4 x1 2 x2 28
x1 6 x2 29
x1 10
x2 0
SA is a study of how the changes in the coefficients of a linear program affect the
optimal solution.
SA helps us determine when:
A change in the coefficient of the objective function (profit / cost contribution)
and
A change in the right hand side (RHS) value of a constraint (amount of hours
allocated)
will affect the optimal solution.
In example 2 on page 83, the corner points were :(0; 0), (0; 80), (30; 40), (50; 0) and
the profit function was P 7 x1 5x2 and the optimal solution found was (30; 40).
What would the optimal solution have been if the profit function was P 6 x1 4 x2 ?
The Range of optimality allows us to see by how much the profit contribution is
allowed to fluctuate, all else being constant and yet have the current production
quantities remain optimal.
Example 5
Consider example 2 in Chapter 4, page 83.
The Bradlows furniture company produces inexpensive tables and chairs. The production process for each is similar in that both require a
certain number of hours of carpentry work and a certain number of labour hours in the painting and varnishing department. Each table takes
four hours of carpentry work and two hours in the painting and varnishing shop. Each chair requires three hours in the carpentry and one hour
in painting and varnishing. During the current production period, 240 hours of carpentry and 100 hours of painting and varnishing time are
available. Each table sold yields a profit of R7; each chair produced may be sold for a profit of R5. This company would like to maximize their
profits.
The optimal solution found was (30; 40), meaning that the company should produce 30 tables
and 40 chairs.
By how much can the profit associated to the “tables” change and yet have the current
production quantities remain optimal?
By how much can the profit associated to the “tables” change and yet have the current
production quantities remain optimal. The current production quantities are x1 = 30
and x2 = 40.
100 x2
90 2x1 + x2 = 100
80
70
60
50
Optimum
40
30
4x1 + 3x2 = 240
20
10
x1
10 20 30 40 50 60 70
A careful inspection of this graph shows that as long as the slope of the objective
function is between the slope of line 2x1 + x2 = 100 and the slope of line 4x1 + 3x2 =
240 the optimal point will remain constant. The intersection of the two constraints
that produce the optimal corner point serves as the upper and lower limits for the
range of optimality. At this optimal corner point, x1 = 30 and x2 = 40.
Changing an objective coefficient for x1 or x2 will cause the slope of the objective
function to change. In the figure we see that such changes cause the objective
function line to rotate around the optimal corner point.
Rotating the objective function line anti clockwise causes the slope to become less
negative, and the slope increases. The objective function line should be rotated anti
clockwise (slope increased) enough to coincide with line 4x1 + 3x2 = 240.
Any further anti clockwise rotation of the objective function line will cause the current
optimal corner point to be non-optimal. Hence the slope of line 4x1 + 3x2 = 240, which
4
is , provides an upper limit for the slope of the objective function line.
3
Rotating the objective function line clockwise causes the slope to become more
negative, and the slope decreases. Any further clockwise rotation of the objective
function line will cause the current optimal corner point to be non-optimal. Hence the
slope of line 2x1 + x2 = 100, which is – 2 , provides a lower limit for the slope
of the objective function line.
Thus, the current optimal corner point will remain optimal solution as long as
4
– 2 slope of the objective function line
3
Note: To find the slope of the line, make x2 the subject of the equation, then the slope
is the coefficient of x1.
4 240 4
4x1 + 3x2 = 240 x2 x1 . Thus the slope is
3 3 3
2x1 + x2 = 100 x2 2 x1 100 . Thus the slope is – 2
Let us now consider the general form of the slope of the objective function.
Let:
P= the value of the objective function
A= the profit on tables
B = the profit on chairs
To compute the range of optimality (ROO) for the “tables” profit contribution, we
hold the profit contribution for the “chairs” fixed at its initial value B = 5.
4
– 2 - A/ 5
3
From the left hand inequality, we have
– 2 - A/ 5
multiplying both sides by 5: – 10 - A
so, A 10
Combining the calculated limits for A provides the following range of optimality for
the “tables” profit contribution:
6.67 A 10
The range of optimality for A tells management that, with other coefficients
unchanged, the profit contribution for the “tables” can be anywhere between
R6.67 and R10 and the production quantities of 30 tables and 40 chairs will
remain optimal. Note, however, that while the production quantities will not change,
the total profit contribution (value of objective function) will change due to the change
in profit contribution per table.
These computations can be repeated, holding the profit contribution for tables constant
at A = 7. The range of optimality for the “chairs” profit contribution can also then be
determined.
Example 6
Consider example 2 in Chapter 4, page 83.
Calculate the range of optimality for the “chairs”.
Special Cases
In cases where the rotation of the objective function line about an optimal extreme
point causes the objective function line to become vertical or horizontal, there will be
either no upper limit or no lower limit for the slope.
In order to maximize her income, she needs to make 40 suits and 20 dresses.
a) Find the ROO for the suits’ contribution to the profit.
b) Find the ROO for the dresses’ contribution to the profit.