0% found this document useful (0 votes)
9 views

MILP_Examples I_solutions

The document provides an overview of Mixed Integer Linear Programming (MILP) with examples and applications in process optimization, particularly in chemical engineering. It discusses the formulation of MILP problems, the use of binary and integer variables, and logical constraints to model real-world scenarios such as reactor selection and ingredient blending. Additionally, it includes exercises and examples that illustrate the application of MILP in various manufacturing contexts.

Uploaded by

symy9f95dw
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)
9 views

MILP_Examples I_solutions

The document provides an overview of Mixed Integer Linear Programming (MILP) with examples and applications in process optimization, particularly in chemical engineering. It discusses the formulation of MILP problems, the use of binary and integer variables, and logical constraints to model real-world scenarios such as reactor selection and ingredient blending. Additionally, it includes exercises and examples that illustrate the application of MILP in various manufacturing contexts.

Uploaded by

symy9f95dw
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/ 43

ADVANCED PROCESS OPTIMISATION CENG0023

Mixed Integer Linear Programming


Examples I

Department of Chemical Engineering


University College London
MIXED INTEGER LINEAR PROGRAMMING
Problem MILP:

min z: z =c x+h y
T T

subject to: Ax + Gy ³ b
and: 𝑥 ≥ 0; 𝑦 ∈ {0,1}

(In GAMS parlance x POSITIVE variables


y BINARY variables)

References:
• H.P. Williams, “Model Building in Mathematical Programming’, Wiley (2013).
• D-S.C. Chen, R.G. Batson and Y. Dang, “Applied Integer Programming”,
Wiley (2011).
• C.A. Floudas, “Nonlinear and Mixed-integer Optimization: Fundamentals and
Applications”, Oxford University Press (1995).
Recap on Integer programming
Logic inference via integer programming

Let xi be the proposition “yi=1”

Then
x1 Ú x2 is equivalent to y1 + y2 ³ 1
x1 • x2 y1 = 1, y2 = 1
~ x1 y1 = 0
x1 ® x2 y1 - y2 £ 0
x1 « x2 y1 - y2 = 0
Why integer variables?

Example 1: Reactor Selection


A→B, 10 units of B to be produced
Cost of A: $50/unit mass
Max capacity
80% conversion
C1=75+14x1, x1>0 12.5

66.7% conversion
C2=55+10x2, x2>0 15

MINIMIZE TOTAL PROCESSING COST


Why integer variables?
To deal with fixed cost model:
• Define y1 = 1 Reactor 1 selected
=0 NOT
y2 = 1 Reactor 2 selected
=0 NOT

Formulation:
min z: z = 50( x1 + x2 ) + 14 x1 + 10 x2 + 75 y1 + 55 y2
subject to: 0.8 x1 + 0.667 x2 ³ 10
Logical constraints: x1 - 12.5 y1 £ 0
x2 - 15.0 y 2 £ 0
Upper bounds
x1 , x2 ³ 0 for reactor sizes
Summary

• First example showed how to set up an INDICATOR variable so


that
x >1Þ y =1
,
To do this, find a suitable UPPER BOUND (M) on x, and use the
LOGICAL CONSTRAINT
x- M y £0
• Second example showed how to deal with
y =1Þ x > 0
To do this, find a THRESHOLD (m) for x and use the LOGICAL
CONSTRAINT
x - my ³ 0
Summary

• Using similar “tricks”


y =1Þ åajxj £ b
j
is guaranteed by
åa xj
j j + M y £ M +b

where M is a suitable upper bound on åa x


j
j j -b

Also, åa x
j
j j £ b Þ y =1

is handled by å a x - (m - e ) y ³ b + e
j
j j

where e is a TOLERANCE for the constraint and m is a lower


bound on åa xj
j j -b
Tight Formulations
Example 2
A plant, if built, can manufacture N products in any quantity up to
Mi, i=1, 2, …N
let y=1 if plant is built; 0 otherwise
and xi quantity of i produced (0 ≤ 𝑥! ≤ 𝑀! )

To impose the condition yi = 0 ® xi = 0


