Record optimality gap at different CPU times

Dear experts,

Suppose a hard constraint mathematical model that could be solved by the CPLEX solver. I want to automatically record the optimality gap at different CPU times, e.g., 5 secs, 10 secs, 30 secs and 60 secs.

What is the syntax that I can use to record the above information? If you need more details, pls let me know.

Many thanks for your consideration.

Bests,
Amirhossein

Amirhossein,

The solvers XPRESS, SBB, and CPLEX all have a mipTrace facility that records bestBound/bestFound values. You can create what you want from this.

https://www.gams.com/latest/docs/S_XPRESS.html?search=miptrace
https://www.gams.com/latest/docs/S_SBB.html?search=miptrace
https://www.gams.com/latest/docs/S_CPLEX.html?search=miptrace

-Steve