I have the following question and I'm not sure how to formulate it as a mixed integer linear programming problem (if possible):
I have a set of products i (1..n) where I'm searching a similar product j (1..m) for, where X(i,j) equals 1 when product i is matched to product j and 0 otherwise. Every product i should be matched to exactly 1 product j (but not necessarily the other way around).
Now, to define a product i similar to product j, we have a bunch of attributes. Let's define for simplicity just two attributes:
a(i,j) : abs difference in % wood used between product i and j
b(i,j) : abs difference in % metal used between product i and j
Note that these are all constants. Finally, we have our absolute difference of sales volumes:
e(i,j) : abs difference in sales volumes between product i and j
Now, I want to minimize the absolute differences of sales volume, meaning:
BUT, I also want to decide (extra decision variables) the weights of the attributes (call them A and B), which refer to the above mentioned constants a(i,j) and b(i,j). The restriction is that, for every product i, I always choose the product j that has the minimum of:
a(i,j) * A + b(i,j) * B
meaning, the smallest combined distances. A and B should be independent of i and j.
An example dataset is:
So, if the weights of column a and b are both 0.5, I have differences for product A of:
(A,X) : 0.5*10+0.5*200 = 105
(A,Y) : 0.5*8+0.5*240 = 124
(A,Z) : 0.5*4+0.5*230 = 117
Hence, product A will be most similar to product X, where the sales volumes difference equals 4000.
Doing this for products B and C as well, equals:
Product B most similar to product X, with sales difference of 1200; Product C most similar to product Z, with sales difference of 700.
Hence, the average sales difference is now (4000+1200+700)/3 = 1967.
This is the number I want to minimize, by choosing the right weights for the (in this case) two attributes, which in my example are set to 0.5 and 0.5.
The question is now: Which values to select for these weights, in order to minimize the average sales volume?