Skip to main content

Is there a parameter that shows if the solution is unique when using CPLEX? 

Hi @Zsolt Mihály. In case of an LP you can use the function GMP::Solution::IsDualDegenerated. If that function returns 1 then the primal solution is not unique.

For MIP it is not easy to check whether there exists another optimal solution, with at least one integer variable having a different value. To check this you would have to resolve the MIP model once again, after forbidding the optimal solution that has been found before. This can be done using the procedure GMP::Instance::AddIntegerEliminationRows as demonstrated in the Dice example. If the objective value of the second solve differs from that of the orginal solve then the optimal solution was unique; if they are equal then the MP has multiple optimal solutions.


Thank you @Marcel Hunting. It answers my question.


Reply


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

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