-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solution summary to report the number of cuts applied to a problem with discrete variables #3126
Comments
Can you point to ways to access this information in multiple solver APIs? Before adding this to JuMP, we'd need to add this as a new MOI attribute. |
I don't see a way to access this in Gurobi, https://www.gurobi.com/documentation/9.5/refman/attributes.html, which I think means "no." (We typically use Gurobi as a reference for "is this something generalizable across MILP solvers?") |
Gurobi callbacks seem to allow accessing this using MIP_CUTCNT: https://www.gurobi.com/documentation/9.5/refman/cb_codes.html |
I don't know how feasible this is to implement. For CPLEX, we'd have to loop over every cut type, and for Gurobi, it looks like it reports the number of cuts at the particular node in the tree, so you'd have to figure out how to count the number of cuts in the optimal solution, or potentially the number of cuts that were applied at any node in the tree? When is the number of cuts a useful statistic? |
I see. I find that the number of nodes explored and the number of cuts applied gives a good indication of the amount of work required to solve the problem. I was hoping reporting the number of cuts would require similar effort to reporting the number of nodes explored. I can also just continue with my current approach which is to parse the optimizer log to get the number of cuts. |
If you know the particular solver you are supporting, just write the solver-specific code. But this seems hard to do in general (we can't easily get values out of Gurobi's callback). |
If I see someone else ask for this in future, we can re-open and reconsider. |
It would be nice if
solution_summary
also reported the number of cuts applied to a MIP. It currently reports the relative gap and number of nodes explored. I'm not sure how difficult it would be to report the number of cuts, but this might be a nice statistic to have.The text was updated successfully, but these errors were encountered: