Originally posted by: TonyWangyanchun
The version of CPLEX I use is 12.6.0 (academic license). The model I attached above is not very clear, and here I give an example, hope this can make it clearer.
The problem is like this: There are N(I use 5 by default) catalogue of items, each catalogue has R items and each item have D (use 6 by default) attributes(<attr0, ..., attrD>, all are double type). There are M user requirements which is described with a vector that also have D dimensions (<req1, ..., reqD>), For M end-users, there are M*N*R 0-1 variables Xk,i,j (k=1, …, M, i=1, …, N, j=1, …, R and Dk,i,j={0, 1}), Xk,i,j being 1 if the jth item in the ith catalogue is selected for end-user k, 0 otherwise.
the model should comply the following constraints as well:
1) Must select one (only one) item from each catalogue for each user;
2) Each item can only be selected by at most one user;
3) Must select M items from each catalogue to satisfy M user (there are more than M items in each catalogue, that means some items will not be selected for any user, so I think there's something wrong in the model in the first post, it should be sum(Xk,i,j) <=1, where k=1, ..., M)
4) The sum of attribute values for each dimension of item selected, should be less than that dimension of user's requirements values. for example, for user0, item0 is selected from catalogue0, ..., item4 is selected from catalogue4(this means X0,0,0=1, X0,1,1=1, X0,2,2=1, X0,3,3=1, X0,4,4=1, all other Xk,i,j = 0), and then item0[0] + item1[0] + item2[0] + item3[0] + item4[0] <= user0's requirement[0];
5) The objective is minimise the sum of 0th attribute of all items selected.
I attached a model file with N=5, M=10, and R=100, and the log file generated when running the model. I didn't get the final solution before I stopped it. And I attached a solution example file to show what it looks like.
I don't know how to check whether the problem is finding the optimal solution or raising the dual bound to actually prove optimality, I'm not familiar with Cplex and no much background knowledge in optimisation, this is why I was struggling with this problem for weeks.
#DecisionOptimization#MathematicalProgramming-General