code: def solveBinPacking(s,B):
      
      n = len(s)
      U = len(FFD(s,B)) # upper bound of the number of bins
      model = bpp(s,B)
      x,y = model.data
  
      model.optimize()
  
      bins = [[] for i in range(U)]
      for (i,j) in x:
          if model.getVal(x[i,j]) > .5:
              bins[j].append(s[i])
      for i in range(bins.count([])):
          bins.remove([])
      for b in bins:
          b.sort()
      bins.sort()
      return bins
docs: solveBinPacking: use an IP model to solve the in Packing Problem.
  
      Parameters:
          - s: list with item widths
          - B: bin capacity
  
      Returns a solution: list of lists, each of which with the items in a roll.