title: How to make a standard Traveling Salesman Solver into a Collect Price Solver for or-tools?
body: <p>I have set-up a fine solver for *what is the best route to visit 1000 nodes" in my graph.</p>
  
  <p>But I would like to solve the question "what is the shortest route to visit any 500 of 1000 given nodes in my graph".</p>
  
  <p>I think, I have to add <a href="https://groups.google.com/forum/#!msg/or-tools-discuss/pIRqqNgnuz8/ziQEEE3HivEJ" rel="nofollow">disjunctive constraints</a> somehow to my python <code>RoutingModel</code>, but how?</p>
  
  <p>This is a rough sketch of my current solver:</p>
  
  <pre><code>from ortools.constraint_solver import pywrapcp
  
  nodes = readNodes()      # graph nodes
  matrix = readMatrix()    # costs between edges, distances
  assert len(nodes) == len(matrix)
  # Create routing model
  routing = pywrapcp.RoutingModel(len(nodes), 1)
  parameters = ...
  # Setting the cost function.
  distance = lambda p,q: matrix[p][q]
  routing.SetArcCostEvaluatorOfAllVehicles(distance)
  # --&gt; here is probably more setup needed &lt;--
  # Solve, returns a solution if any.
  assignment = routing.SolveWithParameters(parameters, None)
  if assignment:
    # Solution cost.
    print assignment.ObjectiveValue()
    # Inspect solution
    path = ...
    printSolution(nodes, table, path)
  else:
    print 'No solution found.'
  </code></pre>