Unit 3 Linear Programming
Unit 3 Linear Programming
Linear programming
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Learning objectives
• a mathematical technique
• applied where there is more than one constraint
• to find the best possible way to allocate scarce resources,
e.g. energy, machinery, materials, funds, labour
• to maximise profit or minimise cost
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Optimal manufacturing plan
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Methods to do linear
programming
• the graphical method (only for problems
involving two products)
• the simplex method
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Linear programming
assumptions
• Relationships between variables are linear and there is an
optimal solution.
• The contribution per unit for each product and the usage of
resources per unit are the same, regardless of the quantity of
output manufactured and sold.
• The products and resources that are allocated are infinitely
divisible.
• There is one clearly defined objective function.
• Single-value estimates are used for the uncertain values.
• The situation remains static in all other respects.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example 5.1
Maskia (Pty) Ltd currently manufactures two types of specialised
machinery parts. The standard costs of the products are as follows:
Xabex Yowek
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
During the next financial period, the availability of resources is expected
to be as follows:
• Material 3 360 units
• Labour 5 760 labour hours
• Machine capacity 2 760 machine hours
The owner of the organisation believes that the maximum sales potential
for the Xabex is 200 units, while there is no expected sales limitation on
the Yowek.
Required:
Give advice on the optimal manufacturing plan for Maskia (Pty) Ltd to
make best use of scarce resources, obtain the highest possible profit and
incur the lowest cost.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Solution
Step 1:
• We use linear programming to find linear relationships between variables or factors
that affect decisions. As a first step we therefore need to identify decision variables.
• In our example it will be the following:
X = number of Xabex units to manufacture
Y = number of Yowek units to manufacture
• Now we can determine the equations that will explain the problem in algebraic
terms.
• Since this is the graphical method, it is necessary to decide which product will be
denoted on the x-axis and which product on the y-axis. In this example, we can put
Xabex on the x-axis and Yowek on the y-axis. We are also going to denote the
products as such in the algebraic equations.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Step 2:
• We can assume the goal of Maskia is to maximise its contribution. When
we determine the objective function, we need to take this into account.
• The Xabex gives a contribution of R28 per unit and the Yowek a
contribution of R32 per unit. If the objective of the company is to
maximise its contribution, the objective function would be stated as:
C ≥ 28X + 32Y.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.) .
Step 3:
• After establishing the objective of the company by means of the objective
function,we can pay attention to possible constraints the company is facing. The
constraints are presented in the form of algebraic equations of the limitations in
resources the company faces and which limits its output.
• Maskia faces possible resource constraints in the form of available material, labour
hours and machine capacity. The availability of resources is given as a maximum of 3
360 units of material, 5 760 labour hours and 2 760 machine hours.
• Each Xabex uses 16 units of material and each Yowek uses 8 units of material. Each
Xabex uses 12 labour hours and each Yowek uses 16 labour hours. Each Xabex uses 8
machine hours and each Yowek uses 12 machine hours. The constraints can be stated
as follows:
Material: 16X + 8Y ≤ 3 360
Labour: 12X + 16Y ≤ 5 760
Machine capacity: 8X + 12Y ≤ 2 760
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
• Linear programming as a mathematical tool does not promise that the answer will
necessarily make sense. For example, it may happen that an answer indicates that a
negative number of a certain product should be manufactured. To prevent this from
happening, a non-negativity factor must be included in the algebraic equations to
state that one cannot manufacture and sell less than zero of a product.
• This will be denoted as 0 ≤ X ≤ 200, since only 200 units of Xabex can be sold, and Y ≥
0 because demand for Y is unlimited.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
The optimal solution
An optimal solution to a linear programming problem is a feasible solution
with the largest objective function value in the case of a maximisation
problem. A linear programme may have multiple optimal solutions, but only
one optimal solution value. A linear programme s unfeasible if it has no
feasible solutions, that is, the feasible region is empty. A linear programme is
unbounded if the optimal solution is unbounded, that is, it is either 1 or 21.
Every linear programme is therefore:
• Unfeasible, or
• Unbounded, or
• A unique optimal solution value.
.
Finding the optimal solution
The optimal solution can be determined using a graph and supplementing
the graph by solving simultaneous equations.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Step 4:
When the algebraic equations are determined, it can be presented on a
graph.
All the constraints need to be plotted on a single graph but for the sake of
clarity we are first going to observe each constraint on its own graph.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
In the same equation 16X + 8Y ≤ 3 360, if X = 0, then 16(0) + 8Y ≤ 3 360.
This means the number of units of Y if no units of X are manufactured would be
3 360 ÷ 8 ≤ 420 units.
On a graph, it will be denoted as follows:
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
The same will have to be done for the other constraints. For labour, it means that
the maximum number of units that can be manufactured of each product will be:
12X + 16Y ≤ 5 760
If Y = 0, then 12X + 16(0) ≤ 5 760, therefore making X ≤ 480.
If X = 0, then 12(0) + 16Y ≤ 5 760, therefore making Y ≤ 360.
On the graph, it will be denoted as follows:
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
For machine capacity, the maximum number of units that can be manufactured of
each product will be:
8X + 12Y ≤ 2 760
If Y = 0, then 8X + 12(0) ≤ 2 760, therefore making X ≤ 345.
If X = 0, then 8(0) + 12Y ≤ 2 760, therefore making Y ≤ 230.
On the graph it will be denoted as follows:
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
In addition, we need to show non-negativity constraints. The Y = 0 is shown by
not allowing the graph to go into negative figures (stopping the graph at zero,
where the -axis and the y-axis meet). The 0 = X = 200 is shown by drawing a line
on the x-axis at 200 units to show that production cannot go past that amount.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
The shaded area in Figure 5.4 (ABCDE) is the area within which optimal
manufacturing would take place. The contribution-maximising (optimal)
manufacturing plan would be as close as possible to a corner to the right of the
shaded area.
Step 5:
To find the optimal plan, choose a random contribution value that falls within the
shaded area. We do not know the maximum value of the objective function;
however, we can draw an iso-contribution (or ‘profit’) line that shows all the
combinations of X and Y that provide the same total value for the objective
function. You can pick any total contribution figure, but a multiple of 28 and 32 is
easiest. Hence, the best way to accomplish this is to choose a value that will be
divisible by 28 and 32 (the contributions from the equation C ≥ 28X + 32Y).
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
The fixed ‘5’ we multiply the total with is to make the values of X and Y large
enough so that they can be easily indicated on the graph. If you multiplied with
10, the values for X and Y would have been larger than the range of values on
the graph.
This means that we can draw the iso-contribution line for the equation
C ≥ 28X + 32Y on the graph as shown by the dashed line in Figure 5.5.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
The dashed line means that any combination of X and Y on that line will give a contribution
of R4 480. This dashed line can be extended until it touches the last corner of the shaded
area, which in this case would be point B. This is the optimal solution to the problem. At
this point, X is approximately 145, and Y is 135. This gives a total contribution of:
C = 28(145) + 32(135) = R8 380.
Step 6
Since a small drawing error in a graph can provide an inexact solution to the number of
units at the optimal manufacturing plan, a more accurate way would be to solve the
simultaneous equations for the constraints that are applicable at the point of the optimal
manufacturing plan. We can see that the applicable constraints at the point of the optimal
plan are materials and machine capacity. The reason for this is that point B on the graph is
where the materials and machine capacity constraint lines cross. It is clear that labour
hours is not a constraint in the feasible area of this example.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Therefore:
8X + 12Y = 2 760 [1]
16X + 8Y = 3 360 [2]
Multiply equation [1] with a figure of 2 to derive equation [3]. The reason we multiply by 2
is to get one of the variables to have the same value. In this case, multiplying by 2 ensures
that both equations have a 16X in it, which can be cancelled out:
16X + 24Y = 5 520 [3]
16X + 8Y = 3 360 [2]
16X cancels each other out. Now subtract equation [2] from equation [3]:
16Y = 2 160
Y = 135
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Illustrative example
(cont.)
Substitute the answer into equation [3]:
16X + 24(135) = 5 520
16X + 2 280
X + 142.5
This gives an exact contribution of C = 28(142) + 32(135) = R8 296.
Remember that a company cannot produce half a unit, therefore the 142.5 will have to be
rounded down to a full unit. You will not round up, because that means an additional unit
is manufactured, which will not be possible with the limited resources available.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Shadow prices
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Shadow prices
Implications of shadow prices
Management can use shadow prices as a measure of the maximum
premium that they would be willing to pay for one more unit of the
scarce resource. However, the shadow price should be considered
carefully. For example, the shadow price of material may be calculated
as R100 per kg. However, it may be possible to negotiate a lower
shadow price than this.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Slack variables
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
The simplex method of
linear programming
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
The simplex method
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Simplex matrices
• Equations are given in a matrix as follows:
Quantity X Y Description
S1 = 3 360 -16 -8 materials
constraint
S2 = 5 760 -12 -16 labour
constraint
S3 = 2 760 -8 -12 machine
capacity
constraint
S4 = 200 -1 0 demand
constraint
C=0 28 32 contribution
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Solving the matrix
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Uses for linear programming
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Linear programming limitations
Objective functions and constraints cannot always be
expressed in linear form; it is an assumption that one
makes.
• Fractional values are permitted for the decision
variables, but many problems require that the
decision variables should be obtained in integer
values.
• The coefficient of basic variables cannot be
determined with certainty, only with probability.
• Where a problem consists of multiple objectives,
linear programming cannot provide a solution.
Cost and Management Accounting: Operations and Management – A southern African approach (3rd edition)
© Juta and Company Ltd 2021
ISBN 9781485131229
Linear programming limitations
(cont.)