We could use the single LOGICAL constraint
x1 + x2 + .. + x N - M y £ 0
where
M = M 1 + M 2 + .. + M N
or 𝑥! − 𝑀! 𝑦 ≤ 0 ∀𝑖 = 1. . 𝑁
gives a tighter formulation.
Tight Formulations
Example 3
• “If either A or B is manufactured then at least one of C, D or E
must be”.
We have already discussed
(x A Ú xB ) ® (xC Ú xD Ú xE )
The formulation derived in the lecture consisted of TWO
constraints:
y A + yB - 2 y £ 0
y - yC - y D - y E £ 0
Using a different argument, the first constraint can be replaced
by the TWO constraints:
yA - y £ 0
yB - y £ 0
Systematic Treatment of Logic
To go from arbitrary propositional logic statements into a set of mixed integer
constraints we need to derived their conjunctive normal form (CNF)

A CNF has the form: 𝑄! ∧ 𝑄" … ∧ 𝑄# , where 𝑄$ are


composite clauses.

How to obtain the CNF systematically?

Step 1: Replace any “implication” clause by the equivalent disjunction:


𝑃! ⇒ 𝑃" ⟺ ¬𝑃! ∨ 𝑃"

Step 2: Apply DeMorgan’s theorem to put the negations inward:


¬ 𝑃! ∧ 𝑃" ⇔ ¬𝑃! ∨ ¬𝑃"
¬ 𝑃! ∨ 𝑃" ⇔ ¬𝑃! ∧ ¬𝑃"

Step 3: Distribute logical operators OR/AND recursively using the


equivalence of:
𝑃! ∧ 𝑃" ∨ 𝑃% ⇔ 𝑃! ∨ 𝑃% ∧ 𝑃" ∨ 𝑃%

𝑄! ∧ 𝑄"
Exercises

• Logical constraints
• Blending
• Food manufacture (revisited)
• Commercial allocation
• Integer cuts
Problem 1: Logical Constraints

A manufacturing company can purchase up to five


ingredients: A, B, C, D and E. Formulate the following
cases as mixed integer linear programming constraints:

i) Select up to three out of five ingredients.


ii) Select at least two ingredients.
iii) If ingredient E is selected then A or B should be chosen.
iv) If only one B or C is chosen, then ingredient A should
not be selected.
Problem 1: Logical Constraints
A manufacturing company can purchase up to five ingredients: A,
B, C, D and E. Formulate the following cases as mixed integer
linear programming constraints:
i) Select up to three out of five ingredients.
ii) Select at least two ingredients.
iii) If ingredient E is selected then A or B should be chosen.
iv) If only one from B or C is chosen, then ingredient A should not
be selected.
Solution 2
i) 𝑌& + 𝑌' + 𝑌( + 𝑌) + 𝑌* ≤ 3
ii) 𝑌& + 𝑌' + 𝑌( + 𝑌) + 𝑌* ≥ 2

iii) 𝑋* → (𝑋& ∨ 𝑋' ) :𝑌* ≤ 𝑌& + 𝑌'


iv) 𝑌& ≤ 1 − 𝑌' + 𝑌( ; 𝑌& ≤ 1 − 𝑌( + 𝑌' . … (see next slide for derivation)

𝑤ℎ𝑒𝑟𝑒 𝑌& , 𝑌' , 𝑌( , 𝑌) , 𝑌* ∈ {0,1}


