ERGO-Code / HiGHS

Linear optimization software
MIT License
943 stars 175 forks source link

writePrimalSolution: flush file after each call (#1880) #1881

Closed few closed 5 days ago

few commented 1 month ago

When setting

mip_improving_solution_save=true mip_improving_solution_file=solution.sol

each new solution is written to solution.sol. The problem is that the solution can be incomplete while highs is still running or when it gets killed. To allow other programs to read the latest solution while the solver is still running, highs should flush the file after each solution is written.