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:
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user