Formulation Examples
Formulation Examples
Formulation Examples
A cargo plane has three compartments for storing cargo: front, centre
and rear. These compartments have the following limits on both weight
and space:
Compartment Weight capacity (tonnes) Space capacity (cubic metres)
Front 10 6800
Centre 16 8700
Rear 8 5300
Furthermore, the weight of the cargo in the respective compartments
must be the same proportion of that compartment's weight capacity to
maintain the balance of the plane.
The following four cargoes are available for shipment on the next flight:
Cargo Weight (tonnes) Volume (cubic metres/tonne) Profit (/tonne)
C1 18 480 310
C2 15 650 380
C3 23 580 350
C4 12 390 285
Any proportion of these cargoes can be accepted. The objective is to
determine how much (if any) of each cargo C1, C2, C3 and C4 should
be accepted and how to distribute each among the compartments so
that the total profit for the flight is maximised.
Formulate the above problem as a linear program
What assumptions are made in formulating this problem as a linear program?
Briefly describe the advantages of using a software package to solve the above
linear program, over a judgemental approach to this problem.
Solution
Variables
We need to decide how much of each of the four cargoes to put in each
of the three compartments. Hence let:
xij be the number of tonnes of cargo i (i=1,2,3,4 for C1, C2, C3 and C4
respectively) that is put into compartment j (j=1 for Front, j=2 for
Centre and j=3 for Rear) where xij >=0 i=1,2,3,4; j=1,2,3
Note here that we are explicitly told we can split the cargoes into any
proportions (fractions) that we like.
Constraints
cannot pack more of each of the four cargoes than we have available
x11 + x12 + x13 <= 18
x21 + x22 + x23 <= 15
x31 + x32 + x33 <= 23
x41 + x42 + x43 <= 12
the weight capacity of each compartment must be respected
[x11 + x21 + x31 + x41]/10 = [x12 + x22 + x32 + x42]/16 = [x13 + x23 + x33 +
x43]/8
Objective
Solution
Variables
Constraints
floor space
Objective
Variables
Let
Pt be the production (units) in month t (t=3,...,8)
Iit be the number of units in stock at the end of month t which were
produced in month i (i=t,t-1,t-2)
Sit be the number of units in stock at the beginning of month t which
were produced in month i (i=t-1,t-2)
dit be the demand in month t met from units produced in month i (i=t,t-
1,t-2)
Constraints
production limit
Pt <= 6000
initial stock position
I22 = 1000
I12 = 2000
I02 = 500
relate opening stock in month t to closing stock in previous months
St-1,t = 0.89It-1,t-1
St-2,t = 0.53It-2,t-1
inventory continuity equation where we assume we can meet demand in month t
from production in month t. Let Dt represent the (known) demand for the product
in month t (t=3,4,...,8) then
Objective
Solution
Variables
Let
xi = amount of product i produced (i=1,2,3,4)
tBA be the amount of time transferred from B to A
tCA be the amount of time transferred from C to A
Constraints
maximum demand
x1 <= 50
x2 <= 60
x3 <= 85
x4 <= 70
ratio
Objective
Solution
Variables
Constraints
Objective
Consider the production of tin cans which are stamped from metal
sheets. A can consists of a main body and two ends,. We have 4
possible stamping patterns (involving 2 different types (sizes) of metal
sheet). as shown below
Variables
Let
xi be the number of patterns of type i (i=1,2,3,4) stamped per week
y be the number of cans produced per week
Note xi >= 0 i=1,2,3,4 and y >= 0 and again we assume that the xi
and y are large enough for fractional values not to be significant.
Constraints
time available
x1 + x3 + x4 <= L1 (sheet 1)
x2 <= L2 (sheet 2)
number of cans produced
Objective
neither constraint (B) nor constraint (C) is satisfied with equality i.e. y <
(7x1+4x2+3x3+9x4 )/2 and y < (x1+4x2+2x3) - but in this case we can increase y
(without changing any xi values), increasing the objective function (assuming P +
c1 + 2c2 >0) and contradicting the statement (above) that we already had the
optimal solution.
Hence case (b) cannot occur and so case (a) is valid - replacing
constraint (A) by constraints (B) and (C) generates a valid LP
formulation of the problem.
Note that this problem illustrates that even if our initial formulation of
the problem is non-linear we may be able to transform it into an LP.
Note too that it is relatively easy to extend the LP formulation of the
problem to cope with the situation where can bodies/ends unused at
the end of one week are available for production the following week.
Variables
Constraints
x1 <= 100
x2 <= 110
number of assembled products produced
We produce (7x1 + 6x2) part 1 units, (6x1 + 11x2) part 2 units and (9x1
+ 5x2) part 3 units. Now to ensure that the number of assembled
products produced is exactly y we need at least y part 1 units, at least
y part 2 units and at least y part 3 units. Hence we have the three
constraints
7x1 + 6x2 >= y
6x1 + 11x2 >= y
9x1 + 5x2 >= y
the total number of parts (of all types) produced is (7x1 + 6x2) + (6x1 + 11x2) +
(9x1 + 5x2) = 22x1 + 22x2. Since we produce exactly y assembled products the
number of parts left over at the end of the week is (22x1 + 22x2) - 3y and hence
the constraint relating to the limited storage space is given by
Objective