# Print Intermediate Solutions of Scheduling Problem and tackling FLAGS in jupyter notebook

I tried this code and it goes on and I'm clueless when it'll end so I manually interrupt it.

Is there any way we can see intermediate solutions that are feasible solutions and can we limit time or number of Feasible solution if optimal solution search takes time. I'm having 16 Gigs of RAM yet struggle to get optimal solution if runs instance of Large Sample.

Second Part: I ran code in jupyter notebook initially and ended with error

DuplicateFlagError: The flag 'params' is defined twice. First from C:\Users\Dell\anaconda3\lib\site-packages\ipykernel_launcher.py, Second from C:\Users\Dell\anaconda3\lib\site-packages\ipykernel_launcher.py.  Description from first occurrence: Sat solver parameters.


Is there any way of tackling this or not using FLAGS in general and declare instances as user input. After error I tried PyCharm where Small sample worked fine but others ended with no output and were utilizing 95% CPU in background so needed to interrupt.

• [cont..] I tried  solution_printer = VarArrayAndObjectiveSolutionPrinter([num_drivers]) status = solver.SolveWithSolutionCallback(model, solution_printer) print('Status = %s' % solver.StatusName(status)) print('Number of solutions found: %i' % solution_printer.solution_count()) that resulted in Solution 11 objective value = 13 24 = 24  whereas I was looking at drivers with shifts as intermediate solution. Any way we can achieve that ? Jul 31 '21 at 16:57