5
$\begingroup$

I am working on an MILP problem, and the project needs to output the top N best results rather than the global best. I am looking for an open source solver which has a callback function. Can anyone provide help on this?

$\endgroup$
3
  • 5
    $\begingroup$ Not to my knowledge, but you can do it yourself with any solver by adding a set of no good cuts to sequentially exclude previous optimal solutions. $\endgroup$
    – Kuifje
    Nov 16, 2021 at 8:18
  • $\begingroup$ Great! This works for my case. But found another problem, the model does not report infeasible during the loop, instead, it always output the same solution as the previous one. $\endgroup$
    – Chemmyyu
    Jun 23, 2022 at 4:26
  • $\begingroup$ There is certainly a bug in your code. Feel free to open a new question, with your code, and we will be glad to help you fix it. $\endgroup$
    – Kuifje
    Jun 23, 2022 at 7:06

1 Answer 1

3
$\begingroup$

No, i am not aware of such a solver. However sequentially excluding previously optimal results comes with an additional pitfall: If the solver discovered symmetries and did cut them away you also exclude symmetric solutions although they would rank before the next best objective.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.