title: TypeError: unsupported operand type(s) for +: 'generator' and 'generator'
body: <p>I have a problem with adding three expressions in my objective function. I used <code>quicksum</code> to build each expression. However, when I try to add them together I get an error that I cannot use +/- operands on class 'generator'.</p>
  
  <p>Here is the last part of my code:</p>
  
  <pre><code># the shipping cost expression
  expr_sc = []
  for j in J:
      for k in K:
          expr_sc.append(quicksum(r_jk[(j, k)]*x[(i, j, k)]) for i in I)
  
  m.setObjective((quicksum(item_rev) for item_rev in expr_rev) -
                 ((quicksum(item_pc) for item_pc in expr_pc) + (quicksum(item_sc) for item_sc in expr_sc)),
                 GRB.MAXIMIZE)
  </code></pre>
  
  <h1>Update:</h1>
  
  <p>here is the actual problem that I am trying to solve:
  <a href="https://i.stack.imgur.com/QFHyM.gif" rel="nofollow noreferrer">Objective Function</a>
  The problem is I don't know how to write this expression in Gurobi Python!!</p>