Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 7 Linearization of a Quadratic Assignment Problem Indicator Variables.

Similar presentations


Presentation on theme: "1 Lecture 7 Linearization of a Quadratic Assignment Problem Indicator Variables."— Presentation transcript:

1 1 Lecture 7 Linearization of a Quadratic Assignment Problem Indicator Variables

2 2 Outline  Linearization of a Quadratic Assignment Problem  Indicator Variables

3 3 Linearization of a Quadratic Assignment Problem

4 4 Example

5 5 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

6 6 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

7 7 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

8 8 Linearization of the Quadratic Assignment Problem  three cross-products 2  1  2 +3  1  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

9 9 Linearization of the Quadratic Assignment Problem  let w = 2  1  2 +3  1  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 ?

10 10 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

11 11 Indicator Variables

12 12 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  ?

13 13 To Model the Setup Cost   = 1  x > 0 means that  = 1  x > 0 and x > 0   = 1  let max{0, x} 0 such that M is practically infinity and 0 such that M is practically infinity and  < 1  to model  to model  = 1  x > 0  x   x    to model  to model x > 0   = 1 x  Mx  Mx  Mx  M  to model  to model  = 1  x > 0  x and x  M    x and x  M 

14 14 To Model the Setup Cost  cost to produce x items, x  {0, 1, 2, …} c(x) = 0 if x = 0, and c(x) = 10 + 4x, if x > 0  if there exists  = 1  x > 0, then c(x) = 10  +4x  question: how to define such a  ?  x > 0   = 1 and  = 1  x > 0

15 15 To Model the Setup Cost  x > 0   = 1  let M be a large positive number x  Mx  Mx  Mx  M   = 1  x > 0  (  = 1  x > 0)  (x = 0   = 0)  let  be a small positive number    x

16 16 To Model the Setup Cost  cost to produce x items, x  {0, 1, 2, …} c(x) = 0 if x = 0, and c(x) = 10 + 4x, if x > 0  then c(x) = 10  + 4x, where    x, and  x  M  (plus some other constraints for x)

17 17 Simplifying the Formulation by Problem Structure  minimization  min c(x) = 10  + 4x, where x  M  (plus some other constraints for x)  question: is it possible to omit   x?  function of the constraint: x = 0   = 0  for minimization, even without the constraint,  will be forced to 0 at minimum if x = 0

18 18 An Indicator to Represent a  -Constraint

19 19 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

20 20 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  2x 1 + 5x 2  9  how to model the relationship between  and the constraint 2x 1 + 5x 2  9?  need to have something  giving 2x 1 + 5x 2  9 if  = 1  Having no effect if  = 0  2x 1 + 5x 2 + M   M + 9

21 21 Model  -Constraint   = 1  let  be the number of trucks  if the amount of goods  9 ton, only one vehicle is needed  2x 1 + 5x 2  9   = 1  how to model the relationship between  and the constraint 2x 1 + 5x 2  9?  need to have something  when 2x 1 + 5x 2  9,  = 1  Having no effect if 2x 1 + 5x 2 > 9  9  2x 1  5x 2 +   M   2x 1 + 5x 2 + M   9+ 

22 22 Model  = 1   -Constraint   = the number or trucks used   = 1 iff the amount of good is no more than 9 ton  combining the two cases  2x 1 + 5x 2 + M   M + 9 and 2x 1 + 5x 2 + M   9+   consider 2x 1 + 5x 2 + M   9+    = 0  2x 1 + 5x 2 + M   9+    = 0  2x 1 + 5x 2 > 9  2x 1 + 5x 2  9   = 1

23 23 An Indicator to Represent a  -Constraint

24 24 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  2x 1 + 5x 2  9  how to model the relationship between  and the constraint 2x 1 + 5x 2  9?  need to have something  if  = 1, 2x 1 + 5x 2  9  if  = 0, the manager has said nothing, the truck may or may not loaded to capacity  2x 1 + 5x 2 + M  M  + 9

25 25 Model  -Constraint   = 1  now suppose that there is no wasted capacity only if the manager has said so  2x 1 + 5x 2  9   = 1  how to model the relationship between  and the constraint 2x 1 + 5x 2  9?  need to have something  if 2x 1 + 5x 2  9,  = 1  if 2x 1 + 5x 2 < 9, there is no constraint on   2x 1 + 5x 2 ≤ M  + 9 - 

26 26 Model  -Constraint   = 1  combining the previous two cases  2x 1 + 5x 2 + M  M  + 9 and 2x 1 + 5x 2 ≤ M  + 9 - 

27 27 An Indicator to Represent a =-Constraint

28 28 =-Constraint  an equality constraint  an  - constraint and an  -constraint

29 29 Model  = 1  =-Constraint   = 1  2x 1 + 5x 2 = 9   = 1  (2x 1 + 5x 2  9 and 2x 1 + 5x 2  9)  from the previous results 2x 1 + 5x 2 + M  M  + 9, and 2x 1 + 5x 2 + M  M  + 9

30 30 Model =-Constraint   = 1  2x 1 + 5x 2 = 9   = 1   = 0  2x 1 + 5x 2  9  2x 1 + 5x 2  9: either 2x 1 + 5x 2 9, but not both  from previous results: 2x 1 + 5x 2 + M  1  9 + , 2x 1 + 5x 2 +   M  2 + 9  1 +  2 =  + 1

31 31 Model =-Constraint   = 1  to model 2x 1 + 5x 2 = 9 iff  = 1  2x 1 + 5x 2 + M  M  + 9,  2x 1 + 5x 2 + M  M  + 9,  2x 1 + 5x 2 + M  1  9 + ,  2x 1 + 5x 2  M  2 + 9,   1 +  2 =  + 1.


Download ppt "1 Lecture 7 Linearization of a Quadratic Assignment Problem Indicator Variables."

Similar presentations


Ads by Google