Search code examples
optaplanner

Does OptaPlanner support obtaining calculation progress?


Can I get the total time or total steps required to calculate the best solution? Or the time to get the next best solution? The user is impatient and doesn't know the next best solution or how long the entire calculation will take.


Solution

  • No, but you can display the time elapsed since the current best solution was discovered. So when I come back to the computer and the solver has been running for 20 minutes, I can decide:

    • If I see that the best solution was discovered 15 minutes ago, I would think to myself that I cannot expect big improvements in the next few minutes and I'll stop the solver.
    • If I see that the best solution improved a minute ago, I'll be willing to wait another couple of minutes to see if the solver can still improve the solution.

    IMPORTANT: You cannot make any predictions about the next best solution based on the time elapsed since the last improvement. I'm only saying that showing that information can improve the user experience.