0% found this document useful (0 votes)
110 views4 pages

J. E. Beasley: Solution

The document describes an integer programming formulation for a blending problem with additional constraints. Specifically: - The blending problem involves determining amounts of 3 ingredients to mix that meet nutrient constraints at minimum cost. - Two new constraints are added: a fixed cost if ingredient 2 is used, and allowing violation of one nutrient constraint. - Zero-one variables are introduced to model the fixed cost and which constraints can be violated. - The new integer programming model is presented with the objective of minimizing costs subject to blending, cost, and nutrient constraint conditions.

Uploaded by

Fahmi Arrasyid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views4 pages

J. E. Beasley: Solution

The document describes an integer programming formulation for a blending problem with additional constraints. Specifically: - The blending problem involves determining amounts of 3 ingredients to mix that meet nutrient constraints at minimum cost. - Two new constraints are added: a fixed cost if ingredient 2 is used, and allowing violation of one nutrient constraint. - Zero-one variables are introduced to model the fixed cost and which constraints can be violated. - The new integer programming model is presented with the objective of minimizing costs subject to blending, cost, and nutrient constraint conditions.

Uploaded by

Fahmi Arrasyid
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Beasley — Integer Programming [:4] 1

J. E. Beasley
http://people.brunel.ac.uk/~mastjjb/jeb/or/moreip.html

The main areas in which IP is used in practice include:

• imposition of logical conditions in LP problems (such as the either/or


condition)
• blending with a limited number of ingredients
• depot location
• job shop scheduling
• assembly line balancing
• airline crew scheduling
• timetabling

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
The ingredients have the following nutrient values and cost
A B C D Cost/kg
Ingredient 1 (gram/kg) 100 80 40 10 40
Ingredient 2 (gram/kg) 200 150 20 - 60
What should be the amounts of active ingredients and filler in one kg of feed mix?

Solution
Variables
In order to solve this problem it is best to think in terms of 1 kg of feed mix. That
kilogram is made up of three parts; ingredient 1, ingredient 2 and filler. So: let
x1 = amount (kg) of ingredient 1 in 1 kg of feed mix
x2 = amount (kg) of ingredient 2 in 1 kg of feed mix
x3 = amount (kg) of filler in 1 kg of feed mix
where x1, x2, x3 >= 0.
Constraints
• balancing constraint (implicit constraint due to the definition of the variables)
x1 + x2 + x3 = 1
• nutrient constraints
100x1 + 200x2 >= 90 (nutrient A)
80x1 + 150x2 >= 50 (nutrient B)
40x1 + 20x2 >= 20 (nutrient C)
10x1 >= 2 (nutrient D)
Beasley — Integer Programming [:4] 2

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 1 kg of feed
mix.
Objective
Presumably to minimise cost, i.e.
minimise 40x1 + 60x2
which gives us our complete LP model for the blending problem:
[max ]z = 40 x1 + 60 x 2
s. to x1 + x2 + x3 = 1
100 x1 + 200 x 2 ≥ 90
80 x1 + 150 x 2 ≥ 50
40 x1 + 20 x 2 ≥ 20
10 x1 ≥ 2
In Lindo:
! Beasley "Animal feed"
! http://people.brunel.ac.uk/~mastjjb/jeb/or/moreip.html
! "Linear Programming" X=0.3667 0.2667 0.3667, z*=30.67
min 40x1 + 60x2 + 0x3
st
x1 + x2 + x3 = 1
100 x1 +200 x2 > 90
80 x1 +150 x2 > 50
40 x1 + 20 x2 > 20
10 x2 > 2
end

Suppose now we have the additional conditions:


• if we use any of ingredient 2 we incur a fixed cost of 15
• we need not satisfy all 4 nutrient constraints but need only satisfy 3 of them (i.e.
whereas before the optimal solution required all 4 nutrient constraints to be
satisfied now the optimal solution could (if it is worthwhile to do so) only have
3 (any 3) of these nutrient constraints satisfied and the 4.th violated.
Give the complete MIP formulation of the problem with these two new conditions
added.

Solution
To cope with the condition that if x2>=0 we have a fixed cost of 15 incurred
we have the standard trick of introducing a zero-one variable y defined by
y = 1 if x2>=0
= 0 otherwise
and
• add a term +15y to the objective function
and add the additional constraint
Beasley — Integer Programming [:4] 3

• x2 <= [largest value x2 can take]y


In this case it is easy to see that x2 can never be greater than one and hence our
additional constraint is x2<= y.
To cope with condition that need only satisfy 3 of the 4 nutrient constraints,
we introduce 4 zero-one variables zi (i =1..4) where
zi = 1 if nutrient constraint i (i=1,2,3,4) is satisfied
= 0 otherwise
and add the constraint
• z1+z2+z3+z4 >= 3 (at least 3 constraints satisfied)
and alter the nutrient constraints to be

• 100x1 + 200x2 >= 90z1


• 80x1 + 150x2 >= 50z2
• 40x1 + 20x2 >= 20z3
• 10x1 >= 2z4
The logic behind this change is that if a zi=1 then the constraint becomes the
original nutrient constraint which needs to be satisfied. However if a zi=0 then the
original nutrient constraint becomes
• same left-hand side >= zero
which (for the 4 left-hand sides dealt with above) is always true and so can be
neglected — meaning the original nutrient constraint need not be satisfied. Hence the
complete (MIP) formulation of the problem is given by
minimise 40x1 + 60x2 + 15y
subject to
x1 + x2 + x3 = 1
100x1 + 200x2 >= 90z1
80x1 + 150x2 >= 50z2
40x1 + 20x2 >= 20z3
10x1 >= 2z4
z1 + z2 + z3 + z4 >= 3
x2 <= y
zi = 0 or 1 i=1,2,3,4
y = 0 or 1
xi >= 0 i=1,2,3

[min ]z = 40 x1 + 60 x 2 + 0 x3 + 15 y + 0 z1 + 0z2 + 0 z3 + 0z4


s. to x1 + x2 + x3 = 1
100 x1 + 200 x 2 − 90 z1 ≥ 0
80 x1 + 150 x 2 − 50 z 2 ≥ 0
40 x1 + 20 x 2 − 20 z 3 ≥ 0
10 x1 − 2z4 ≥ 0
x2 −1 ≤ 0
z1 + z2 + z3 + z4 ≥ 3
with y, z binary.
Beasley — Integer Programming [:4] 4

In Lindo:
! Beasley "Animal feed"
! http://people.brunel.ac.uk/~mastjjb/jeb/or/moreip.html
! Beasley "Animal feed"
! http://people.brunel.ac.uk/~mastjjb/jeb/or/moreip.html
! "Integer Programming" X=0.9 0 0.1 0 1 1 1 0, z*=36
min 40x1 + 60x2 + 0x3 + 15y
st
x1 + x2 + x3 = 1
100 x1 +200 x2 - 90 z1 > 0
80 x1 +150 x2 - 50 z2 > 0
40 x1 + 20 x2 - 20 z3 > 0
10 x2 - 2 z4 > 0
x2 - y < 0
z1 + z2 + z3 + z4 > 3
end
int y
int z1
int z2
int z3
int z4

You might also like