code: def diet(F,N,a,b,c,d):
      
      model = Model("modern diet")
  
      # Create variables
      x,y,z = {},{},{}
      for j in F:
          x[j] = model.addVar(vtype="I", name="x(%s)" % j)
  
      for i in N:
          z[i] = model.addVar(lb=a[i], ub=b[i], vtype="C", name="z(%s)" % i)
  
      # Constraints:
      for i in N:
          model.addCons(quicksum(d[j][i]*x[j] for j in F) == z[i], name="Nutr(%s)" % i)
  
      model.setObjective(quicksum(c[j]*x[j]  for j in F), "minimize")
  
      model.data = x,y,z
      return model
docs: diet -- model for the modern diet problem
      Parameters:
          F - set of foods
          N - set of nutrients
          a[i] - minimum intake of nutrient i
          b[i] - maximum intake of nutrient i
          c[j] - cost of food j
          d[j][i] - amount of nutrient i in food j
      Returns a model, ready to be solved.