Linear Programming Examples
Linear Programming Examples
A company makes three products and has available 4 workstations. The production
time (in minutes) per unit produced varies from workstation to workstation (due to
different manning levels) as shown below:
Workstation
1 2 3 4
Product 1 5 7 4 10
2 6 12 8 15
3 13 14 9 17
Similarly the profit (£) contribution (contribution to fixed costs) per unit varies from
workstation to workstation as below
Workstation
1 2 3 4
Product 1 10 8 6 9
2 18 20 15 17
3 15 16 13 17
If, one week, there are 35 working hours available at each workstation how much of
each product should be produced given that we need at least 100 units of product 1,
150 units of product 2 and 100 units of product 3. Formulate this problem as an LP.
Solution
Variables
At first sight we are trying to decide how much of each product to make. However on
closer inspection it is clear that we need to decide how much of each product to make
at each workstation. Hence let
Although (strictly) all the xij variables should be integer they are likely to be quite
large and so we let them take fractional values and ignore any fractional parts in the
numerical solution. Note too that the question explicitly asks us to formulate the
problem as an LP rather than as an IP.
Constraints
Objective
maximize
10x11 + 8x12 + 6x13 + 9x14 + 18x21 + 20x22 + 15x23 + 17x24 + 15x31 + 16x32 + 13x33 +
17x34
Blending problem
Consider the example of a manufacturer of animal feed who is producing feed mix for
dairy cattle. In our simple example the feed mix contains two active ingredients and a
filler to provide bulk. One kg of feed mix must contain a minimum quantity of each of
four nutrients as below:
Nutrient A B C D
gram 90 50 20 2
Variables
In order to solve this problem it is best to think in terms of one kilogram of feed mix.
That kilogram is made up of three parts - ingredient 1, ingredient 2 and filler so let:
Essentially these variables (x1, x2 and x3) can be thought of as the recipe telling us how
to make up one kilogram of feed mix.
Constraints
nutrient constraints
Note the use of an inequality rather than an equality in these constraints, following the
rule we put forward in the Two Mines example, where we assume that the nutrient
levels we want are lower limits on the amount of nutrient in one kg of feed mix.
Objective
In case you are interested the optimal solution to this LP (solved using the package as
dealt with later) is x1= 0.3667, x2=0.2667 and x3=0.3667 to four decimal places.
Blending problems of this type were, in fact, some of the earliest applications of LP
(for human nutrition during rationing) and are still widely used in the production of
animal feedstuffs.
A company manufactures four variants of the same product and in the final part of the
manufacturing process there are assembly, polishing and packing operations. For each
variant the time required for these operations is shown below (in minutes) as is the
profit per unit sold.
Assembly Polish Pack Profit (£)
Variant 1 2 3 2 1.50
2 4 2 3 2.50
3 3 3 2 3.00
4 7 4 5 4.50
Given the current state of the labour force the company estimate that, each
year, they have 100000 minutes of assembly time, 50000 minutes of polishing
time and 60000 minutes of packing time available. How many of each variant
should the company make per year and what is the associated profit?
Suppose now that the company is free to decide how much time to devote to
each of the three operations (assembly, polishing and packing) within the total
allowable time of 210000 (= 100000 + 50000 + 60000) minutes. How many of
each variant should the company make per year and what is the associated
profit?
Variables
Let: