0

I am trying to solve some (relatively easy) instances of the multiple-choice multidimensional knapsack problem (where there are groups of items where only one item per group can be obtained and the weights of the items are multi-dimensional as well as the knapsack capacity). I have two questions regarding the formulation and solution:

  1. If two groups have different number of items, is it possible to fill in the groups with smaller number of items with items having zero profit and weight=capacity to express the problem in a matrix form? Would this affect the solution? Specifically, assume I have optimization programs, where the first group (item-set) might have three candidate items and the second group has two items (different than three), i.e. these have the following form:

maximize (over x_ij) {v_11 x_11 + v_12 x_12 + v_13 x_13 +

                 v_21 x_21 + v_22 x_22}

subject to {w^i_11 x_11 + w^i_12 x_12 + w^i_13 x_13 + w^i_21 x_21 + w^i_22 x_22 <= W^i, i=1,2

        x_11 + x_12 + x_13 = 1, x_21 + x_22 = 1, x_ij \in {0,1} for all i and j.

Is it OK in this scenario to add an artificial item x_23 with value v_23 = 0 and w^1_23 = W^1, w^2_23 = W^2 to have full products v_ij x_ij (i=1,2 j=1,2,3)?

  1. Given that (1) is possible, has anyone tried to solve instances using some open-source optimization package such as cvx? I know about cplex but it is difficult to get for a non-academic and I am not sure that GLPK supports groups of variables.
lstavr
  • 1
  • 1
  • Do you need an exact solution, or is approximate MMKP sufficient? – Sneftel Jul 23 '15 at 23:03
  • Thank you for the reply. I would ideally want an exact solution. I know there is a greedy solution where the dominated items get removed and items are taken in descending order of their efficiency but I would like to try and solve this using different methods and compare. – lstavr Jul 23 '15 at 23:45
  • I have also seen some exact solutions but these are quite complicated and I am not sure if the difference in performance is worth the time implementing these. – lstavr Jul 24 '15 at 00:05
  • 1: cvx is mostly convex-optimization and there should't be much support for integer variables (only if you use Gurobi/Mosek with cvx; your problem should be very hard to formulate in a pure continuously way). GLPK may support these, but CBC (Coin-or branch and cut) should be the first approach when not using CPLEX/Gurobi. 2: What do you mean by group of variables: this stuff can always be described with just integer variables and then solved by CBC. No special support is needed. 3: If you want more than these general remarks, you should describe your problem in a more formal way. – sascha Jul 26 '15 at 00:47
  • @sascha Thank you a lot for your help. – lstavr Aug 18 '15 at 13:20

0 Answers0