code: def mkp(I,J,v,a,b):
      
      model = Model("mkp")
  
      # Create Variables
      x = {}
      for j in J:
          x[j] = model.addVar(vtype="B", name="x(%s)"%j)
  
      # Create constraints
      for i in I:
          model.addCons(quicksum(a[i,j]*x[j] for j in J) <= b[i], "Capacity(%s)"%i)
  
      # Objective
      model.setObjective(quicksum(v[j]*x[j] for j in J), "maximize")
      model.data = x
  
      return model
docs: mkp -- model for solving the multi-constrained knapsack
      Parameters:
          - I: set of dimensions
          - J: set of items
          - v[j]: value of item j
          - a[i,j]: weight of item j on dimension i
          - b[i]: capacity of knapsack on dimension i
      Returns a model, ready to be solved.