diff --git a/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py b/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py index f6306c3b84..7ba92bbb37 100644 --- a/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py +++ b/examples/python/single_machine_scheduling_with_setup_release_due_dates_sat.py @@ -17,8 +17,8 @@ from __future__ import division import argparse -from ortools.sat.python import cp_model from google.protobuf import text_format +from ortools.sat.python import cp_model #---------------------------------------------------------------------------- # Command line arguments. @@ -46,6 +46,7 @@ class SolutionPrinter(cp_model.CpSolverSolutionCallback): self.__solution_count = 0 def on_solution_callback(self): + """Called after each new solution found.""" print('Solution %i, time = %f s, objective = %i' % (self.__solution_count, self.WallTime(), self.ObjectiveValue())) self.__solution_count += 1