How to retrieve MIP Optimality Gap an Solving Time into a Parameter

  • 4 January 2020
  • 4 replies

Userlevel 2
Badge +4

Dear All,

Is possible to retrieve MIP optimalilty gap and Solving Time for each solve in to a parameter?

If so, how to do this?

Thank you very much.


Best answer by deannezhang 5 January 2020, 01:03

View original

4 replies

Userlevel 2
Badge +4

Hi @deannezhang,

Thanks a lot….

Userlevel 4
Badge +3

Yes, you can use the “SolutionTime” suffix. For other suffix and callback functions, you can refer to the AIMMS Language reference, part “Suffices and Callbacks”.

Userlevel 2
Badge +4

Hello @deannezhang,

Thank you for the method to calculate the gap. For solving time, is there a way to retrieve it?

Thank you.

Userlevel 4
Badge +3

You can use the “Incumbent” and “Incumbent” suffix to retrieve the best known solution and the  LP bound, then use them to calculate the GAP and assign it to a parameter.

MpGap :=(abs(MathProgram.Incumbent - MathProgram.bestbound)/$abs(MathProgram.Incumbent)) * 100;



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

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