MLinExpr.clear()

clear ( )

Reset this expression to all zeros.

Example usage:

  expr = 2 * model.addMVar(3) + 1
  expr.clear()  # All three entries are reset to constant 0.0