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:
@@ -43,13 +43,14 @@ def main():
|
||||
solver.INT_VALUE_DEFAULT)
|
||||
|
||||
# And solve.
|
||||
solver.Solve(db)
|
||||
solver.NewSearch(db)
|
||||
solver.NextSolution()
|
||||
|
||||
# Display output.
|
||||
print solver
|
||||
print pheasant
|
||||
print rabbit
|
||||
|
||||
solver.EndSearch()
|
||||
print solver
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user