title: Multiple MILP solutions in ORTOOLS [python]
body: <p>I am trying to use or-tools in Python to solve a mixed-integer linear program that has multiple optimal solutions.  However, <code>NextSolution()</code> always returns <code>False</code>, so I cannot retrieve more than one solution. I understand that this function works using a constraint solver, but I would like to use the MILP solver.</p>
  <p>The related <a href="https://google.github.io/or-tools/cpp_linear/classoperations__research_1_1MPSolver.html#a18daa488abaa904f23c8f74158290883" rel="nofollow noreferrer">or-tools documentation</a> states:</p>
  <blockquote>
  <p>As of 2020-02-10, only Gurobi and SCIP support NextSolution(), see linear_solver_interfaces_test for an example of how to configure these solvers for multiple solutions. Other solvers return false unconditionally.</p>
  </blockquote>
  <p>However, I cannot find any such linear_solver_interfaces_test in the source repo, documentation, or via a web search.  I am using ortools version 7.8.7959 and the included SCIP 7.0.1 with Python 3.6.9.</p>
  <p>Below is my example code which illustrates a simple example of the type I would like to solve.  It should produce three unique solutions, but currently produces zero solutions.</p>
  <pre><code>from ortools.linear_solver import pywraplp
  
  def main():
      solver = pywraplp.Solver(&quot;multiple_solution_test&quot;, pywraplp.Solver.SCIP_MIXED_INTEGER_PROGRAMMING)
      x = solver.IntVar(0, 2, &quot;x&quot;)
      y = solver.IntVar(0, 2, &quot;y&quot;)
      z = solver.IntVar(0, 2, &quot;z&quot;)
      solver.Add(x + y &lt;= 2)
      solver.Maximize(x + y + z)  # should be 4, which can be obtained by (2,0,2), (1,1,2), or (0,2,2)
      solver.Solve()
      print_solutions(solver, x, y, z)
  
  
  def print_solutions(solver, x, y, z):
      count = 0
      
      while solver.NextSolution():  # &lt;-- NextSolution() always returns False!
          count += 1
          print(&quot;x =&quot;, x.solution_value(), &quot;y =&quot;, y.solution_value(), &quot;z =&quot;, z.solution_value())
      print(&quot;\nNumber of solutions found:&quot;, count)
      
      
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>