Solve() now backtracks at the end/ RejectSolution on SearchMonitor is now split into AcceptSolution() and AtSolution/ There is a new virtual OnStart() on neighborhoods/Examples were tweaked to adapt to the new API

This commit is contained in:
lperron@google.com
2010-10-06 16:04:31 +00:00
parent e0c66e81da
commit 672aa0605c
14 changed files with 310 additions and 296 deletions

View File

@@ -49,9 +49,12 @@ def main(unused_argv):
solver.Add(solver.AllDifferent(letters, True))
solver.Solve(solver.Phase(letters, solver.INT_VAR_DEFAULT,
solver.INT_VALUE_DEFAULT))
solver.NewSearch(solver.Phase(letters,
solver.INT_VAR_DEFAULT,
solver.INT_VALUE_DEFAULT))
solver.NextSolution()
print letters
solver.EndSearch()
if __name__ == '__main__':