Status based on state in daemon mode

Viewed 36

I have daemon mode enabled, and when I run getSolverStatus() it returns SOLVING_ACTIVE regardless if the solver is in blocked state or running state.

Is there a way for me to explicitly know what state the solver is currently in?

The reason behind is I want to display idle for blocked state and processing for running state on my frontend.

1 Answers

The solver status doesn't change in this case as the solver running in daemon mode does not terminate unless you call terminateEarly().

Why is it important to know if the solver running in daemon mode is actively improving the solution or not?

The daemon mode is used together with ProblemChanges. After a ProblemChange has been incorporated into the working solution, a new best solution is passed to the caller. See the SolverManager.addProblemChange() for more details.

However, there is no guarantee when and if some next more optimal solution is produced. You can wait a fixed amount of time before you publish the solution if a new one does not come, for instance.

Related