!Keywords: Bundling / Economic / Equilibrium / Marketing / Matching / Product Management / Sales / Sorting;
MAX    7 PBZZ + 7 PBSZ + 7 PBZW + 7 PBSW +  
        5 PLZZ + 5 PLSZ + 5 PLZW + 5 PLSW +  
        6 PEZZ + 6 PESZ + 6 PEZW + 6 PESW +  
      4.5 PHZZ + 4.5 PHSZ + 4.5 PHZW + 4.5 PHSW 
 SUBJECT TO 
  ! Each customer buys exactly one bundle; 
     2)   YBZZ + YBSZ + YBZW + YBSW =    1 
     3)   YLZZ + YLSZ + YLZW + YLSW =    1 
     4)   YEZZ + YESZ + YEZW + YESW =    1 
     5)   YHZZ + YHSZ + YHZW + YHSW =    1 
 ! Each customer's achieved surplus, S, must be at least 
 !  as good as that possible from every bundle 
     6)   XSZ + SB >=   450 
     7)   XZW + SB >=   110 
     8)   XSW + SB >=   530 
     9)   XSZ + SL >=   75 
    10)   XZW + SL >=   430 
    11)   XSW + SL >=   480 
    12)   XSZ + SE >=   290 
    13)   XZW + SE >=   250 
    14)   XSW + SE >=   410 
    15)   XSZ + SH >=   220 
    16)   XZW + SH >=   380 
    17)   XSW + SH >=   390 
 ! Compute the achieved surplus for each customer; 
    18) - 450 YBSZ - 110 YBZW - 530 YBSW + PBZZ + PBSZ 
      + PBZW + PBSW + SB =    0 
    19) - 75 YLSZ - 430 YLZW - 480 YLSW + PLZZ + PLSZ 
      + PLZW + PLSW + SL =    0 
    20) - 290 YESZ - 250 YEZW - 410 YESW + PEZZ + PESZ 
      + PEZW + PESW + SE =    0 
    21) - 220 YHSZ - 380 YHZW - 390 YHSW + PHZZ + PHSZ 
      + PHZW + PHSW + SH =    0 
 ! Each product variable Pij must be.. 
 !   <= Xj 
 !   <= Rij * Yij 
 !   >= Xj - M + M * Yij 
    22)   PBZZ <=   0   ! Empty bundle must have price = 0; 
    23) - 600 YBZZ + PBZZ >= - 600 
    24)   PBSZ - XSZ <=   0 
    25) - 450 YBSZ + PBSZ <=   0 
    26) - 600 YBSZ + PBSZ - XSZ >= - 600 
    27)   PBZW - XZW <=   0 
    28) - 110 YBZW + PBZW <=   0 
    29) - 600 YBZW + PBZW - XZW >= - 600 
    30)   PBSW - XSW <=   0 
    31) - 530 YBSW + PBSW <=   0 
    32) - 600 YBSW + PBSW - XSW >= - 600 
    33)   PLZZ <=   0 
    34) - 600 YLZZ + PLZZ >= - 600 
    35)   PLSZ - XSZ <=   0 
    36) - 75 YLSZ + PLSZ <=   0 
    37) - 600 YLSZ + PLSZ - XSZ >= - 600 
    38)   PLZW - XZW <=   0 
    39) - 430 YLZW + PLZW <=   0 
    40) - 600 YLZW + PLZW - XZW >= - 600 
    41)   PLSW - XSW <=   0 
    42) - 480 YLSW + PLSW <=   0 
    43) - 600 YLSW + PLSW - XSW >= - 600 
    44)   PEZZ <=   0 
    45) - 600 YEZZ + PEZZ >= - 600 
    46)   PESZ - XSZ <=   0 
    47) - 290 YESZ + PESZ <=   0 
    48) - 600 YESZ + PESZ - XSZ >= - 600 
    49)   PEZW - XZW <=   0 
    50) - 250 YEZW + PEZW <=   0 
    51) - 600 YEZW + PEZW - XZW >= - 600 
    52)   PESW - XSW <=   0 
    53) - 410 YESW + PESW <=   0 
    54) - 600 YESW + PESW - XSW >= - 600 
    55)   PHZZ <=   0 
    56) - 600 YHZZ + PHZZ >= - 600 
    57)   PHSZ - XSZ <=   0 
    58) - 220 YHSZ + PHSZ <=   0 
    59) - 600 YHSZ + PHSZ - XSZ >= - 600 
    60)   PHZW - XZW <=   0 
    61) - 380 YHZW + PHZW <=   0 
    62) - 600 YHZW + PHZW - XZW >= - 600 
    63)   PHSW - XSW <=   0 
    64) - 390 YHSW + PHSW <=   0 
    65) - 600 YHSW + PHSW - XSW >= - 600 
  ! Price of bundle should be <= sum of component prices; 
    66) - XSZ - XZW + XSW <=   0 
  ! Price of bundle should be >= price of any component; 
    67) - XSZ + XSW >=   0 
    68) - XZW + XSW >=   0 
 END 
! Make the "pick a bundle" variables 0/1 
 INTEGER      YBZZ 
 INTEGER      YBSZ 
 INTEGER      YBZW 
 INTEGER      YBSW 
 INTEGER      YLZZ 
 INTEGER      YLSZ 
 INTEGER      YLZW 
 INTEGER      YLSW 
 INTEGER      YEZZ 
 INTEGER      YESZ 
 INTEGER      YEZW 
 INTEGER      YESW 
 INTEGER      YHZZ 
 INTEGER      YHSZ 
 INTEGER      YHZW 
 INTEGER      YHSW