GAMS/Cplex issue in recent versions

Dear all,

Some of my modeling colleagues have reported to me of an unexpected issue with the Cplex final solve when running MIP problems under GAMS.

With some investigation, it seems that it is an issue either in the recent versions of the GAMS/Cplex link or in recent versions of Cplex itself, when solving MIP models with indicator constraints. An example manifesting the issue can be found in the GAMS model library, the instance trnsindic.412.

When running that trnsindic model instance with GAMS v33 or above, it appears that one cannot obtain any solution marginals from the solves with indicator constraints, but only the primal solution, because the final solve is not executed when using those versions of GAMS.

However, if using earlier GAMS versions (32 or below), the final solve is indeed performed even when using indicator constraints (and produces the same optimal solution), and the solution marginals from the final solve are thereby available as well, which may be important for modellers.

My question is now: Should this difference be understood as being an intended change in the GAMS Cplex link, or in the Cplex library itself, or possibly a bug in the GAMS Cplex link? The difference being that the final solve is no longer performed under GAMS versions 33 or above when using indicator constraints, and therefore the solution marginals are not available at all.

Hi, that’s right, solvefinal gets reset in the case of indicator constraints at the moment. I’ll investigate this to see if this reset can be removed.

1 Like

It seems that this feature can be enabled (again). I’ll run some final tests, but I am optimistic that this will enabled with an upcoming minor release. Thanks for reporting this.

1 Like

Thank you for investigating this.
Do you also happen to know if there is some specific reason for it having been reset since GAMS v33, whereas it wasn’t earlier?

No, I don’t know that.

Sorry, I was too quick previously. There was actually a reason for disabling solvefinal once indicator constraints are present. The issue is that once the MIP got changed to an LP, one cannot query the CPLEX methods for indicator constraints anymore. The only way to query the duals for the indicator constraints is to guess at which position they have been added to the LP. GAMS 32 and before did such a guessing, but this has been removed. The reason is that there may be situations where this guess is incorrect and thus produces incorrect results.

I don’t know your use case, but you may say now that you are not interested in the duals of the indicator constraints but the ones of the other constraints only. But now the issue is that as soon as one constraint doesn’t provide duals, GAMS doesn’t return duals for any.

1 Like

Thank you for this additional information, which is very useful and now also provides an explanation to my original question.

However, does that mean that you would now also like to take back your earlier comment, where you said that “I am optimistic that this will enabled with an upcoming minor release”? Indeed, in my modeling community, users would likely be disappointed if the marginals are not available at all in the model solution, but only the primal values. So, could you confirm whether or not you are still able to maintain any optimism that it could be enabled in an upcoming release?

I’ll investigate and will try some other workaround.

1 Like