Sunday, April 5, 2009

GAMS/Gurobi link

During a demo of GAMS/Gurobi we found a minor error. It shows NOPT's for equations in optimal MIP models. No show-stopper: you should just ignore these messages for now. This is with model magic.gms from the model library:

               S O L V E      S U M M A R Y

     MODEL   william             OBJECTIVE  cost
     TYPE    MIP                 DIRECTION  MINIMIZE
     SOLVER  GUROBI              FROM LINE  81

**** SOLVER STATUS     1 NORMAL COMPLETION        
**** MODEL STATUS      1 OPTIMAL                  
**** OBJECTIVE VALUE           988540.0000

---- EQU maxu  maximum generation level (1000mw)

                       LOWER          LEVEL          UPPER         MARGINAL

type-1.12pm-6am        -INF          -13.8000          .              .         
type-1.6am-9am         -INF           -8.0000          .              .         
type-1.9am-3pm         -INF          -13.0000          .              .         
type-1.3pm-6pm         -INF           -2.7500          .              .         
type-1.6pm-12pm        -INF          -12.7500          .              .         
type-2.12pm-6am        -INF           -0.4500          .              .         
type-2.6am-9am         -INF             .              .         -2100.0000  NOPT
type-2.9am-3pm         -INF             .              .         -4200.0000  NOPT
type-2.3pm-6pm         -INF             .              .         -2100.0000  NOPT
type-2.6pm-12pm        -INF             .              .         -4200.0000  NOPT
type-3.12pm-6am        -INF             .              .              .         
type-3.6am-9am         -INF             .              .              .         
type-3.9am-3pm         -INF             .              .              .         
type-3.3pm-6pm         -INF           -5.0000          .              .         
type-3.6pm-12pm        -INF             .              .              .         


**** REPORT SUMMARY :        4     NONOPT ( NOPT)
Note: these NOPTS are used to mark rows and columns with the wrong sign for the marginals in LP's. In this case the signs for these row marginals (i.e. duals) look just fine. In GAMS, after a MIP is solved, an LP is formed by fixing the integer variables. The marginals reported in the listing file is for this fixed LP problem. In general, NOPT flags should never appear in a model that is declared optimal: they are reserved for models that are intermediate non-optimal, a status that can happen e.g. when hitting a time or iteration limit before the model was optimal. If we analyze this a little bit further, we note that for an optimal minimization problem all marginals corresponding to non-basic rows (and columns) at upper bound should be negative or EPS. This is the case for these rows, and the NOPT flag is therefore inaccurate. Note that a row or column can be basic while at bound (this is also known as degeneracy). We see a few of those degenerate rows also (they are reported correctly).

Update: this is fixed.