Friday, May 23, 2014

Reporting infeasible LP solutions in GAMS

When debugging models, one strategy that can be very helpful: fix a number of variables to a known (feasible) solution, solve, and inspect the reported infeasibilities. The known solution can be complete or can be a partial solution (i.e. only a fraction of the variables is fixed). In GAMS this can be done with statements like:

   x.fx(i,j) = solutionx(i,j);
   solve m using lp minimizing z;

The infeasibilities are reported in the solution report in the listing file.
Unfortunately not all solvers support this. Here is a small sample:
  • MINOS: ok
  • BDMLP: ok
  • Cplex: ok
  • Gurobi: no solution reported so nothing to look at
  • Mosek: not a normal solution reported 
  • Lindo: no solution reported
  • Xpress: no solution reported
  • CBC: no solution reported
This is not a pretty list. All older GAMS solvers do a good job and provide the wanted information without a problem, but the newer solvers and links do a rather poor job on helping me out.