I implemented a MIP model with SCIP as a solver. One of my goals is to plot the evolution of the intermediate solutions through time.
Using a loop on NextSolution(), I retrieve the intermediate solutions (as explained in Google OR-Tools (using SCIP solver) - How to access the intermediate solutions found by the solver?). Since I also need to monitor time (i.e. the timestamp of each intermediate solution), I added WallTime() to the loop:
solutions = [] # list to store intermediate solutions
localtimes = [] #list to store intermediate localtimes
while solver.NextSolution():
solutions.append(solver.WallTime()) #in miliseconds
localtimes.append(C.solution_value())
The problem is that I don't get enough time precision to differentiate the timestamps. The output that I get is:
[5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5329, 5330, 5330, ...] --> intermediate localtimes list
[263.0, 264.0, 268.0, 269.0, 275.0, 279.0, 280.0, 296.0, 297.0, 304.0, 306.0, 307.0, 308.0, 309.0, 311.0, ...] --> intermediate solutions list
So, different solutions have the same timestamp. Is there a way to achieve more time precision in order to get unique timestamps?
Thank you.