! Multinomial Logit(MNL) Consumer Choice and Assortment model(MultiNomi.lng).
Consumer Choice portion of model:
 Each market segment i has a relative preference
 RP(i,j), for buying product type j. The base
 "product" of buying nothing has a preference 1.
 The MNL model assumes the probability of buying
 product j, among the available products, is 
 proportional to RP(i,j). 
Assortment portion of model:
 Given the set of all possible products a vendor might
 carry, what subset should be carried, taking into account
 the consumer's preferences?
 It costs money to introduce lots of products, so
 given consumer preferences, product profitability, and 
 cost of carrying each product, 
 which set of products should the vendor offer? 
 Each segment i has a size, NUM(i), which is an upper
 limit on the total unit sales to that segment.
 Specifically, if the vendor carries only product j,
 then the unit sales to segment i will be
    NUM(i)*RP(i,j)/(1+R{i,j));
! Keywords: Multinomial Logit, Consumer Choice,
    Marketing, Demand Substitution, Assortment Planning;
SETS:
  SEG: NUM, Z;            ! Market segments;
  PROD: PC, FXC, Y, VOL;  ! Products possible;
  SXP( SEG, PROD): RP, PR;! Combinations;
  ENDSETS
DATA: SEG = 1..7; ! The market segments; ! and their sizes; NUM = 19 13 24 39 11 12 14; PROD = 1..6; ! The products; ! Profit contribution per unit each product; PC = 16 16 13 18 14 19; ! Fixed cost of introducing each product; FXC = 100 120 80 115 110 165; ! Relative preference of customer segment i for product j. Bigger => more preferred; RP = 4 2 3 2 6 1 ! Segment 1; 0 0 3 5 1 2 1 3 6 0 0 1 0 1 3 0 4 0 0 1 1 4 3 3 4 0 1 0 1 1 2 4 2 1 2 1;! Segment 7; NPT = 3; ! We want to carry only three products; ! For the above data set, the best three products to carry are 1, 3, and 4; ENDDATA ! Parameters: NUM(i) = number people in segment i, PC(j) = profit contribution per unit of product j sold, FXC(j) = fixed cost of introducing product j, RP(i,j) = relative attractiveness to segment i of product j, NPT = number products that can be carried. Variables: Y(j) = 1 if we carry product j, else 0, VOL(j) = volume, or units, sold of product j, PR(i,j) = proportion of customers from segment i who will buy product j, given the set of products available. Z(i) = total attractiveness of all available products to segment i. ; ! Maximize profit contribution from sales minus fixed cost of introducing the products; MAX = @SUM( PROD(j): PC(j)*VOL(j) - FXC(j)*Y(j)); ! Y(j) = 1 if we introduce product j, else 0; @FOR( PROD(j): @BIN(Y(j))); ! Compute portion/probability of/that segment i buys product j. Cannot buy it if not introduced; @FOR( SXP(i,j): ! The basic multinomial logit model of attractiveness of a product, given other products available, option 0 ; ! PR(i,j) = Y(j)*RP(i,j)/(1 + @SUM(PROD(k): Y(k)*RP(i,k))); ! Reformulation to almost linear form ; Z(i) = 1 + @SUM(PROD(k): Y(k)*RP(i,k)) ; PR(i, j)*Z(i) = Y(j) * RP(i, j) ; ); ! Volume sold of product j; @FOR( PROD(j): VOL(j) = @SUM( SEG(i): NUM(i)*PR(i,j)); ); ! Limit on products carried; @SUM( PROD(j): Y(j)) <= NPT;