y - NANAMIC

Linear Programming : Introductory Example
THE PROBLEM
A factory produces two types of drink, an ‘energy’
drink and a ‘refresher’ drink. The day’s output is
to be planned. Each drink requires syrup, vitamin
supplement and concentrated flavouring, as shown
in the table.
The last row in the table shows how much of each
ingredient is available for the day’s production.
How can the factory manager decide how much
of each drink to make?
THE PROBLEM
Syrup
Vitamin
supplement
Concentrated
flavouring
5 litres of
energy drink
1.25 litres
2 units
30 cc
5 litres of
refresher
drink
1.25 litres
1 unit
20 cc
Availabilities
250 litres
300 units
4.8 litres
Energy drink sells at £1 per litre
Refresher drink sells at 80 p per litre
FORMULATION
Syrup constraint:
Let x represent number of litres of energy drink
Let y represent number of litres of refresher drink
0.25x + 0.25y  250
 x + y  1000
FORMULATION
Vitamin supplement constraint:
Let x represent number of litres of energy drink
Let y represent number of litres of refresher drink
0.4x + 0.2y  300
 2x + y  1500
FORMULATION
Concentrated flavouring constraint:
Let x represent number of litres of energy drink
Let y represent number of litres of refresher drink
6x + 4y  4800
 3x + 2y  2400
FORMULATION
Objective function:
Let x represent number of litres of energy drink
• Energy drink sells for £1 per litre
Let y represent number of litres of refresher drink
• Refresher drink sells for 80 pence per litre
Maximise
x + 0.8y
SOLUTION
1600
Empty grid to
accommodate
the 3
inequalities
y
1400
1200
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
1st constraint
y
1400
Draw boundary
line:
1200
x + y = 1000
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
x
y
0
1000
1000
0
SOLUTION
1600
1st constraint
y
1400
Shade out
unwanted
region:
1200
1000
x + y  1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
Empty grid to
accommodate
the 3
inequalities
y
1400
1200
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
2nd constraint
y
Draw boundary
line:
1400
1200
2x + y = 1500
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
x
y
0
1500
750
0
SOLUTION
1600
2nd constraint
y
Shade out
unwanted
region:
1400
1200
1000
2x + y  1500
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
Empty grid to
accommodate
the 3
inequalities
y
1400
1200
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
3rd constraint
y
Draw boundary
line:
1400
1200
3x + 2y = 2400
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
x
y
0
1200
800
0
SOLUTION
1600
3rd constraint
y
Shade out
unwanted region:
1400
1200
3x + 2y  2400
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
All three
constraints:
y
1400
First:
1200
x + y  1000
1000
800
600
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
All three
constraints:
y
1400
First:
1200
x + y  1000
1000
800
Second:
600
2x + y  1500
400
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
All three
constraints:
y
1400
First:
1200
x + y  1000
1000
800
Second:
600
2x + y  1500
400
Third:
200
x
- 200
200
- 200
400
600
800
1000
1200
3x + 2y  2400
SOLUTION
1600
All three
constraints:
y
1400
First:
1200
x + y  1000
1000
800
Second:
600
2x + y  1500
400
Third:
200
x
- 200
200
- 200
400
600
800
1000
1200
3x + 2y  2400
Adding:
x  0 and y  0
SOLUTION
1600
Feasible region
is the unshaded
area and
satisfies:
y
1400
1200
1000
x + y  1000
800
2x + y  1500
600
3x + 2y  2400
400
x  0 and y  0
200
x
- 200
200
- 200
400
600
800
1000
1200
SOLUTION
1600
Evaluate the
objective function
x + 0.8y
at vertices of the
feasible region:
y
1400
1200
A
1000
800
B
O: 0 + 0 = 0
600
A: 0 + 0.8x1000
= 800
C
400
200
D
- 200
O
200
400
600
800
x
1000
1200
- 200
Maximum income = £800 at (400, 600)
B: 400 + 0.8x600
= 880
C: 600 + 0.8x300
= 840
D: 750 + 0 = 750