mostly reformat

This commit is contained in:
Laurent Perron
2024-04-08 11:34:45 +02:00
parent e1c19b6c94
commit 622483b682
20 changed files with 56 additions and 41 deletions

View File

@@ -65,12 +65,12 @@ def main():
# [START print_solution]
print(f"Status: {result_status}")
if result_status != pywraplp.Solver.OPTIMAL:
print("The problem does not have an optimal solution!")
if result_status == pywraplp.Solver.FEASIBLE:
print("A potentially suboptimal solution was found")
else:
print("The solver could not solve the problem.")
return
print("The problem does not have an optimal solution!")
if result_status == pywraplp.Solver.FEASIBLE:
print("A potentially suboptimal solution was found")
else:
print("The solver could not solve the problem.")
return
print("Solution:")
print("Objective value =", objective.Value())