Here I found the function GMP::Instance::SetMathematicalProgrammingType is not able to change mathematical type of a instance from MIP to QP. Is there any way to achieve this without generate the instance again?
Hi
There is workaround for MIP to MIQP, namely add a dummy variable x, add + x^2 to the objective, and add the constraint x = 0 to the model. Then the MIP becomes a MIQP with a dummy quadratic part. The preprocessor of CPLEX or Gurobi should immediately remove x and turn the model into a linear model. Note: in the test model that I used the MIP and MIQP formulations were handled differently by the CPLEX and Gurobi preprocessor (besides the obvious removal of x), resulting in different solution paths and run times (actually, better for the MIQP formulation, but that can be luck).
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.