Skip to main content
Solved

How to check if MP solution is unique?

  • September 28, 2022
  • 2 replies
  • 52 views

Forum|alt.badge.img+3

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

Best answer by Marcel Hunting

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.

View original

2 replies

Marcel Hunting
AIMMSian
Forum|alt.badge.img+4

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.


Forum|alt.badge.img+3
  • Author
  • AIMMS Partner
  • 11 replies
  • October 3, 2022

Thank you @Marcel Hunting. It answers my question.