fix examples after FEASIBLE -> OPTIMAL CP-SAT change; improve display of the sudoku problem

This commit is contained in:
Laurent Perron
2020-09-20 09:04:28 +02:00
parent d5c2f5f2a6
commit 54bda4bd42
6 changed files with 15 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ def solve_hidato(puzzle, index):
solver = cp_model.CpSolver()
status = solver.Solve(model)
if status == cp_model.FEASIBLE:
if status == cp_model.OPTIMAL:
if visualization.RunFromIPython():
output = visualization.SvgWrapper(10, r, 40.0)
for i, var in enumerate(positions):