Problem 1: Logical Constraints
iv) If only one from B or C is chosen, then ingredient A should not be
selected.
• Let xi represent the proposition: “Ingredient i is selected”.
• We wish to impose(𝑋" ∧ ¬𝑋# ) ∨ (¬𝑋" ∧ 𝑋# ) → ~𝑋$

Step 1: Replace any “implication” clause by the equivalent disjunction:


𝑃! ⇒ 𝑃" ⟺ ¬𝑃! ∨ 𝑃"

Step1: ¬((𝑋" ∧ ¬𝑋# ) ∨ (¬𝑋" ∧ 𝑋# )) ∨ ¬𝑋$

Step 2: Apply DeMorgan’s theorem to put the negations inward:


¬ 𝑃! ∧ 𝑃" ⇔ ¬𝑃! ∨ ¬𝑃"
¬ 𝑃! ∨ 𝑃" ⇔ ¬𝑃! ∧ ¬𝑃"

Step2:(¬(𝑋" ∧ ¬𝑋# ) ∧ ¬(¬𝑋" ∧ 𝑋# )) ∨ ¬𝑋$ or


( (¬𝑿𝑩 ∨ 𝑿𝑪) ∧ (𝑿𝑩 ∨ ¬𝑿𝑪) ) ∨ ¬𝑿𝑨
Problem 1: Logical Constraints
If only one from B or C is chosen, then ingredient A should not be
selected.
Step2:( (¬𝑿𝑩 ∨ 𝑿𝑪) ∧ (𝑿𝑩 ∨ ¬𝑿𝑪) ) ∨ ¬𝑿𝑨
(𝑷𝟏 ∧ 𝑷𝟐 ) ∨ 𝑷𝟑
Step 3: Distribute logical operators OR/AND recursively using the
equivalence of:
𝑃! ∧ 𝑃" ∨ 𝑃% ⇔ 𝑃! ∨ 𝑃% ∧ 𝑃" ∨ 𝑃%
Step 3 :(¬𝑿𝑩 ∨ 𝑿𝑪 ∨ ¬𝑿𝑨) ∧ (𝑿𝑩 ∨ ¬𝑿𝑪 ∨ ¬𝑿𝑨) which is in CNF
form. Rewrite both clauses in terms of 0-1 variables.
•Let Yi=1 if and only if ingredient i is selected.

1 − 𝑌" + 𝑌# + (1 − 𝑌$ ) ≥ 1 → 𝒀𝑨 ≤ 𝟏 − 𝒀𝑩 + 𝒀𝑪
𝑌𝐵 + (1 − 𝑌# ) + (1 − 𝑌$ ) ≥ 1 → 𝒀𝑨≤ 𝟏 + 𝒀𝑩 − 𝒀𝑪
Problem 2: Blending
A blending company needs to purchase up to four out of five
ingredients A, B, C, D and E with unit costs (£/kg) 50, 80, 70, 60 and
90, respectively. The company has a potential market for the final
mixture up to 500 kg, sold at 200 £/kg. If an ingredient is purchased
then a minimum amount of 50 kg should be ordered. Also, due to
technical limitations, ingredient A should not be selected if only one
from B or C is chosen.
Formulate the above problem as a mixed integer linear programming
model, maximising the profit of the company.
Problem 2: Blending
XA, XB, XC, XD, XE = actual quantity of corresponding ingredient in the mixture
YA, YB, YC, YD, YE =1 if corresponding ingredient is in the mixture; 0 otherwise

𝑀𝑎𝑥 𝑍 = 200 𝑋& + 𝑋' + 𝑋( + 𝑋) + 𝑋* − 50𝑋& + 80𝑋' + 70𝑋( + 60𝑋) + 90𝑋*


(objective function)
Subject to

𝑌& + 𝑌' + 𝑌( + 𝑌) + 𝑌* ≤ 4 (maximum ingredients; up to 4 out of 5 )

𝑋& + 𝑋' + 𝑋( + 𝑋) + 𝑋* ≤ 500 (maximum market demand; 500kg)

50𝑌& ≤ 𝑋& ≤ 500𝑌& (lower/upper bounds amounts; 50/500 kg)


50𝑌' ≤ 𝑋' ≤ 500𝑌'
50𝑌( ≤ 𝑋( ≤ 500𝑌(
50𝑌) ≤ 𝑋) ≤ 500𝑌)
50𝑌* ≤ 𝑋* ≤ 500𝑌*

𝑌& ≤ 1 − 𝑌' + 𝑌( (logical constraints; only one B or C à no A)


𝑌& ≤ 1 + 𝑌' − 𝑌(

𝑋& , 𝑋' , 𝑋( , 𝑋) , 𝑋* ≥ 0 (optimisation variables)


𝑌& , 𝑌' , 𝑌( , 𝑌) , 𝑌* ∈ {0,1}
Problem 3: Food Manufacture (revisited)

• Maximum capacities of refining are 200 tons of vegetable oils and


250 non-vegetable oils for each month
• It is possible to store up to 1000 tons of raw oil at the cost of
£5/ton/month
• Manufactured products cannot be stored
• At the beginning of January there are 500 tons of each type of raw
oil in storage, which should exist at end of June
• There is a quality measure called, hardness. Hardness of the raw
oils are as below:
VEG 1 8.8
VEG 2 6.1
NON-VEG 1 2.0
NON-VEG 2 4.2
NON-VEG 3 5.0

• Hardness blends linearly and the hardness of the final product must
lie between 3 and 6 18
Problem 3: Food Manufacture (revisited)

Determine:
• In each month, how much raw oils to purchase, used for food
manufacture and sold

So as to:
• Maximise the overall profit (case A)

BUT
• Case B: If an oil is used in any month at least 100 tons must be used
• Case C: The food can be made up to 2 oils in any month

What new variables/constraints are required for cases B and C?


19
Problem 3: Food Manufacture (revisited)

quantity of raw oil i used in month t


Uit

quantity of
quantity of raw products
oil i purchased manufactured in
in month t month t
Bit Yt

quantity of raw oil i stored in month t


Sit

20
Problem 3: Food Manufacture (revisited)

Summary of the optimisation model (LP):


max 𝑃𝑃 % 𝑌# − % 𝑂𝑃$# 𝐵$# − 𝑆𝑃 % 𝑆$#
# $# $#
Subject to:
Material balance constraints
𝑆!" = 𝑆!,"$% + 𝐵!" − 𝑈!" ∀𝑖, 𝑡
Refining capacity constraints
𝑈&'(%," + 𝑈&'()," ≤ 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦_𝑉𝑒𝑔 ∀𝑡
𝑈*+*$&'(%," + 𝑈*+*$&'()," + 𝑈*+*$&'(,," ≤ 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦_𝑁𝑜𝑛_𝑉𝑒𝑔 ∀𝑡
Hardness quality constraints
ℎ𝑙𝑜 B 𝑌" ≤ ∑! ℎ𝑎𝑟𝑑𝑛𝑒𝑠𝑠! B 𝑈!" ≤ ℎ𝑢𝑝 B 𝑌" ∀𝑡
Production output levels
𝑌" = ∑! 𝑈!" ∀𝑡
Storage capacity constraints
𝑆!" ≤ 𝑆𝑡𝑜𝑟𝑎𝑔𝑒 ∀𝑖, 𝑡
𝑈!" , 𝐵!" , 𝑆!" ≥ 0

Total profit = £107,843 21


Problem 3: Food Manufacture (revisited)

Binary variable:
𝐸!, = 1 𝑖𝑓 𝑜𝑖𝑙 𝑖 𝑖𝑠 𝑢𝑠𝑒𝑑 𝑑𝑢𝑟𝑖𝑛𝑔 𝑚𝑜𝑛𝑡ℎ 𝑡; 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

• Case B: If an oil is used in a month at least 100 tons must be used

100 𝐸!, ≤ 𝑈!, ∀𝑖, 𝑡


and
𝑈!, ≤ 𝑀𝑖 𝐸!, ∀𝑖, 𝑡
where Mi is the maximum refining capacity for oil i.

• Case C: The food can be made up to 2 oils in any month


N 𝐸!, ≤ 2 ∀𝑡
!
22
Problem 3: Food Manufacture (revisited)
Summary of the optimisation model (MILP):
max 𝑃𝑃 % 𝑌# − % 𝑂𝑃$# 𝐵$# − 𝑆𝑃 % 𝑆$#
# $# $#
Subject to:
Material balance constraints
𝑆$# = 𝑆$,#&' + 𝐵$# − 𝑈$# ∀𝑖, 𝑡
Refining capacity constraints
𝑈()*',# + 𝑈()*+,# ≤ 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦_𝑉𝑒𝑔 ∀𝑡
𝑈,-,&()*',# + 𝑈,-,&()*+,# + 𝑈,-,&()*.,# ≤ 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦_𝑁𝑜𝑛_𝑉𝑒𝑔 ∀𝑡
Hardness quality constraints
ℎ𝑙𝑜 A 𝑌# ≤ ∑$ ℎ𝑎𝑟𝑑𝑛𝑒𝑠𝑠$ A 𝑈$# ≤ ℎ𝑢𝑝 A 𝑌# ∀𝑡
Production output levels
𝑌# = ∑$ 𝑈$# ∀𝑡
Storage capacity constraints
𝑆$# ≤ 𝑆𝑡𝑜𝑟𝑎𝑔𝑒 ∀𝑖, 𝑡
Case B: If an oil is used in a month at least 100 tons must be used
100 𝐸$# ≤ 𝑈$# ∀𝑖, 𝑡
𝑈$# ≤ 𝑀𝑖 𝐸$# ∀𝑖, 𝑡
Case C: The food can be made up to 2 oils in any month
% 𝐸$# ≤ 2 ∀𝑡
$
𝑈!" , 𝐵!" , 𝑆!" ≥ 0; 𝐸!" 𝜖 0,1 23
Problem 3: Food Manufacture (revisited)

TOTAL PROFIT
CASE A (LP) £107,843
CASE B (MILP) £107,250
CASE C (MILP) £99,000

24
Problem 4: Commercials Allocation
Given:
• The estimated impact of allocating zero, one, two, or three TV spots
to each product i.

• This impact is measured in terms of the profit (in units of millions of £)


from the additional sales that would result from the spots, considering
also the cost of producing the commercial and purchasing the spots.
• Note: pij: profit when j TV spots are used for product i
25
Problem 4: Commercials Allocation

Determine:
• allocation of five spots to the products

So as to:
• maximise the total profit.

26
Problem 4: Commercials Allocation

What are the decisions need to be modelled/made in order to solve the


problem?

Indices
i = product: Product1, Product2, and Product3
j = number of spots: 1, 2, and 3

27
Problem 4: Commercials Allocation

Integer Variables
𝑋! : number of TV spots allocated to the product i

𝑋-./012,3 = 0, 1, 2, 3

𝑋-./012,4 = 0, 1, 2, 3

𝑋-./012,5 = 0, 1, 2, 3

28
Problem 4: Commercials Allocation
Auxiliary Binary Variable
1, 𝑖𝑓𝑋! = 𝑗, 𝑖. 𝑒. , 𝑗 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 𝑖
𝑌!6 = Q
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑌/01234#','
1, 𝑖𝑓 1 𝑇𝑉 𝑠𝑝𝑜𝑡 𝑖𝑠 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 1
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑌/01234#',+
1, 𝑖𝑓 2 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 1 𝑌/01234#.,'
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 1, 𝑖𝑓 1 𝑇𝑉 𝑠𝑝𝑜𝑡 𝑖𝑠 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 3
=L
𝑌/01234#',. 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1, 𝑖𝑓 3 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 1 𝑌/01234#.,+
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 1, 𝑖𝑓 2 𝑇𝑉 𝑠𝑝𝑜𝑡 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 3
=L
𝑌/01234#+,' 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1, 𝑖𝑓 1 𝑇𝑉 𝑠𝑝𝑜𝑡 𝑖𝑠 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 2 𝑌/01234#.,.
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 1, 𝑖𝑓 3 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 3
=L
𝑌/01234#+,+ 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1, 𝑖𝑓 2 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 2
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
𝑌/01234#+,.
1, 𝑖𝑓 3 𝑇𝑉 𝑠𝑝𝑜𝑡𝑠 𝑎𝑟𝑒 𝑎𝑙𝑙𝑜𝑐𝑎𝑡𝑒𝑑 𝑡𝑜 𝑝𝑟𝑜𝑑𝑢𝑐𝑡 2 29
=L
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Problem 4: Commercials Allocation

Logical constraint:

The number of TV spots can be expressed by the binary variables.

𝑋! = N 𝑗 X 𝑌!6 , ∀𝑖
6

𝑋! = 1 X 𝑌!,3 + 2 X 𝑌!,4 + 3 X 𝑌!,5 ,


= 𝑌!,3 + 2𝑌!,4 + 3𝑌!,5 ∀𝑖

30
Problem 4: Commercials Allocation

Logical constraint for product 1:


𝑋-./012,3 = 𝑌-./012,3,3 + 2𝑌-./012,3,4 + 3𝑌-./012,3,5

Logical constraint for product 2:


𝑋-./012,4 = 𝑌-./012,4,3 + 2𝑌-./012,4,4 + 3𝑌-./012,4,5

Logical constraint for product 3:


𝑋-./012,5 = 𝑌-./012,5,3 + 2𝑌-./012,5,4 + 3𝑌-./012,5,5

31
Problem 4: Commercials Allocation

Allocation constraints:

For each product, among the options of 1 TV spot, 2 TV spots, and 3


spots, at most one option can be chosen.

! 𝑌NM ≤ 1, ∀𝑖
M

If LHS = 0 (ie. all Yij variables are equal to 0), then 0 TV spot is allocated
to product i.

32
Problem 4: Commercials Allocation

Allocation constraint for product 1:


𝑌OPQRSTUV,V + 𝑌OPQRSTUV,W + 𝑌OPQRSTUV,X ≤ 1

Allocation constraint for product 2:

𝑌OPQRSTUW,V + 𝑌OPQRSTUW,W + 𝑌OPQRSTUW,X ≤ 1

Allocation constraint for product 3:


𝑌OPQRSTUX,V + 𝑌OPQRSTUX,W + 𝑌OPQRSTUX,X ≤ 1

33
Problem 4: Commercials Allocation

Total TV Spots Number constraint:

The summation of number of TV spots allocated to each product should


be equal to the total number of TV spots (5 in this example, denoted by
TotalSpotNo).

! 𝑋N = 𝑇𝑜𝑡𝑎𝑙𝑆𝑝𝑜𝑡𝑁𝑜
N

34
Problem 4: Commercials Allocation

Total TV Spots Number constraint:

𝑋-./012,3 + 𝑋-./012,4 + 𝑋-./012,5 = 5

Total number of available


total number of TV spots allocated
TV spots

35
Problem 4: Commercials Allocation

Objective function is to maximise the total profit

max 𝑧 = N 𝑝!6 𝑌!6


!,6

𝑧 = 1𝑌-./012,3,3 + 3𝑌-./012,3,4 + 3𝑌-./012,3,5 +


0𝑌-./012,4,3 + 2𝑌-./012,4,4 + 2𝑌-./012,4,5 −
1𝑌-./012,5,3 + 2𝑌-./012,5,4 + 4𝑌-./012,5,5

36
Problem 4: Commercials Allocation

Number of TV spots of each variable should take only


integer values
XProduct1, XProduct2 , XProduct3 ={1,2,3}

Variables Yij should take only binary values:


YProduct1,1 , YProduct1,2 , YProduct1,3 , YProduct2,1 , YProduct2,2 , YProduct2,3 ,
YProduct3,1 , YProduct3,2 , YProduct3,3 ={0,1}

37
Problem 4: Commercials Allocation
Summary of the optimisation model:
𝑚𝑎𝑥 𝑧 = N 𝑝!6 𝑌!6
!,6
Subject to:
Logical constraints:
𝑋! = N 𝑗 X 𝑌!6 , ∀𝑖
6
Allocation constraints:
N 𝑌!6 ≤ 1, ∀𝑖
6
Total TV spot number constraints:
N 𝑋! = 𝑇𝑜𝑡𝑎𝑙𝑆𝑝𝑜𝑡𝑁𝑜
!
Xi={1,2,3}; Yij = {0,1} 38
Problem 4: Commercials Allocation

3
No of TV spots

0
Product1 Product2 Product3

Total profit= £7,000,000


39
Problem 5 – Integer Cuts

Many optimisation problems involving integer variables are solved


iteratively (for example, Outer-Approximation solution procedure for
MINLP problems). Usually, one common step of these solution
algorithms is the introduction of an extra constraint (integer cut) at
each iteration in the master problem (0-1 programming problem) in
order to make infeasible the choice of binary vectors obtained from
previous iterations. Develop such an integer cut.
Solution of Problem 5

Y 𝑌$ − Y 𝑌$ ≤ 𝑐𝑎𝑟𝑑 𝑈 − 1
$∈1 $∈2
where
U: set of i where Yi=1 at previous iteration;
L: set of i where Yi=0 at previous iteration,
card(U) denotes the cardinality of set U (i.e. how many members)

Examples:
Yi 1 2 3 4 5
Ex 1 1 1 0 0 1
Ex 2 0 1 1 1 1
Solution of Problem 5

Y 𝑌$ − Y 𝑌$ ≤ 𝑐𝑎𝑟𝑑 𝑈 − 1
$∈1 $∈2

Example1:

Yi 1 2 3 4 5
Ex 1 1 1 0 0 1

Ex1: (1,1,0,0,1)
𝑌! + 𝑌" + 𝑌3 − 𝑌% − 𝑌4 ≤ 3 − 1 = 2
If we replace above solution, we have 1+1+1-0-0 =3 ≤2. which is not
allowed.
Solution of Problem 5

Y 𝑌$ − Y 𝑌$ ≤ 𝑐𝑎𝑟𝑑 𝑈 − 1
$∈1 $∈2

Example 2:
Yi 1 2 3 4 5
Ex 2 0 1 1 1 1

Ex2: (0,1,1,1,1)
𝑌" + 𝑌% + 𝑌4 + 𝑌3 − 𝑌! ≤ 3

If we replace above solution, we have 1+1+1+1-0 =4 ≤3. which is not


allowed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy