Solving a Semidefinite Programming using callback function and lazy constraints
I am writing a code that would be able to solve semidefinite programming such that after ignoring the semidefiniteness constraint, It will check all of the eigenvalues of my answer and if there is a negative eigenvalue it will add a lazy constraint in a callback function and repeat this procedure until it gets an answer which has just positive eigenvalues. I also set the lazy constraint and pre-crush parameter to 1, however, the code ignores the callback function, just solves the primary LP and terminate. I would appreciate if someone tells me what is missing here.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi,
Is this a continuous SDP or a Mixed-Integer SDP that you are looking at?
Please note, lazy constraints are used to cutoff infeasible integer solutions of a MIP. You cannot use them to do some outer approximation for a continuous cone. Because you would normally add them in a MIPSOL callback that is only called if a MIP solution is found.
Best regards,
Sonja
0
Post is closed for comments.
Comments
2 comments