Lecture 7 Linearization of a Quadratic Assignment Problem
Lecture 7 Linearization of a Quadratic Assignment Problem Indicator Variables 1
Outline è Linearization of a Quadratic Assignment Problem è Indicator Variables 2
Linearization of a Quadratic Assignment Problem 3
Example 4
Linearization of the Quadratic Assignment Problem ènon-linear objective function with terms such as ij kl èto linearize the non-linear term ij kl èlet ijkl = ij kl èneed to ensure that ijkl = 1 ij kl = 1 5
Linearization of the Quadratic Assignment Problem è ijkl = 1 ij kl = 1 è ijkl = 1 ij = 1 and kl = 1 è two parts è ijkl = 1 ij = 1 and kl = 1 è ij = 1 and kl = 1 ijkl = 1 è tricks è ijkl ij and ijkl kl è ij + kl 1 + ijkl 6
Linearization of the Quadratic Assignment Problem è drawback of the method èaddition of one variable and three constraints for one cross-product èn(n 1)/2 cross products for n ij’s è any method to add less variables or less constraints 7
Linearization of the Quadratic Assignment Problem è three cross-products 2 1 2+3 1 4 of four variables 1, 2, 3, 4 è the previous method: 3 new variables and 9 new constraints è another method with 1 new variable and 3 new constraints 8
Linearization of the Quadratic Assignment Problem è let w = 2 1 2+3 1 4 = 1(2 2+3 3 4) è hope to have: 1 = 1 w = 2 2+3 3 4, and 1 = 0 w = 0 è possible values of w {-1, 0, 1, 2, 3, 4, 5} è 1 = 0 w = 0: w 5 1 è how to model 1 = 1 w = 2 2+3 3 4? 9
Linearization of the Quadratic Assignment Problem è to model 1 = 1 w = 2 2+3 3 4 è w = 2 2+3 3 4 w 2 2+3 3 4 and w 2 2+3 3 4 è 1 = 1 w 2 2+3 3 4 and w 2 2+3 3 4 è when 1 = 1: two valid constraints w 2 2+3 3 4 and w 2 2+3 3 4 è when 1 = 0: two redundant constraints è w 2 2+3 3 4+5 5 1 and w 2 2+3 3 4+5 1 5 è mind that when 1 = 0, w = 0 by w 5 1 10
Indicator Variables 11
To Model the Setup Cost è cost to produce x items, x {0, 1, 2, …} c(x) = 0 if x = 0, and c(x) = f + ax if x > 0 è suppose there exists = 1 x > 0, i. e. , = 1 for x > 0 and = 0 for x = 0 è then c(x) = f + ax è Question: how to construct such a ? 12
To Model the Setup Cost è = 1 x > 0 means that = 1 x > 0 and x > 0 = 1 è let max{0, x} < M and > 0 such that M is practically infinity and < 1 è to model = 1 x > 0 to model è x è to model x > 0 = 1 to model è x M è to model = 1 x > 0 to model è x and x M 13
To Model the Setup Cost è cost to produce x items, x {0, 1, 2, …} c(x) = 0 if x = 0, and c(x) = 10 + 4 x, if x > 0 è if there exists = 1 x > 0, then c(x) = 10 +4 x è question: how to define such a ? è x > 0 = 1 and = 1 x > 0 14
To Model the Setup Cost è x > 0 = 1 è let M be a large positive number è x M è = 1 x > 0 è ( = 1 x > 0) (x = 0) è let be a small positive number è x 15
To Model the Setup Cost è cost to produce x items, x {0, 1, 2, …} c(x) = 0 if x = 0, and c(x) = 10 + 4 x, if x > 0 è then c(x) = 10 + 4 x, where è x, and è x M (plus some other constraints for x) 16
Simplifying the Formulation by Problem Structure è minimization è min c(x) = 10 + 4 x, where x M (plus some other constraints for x) è question: is it possible to omit x? èfunction of the constraint: x = 0 èfor minimization, even without the constraint, will be forced to 0 at minimum if x = 0 17
An Indicator to Represent a -Constraint 18
Context è two types of goods, type 1 and type 2 è weight of each piece ètype 1: 2 ton ètype 2: 5 ton è capacity of a truck: 9 ton 19
Model = 1 -Constraint è let be the number of trucks decided by the manager è if is set to 1, i. e. , the manager has decided to use 1 truck, x 1 and x 2 satisfy certain relationship è = 1 2 x 1 + 5 x 2 9 è how to model the relationship between and the constraint 2 x 1 + 5 x 2 9? è need to have something è giving 2 x 1 + 5 x 2 9 if = 1 è Having no effect if = 0 è 2 x 1 + 5 x 2 + M M + 9 20
Model -Constraint = 1 è let be the number of trucks è if the amount of goods 9 ton, only one vehicle is needed è 2 x 1 + 5 x 2 9 = 1 è how to model the relationship between and the constraint 2 x 1 + 5 x 2 9? è need to have something è when 2 x 1 + 5 x 2 9, = 1 è Having no effect if 2 x 1 + 5 x 2 > 9 è 9 2 x 1 5 x 2 + M 2 x 1 + 5 x 2 + M 9+ 21
Model = 1 -Constraint è = the number or trucks used è = 1 iff the amount of good is no more than 9 ton è combining the two cases è 2 x 1 + 5 x 2 + M M + 9 and 2 x 1 + 5 x 2 + M 9+ è consider 2 x 1 + 5 x 2 + M 9+ è = 0 2 x 1 + 5 x 2 + M 9+ = 0 2 x 1 + 5 x 2 > 9 2 x 1 + 5 x 2 9 = 1 22
An Indicator to Represent a -Constraint 23
Model = 1 -Constraint è let be the indicator that the manager orders wasting no capacity è If the manager orders wasting no capacity, the truck is loaded at least to full capacity è = 1 2 x 1 + 5 x 2 9 è how to model the relationship between and the constraint 2 x 1 + 5 x 2 9? è need to have something è if = 1, 2 x 1 + 5 x 2 9 è if = 0, the manager has said nothing, the truck may or may not loaded to capacity è 2 x 1 + 5 x 2 + M M + 9 24
Model -Constraint = 1 è now suppose that there is no wasted capacity only if the manager has said so è 2 x 1 + 5 x 2 9 = 1 è how to model the relationship between and the constraint 2 x 1 + 5 x 2 9? è need to have something èif 2 x 1 + 5 x 2 9, = 1 èif 2 x 1 + 5 x 2 < 9, there is no constraint on è 2 x 1 + 5 x 2 ≤ M + 9 - 25
Model -Constraint = 1 è combining the previous two cases è 2 x 1 + 5 x 2 + M M + 9 and 2 x 1 + 5 x 2 ≤ M + 9 - 26
An Indicator to Represent a =-Constraint 27
=-Constraint è an equality constraint an - constraint and an -constraint 28
Model = 1 =-Constraint è = 1 2 x 1 + 5 x 2 = 9 = 1 (2 x 1 + 5 x 2 9 and 2 x 1 + 5 x 2 9) è from the previous results 2 x 1 + 5 x 2 + M M + 9, and 2 x 1 + 5 x 2 + M M + 9 29
Model =-Constraint = 1 è 2 x 1 + 5 x 2 = 9 = 1 = 0 2 x 1 + 5 x 2 9 è 2 x 1 + 5 x 2 9: either 2 x 1 + 5 x 2 < 9 or 2 x 1 + 5 x 2 > 9, but not both è from previous results: 2 x 1 + 5 x 2 + M 1 9 + , 2 x 1 + 5 x 2 + M 2 + 9 1 + 2 = + 1 30
Model =-Constraint = 1 è to model 2 x 1 + 5 x 2 = 9 iff = 1 M + 9, è 2 x 1 + 5 x 2 + M 1 9 + , è 2 x 1 + 5 x 2 M 2 + 9, è 1 + 2 = + 1. è 2 x 1 + 5 x 2 + M 31
- Slides: 31