libminizinc icon indicating copy to clipboard operation
libminizinc copied to clipboard

big delay between solution was shown and solving end time.

Open i-kudryavtsev opened this issue 1 year ago • 2 comments

Hello,

I have the following issue: I'm solving a relatively huge problem using Gecode. I can see that gecode solved (solution displayed) it, but something is still going on. This delay could be very significant, more than the solution time. For example, I can see the solution on my machine when the timer is on ~2:30, but it still needs to be finished at ~6:00.

My wild guess is that it's related to some memory cleaning. Could it be cut if only one solution is required?

Thanks in advance! Ilya

i-kudryavtsev avatar Aug 02 '23 12:08 i-kudryavtsev

Hi Ilya,

The difference between the time would normally be explained by the output processing. MiniZinc takes the output from the solver and translates it back in terms of the model, evaluating the output model created during flattening. Usually this does not take much time, especially for solvers like Gecode, where the decisions representation is generally the same as in the MiniZinc model. For MIP or SAT solvers, it is not uncommon that this might take longer.

Since the output model can contain many type of functions, there is no limit on the amount of time. If you want to share the model where the time difference is so surprising, then we might be able to help explain it in the specific case.

Dekker1 avatar Aug 24 '23 06:08 Dekker1

This is more likely to be the final cleanup of the garbage collector, which can take several seconds for large models. I'm working on a fix for this.

guidotack avatar Aug 31 '23 13:08 guidotack