rename MODEL_SAT to FEASIBLE, MODEL_UNSAT to INFEASIBLE

This commit is contained in:
Laurent Perron
2018-07-02 15:35:40 +02:00
parent d4d1e0f877
commit bd04f656b3
24 changed files with 200 additions and 199 deletions

View File

@@ -80,7 +80,7 @@ def RabbitsAndPheasants():
solver = cp_model.CpSolver()
status = solver.Solve(model)
if status == cp_model.MODEL_SAT:
if status == cp_model.FEASIBLE:
print('%i rabbits and %i pheasants' % (solver.Value(r), solver.Value(p)))
@@ -183,7 +183,7 @@ def MinimalCpSat():
solver = cp_model.CpSolver()
status = solver.Solve(model)
if status == cp_model.MODEL_SAT:
if status == cp_model.FEASIBLE:
print('x = %i' % solver.Value(x))
print('y = %i' % solver.Value(y))
print('z = %i' % solver.Value(z))
@@ -209,7 +209,7 @@ def MinimalCpSatWithTimeLimit():
status = solver.Solve(model)
if status == cp_model.MODEL_SAT:
if status == cp_model.FEASIBLE:
print('x = %i' % solver.Value(x))
print('y = %i' % solver.Value(y))
print('z = %i' % solver.Value(z))