Skip to main content

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 ​@denghaiying. No, you cannot change the mathematical programming type from MIP to QP without regenerating the model. For MIP to QP is see no workaround.

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


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator