Thursday, February 4, 2016

Cplex wish list

Express your most wanted features here: https://www.ibm.com/developerworks/rfe/. And look what other users want.

On top of my list: better feedback if something is wrong. For example infeasible or unbounded models: give a reasonable report. Also make sure to answer the question: "What to do next?",

Second: be smarter with memory. I prefer that the model runs with fewer threads when memory is or becomes tight. 

Update.

Here is a small example of a GAMS listing file with Cplex and with CONOPT of the same infeasible model. In most cases I woud prefer the second output. Note that I am not sure if these issues are pure Cplex or if the GAMS/Cplex link could be improved here.

Cplex

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

     MODEL   m                   OBJECTIVE  z
     TYPE    QCP                 DIRECTION  MINIMIZE
     SOLVER  CPLEX               FROM LINE  19

**** SOLVER STATUS     1 Normal Completion        
**** MODEL STATUS      19 Infeasible - No Solution
**** OBJECTIVE VALUE               NA

RESOURCE USAGE, LIMIT         NA          1000.000
ITERATION COUNT, LIMIT        NA    2000000000
EVALUATION ERRORS             NA             0

IBM ILOG CPLEX   24.6.1 r55820 Released Jan 18, 2016 WEI x86 64bit/MS Windows
Cplex 12.6.3.0

Space for names approximately 0.00 Mb
Use option 'names no' to turn use of names off
QP status(3): infeasible
Cplex Time: 0.00sec (det. 0.00 ticks)

No solution returned

Conopt

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

     MODEL   m                   OBJECTIVE  z
     TYPE    QCP                 DIRECTION  MINIMIZE
     SOLVER  CONOPT              FROM LINE  19

**** SOLVER STATUS     1 Normal Completion        
**** MODEL STATUS      4 Infeasible               
**** OBJECTIVE VALUE               39.0000

RESOURCE USAGE, LIMIT   0.0000E+0000      1000.000
ITERATION COUNT, LIMIT         5    2000000000
EVALUATION ERRORS              0             0
CONOPT 3         24.6.1 r55820 Released Jan 18, 2016 WEI x86 64bit/MS Windows
 
 
    C O N O P T 3   version 3.17A
    Copyright (C)   ARKI Consulting and Development A/S
                    Bagsvaerdvej 246 A
                    DK-2880 Bagsvaerd, Denmark
 
 
    The model has 11 variables and 14 constraints
    with 32 Jacobian elements, 5 of which are nonlinear.
    The Hessian of the Lagrangian has 5 elements on the diagonal,
    0 elements below the diagonal, and 5 nonlinear variables.
 
                   Pre-triangular equations:   0
                   Post-triangular equations:  1
 
 
** Infeasible solution. There are no superbasic variables.
 
 
CONOPT time Total                            0.002 seconds
   of which: Function evaluations             0.000 =  0.0%
             1st Derivative evaluations       0.000 =  0.0%
 

                           LOWER          LEVEL          UPPER         MARGINAL

---- EQU objective           .              .              .             EPS        

---- EQU e1 

          LOWER          LEVEL          UPPER         MARGINAL

i1        -1.0000        -1.0000        -1.0000         1.0000     
i2        -2.0000        -2.0000        -2.0000         EPS        
i3        -3.0000        -4.0000        -3.0000         0.5000 INFES
i4        -4.0000        -4.0000        -4.0000         EPS        
i5        -5.0000        -5.0000        -5.0000         EPS        

---- EQU e2 

          LOWER          LEVEL          UPPER         MARGINAL

i1        -INF           -1.0000        -1.0000        -0.5000     
i2        -INF           -1.0000        -1.0000        -0.5000     
i3        -INF           -1.0000        -1.0000          .         
i4        -INF           -2.0000        -1.0000          .         

---- EQU e3 

          LOWER          LEVEL          UPPER         MARGINAL

i1         1.0000          .            +INF            1.0000 INFES
i2         1.0000        -1.0000        +INF            1.0000 INFES
i3         1.0000         1.0000        +INF            1.5000     
i4         1.0000         1.0000        +INF            1.5000     

---- VAR a 

          LOWER          LEVEL          UPPER         MARGINAL

i1          .              .            +INF            1.5000     
i2          .             1.0000        +INF             .         
i3          .             2.0000        +INF             .         
i4          .             3.0000        +INF             .         
i5          .             5.0000        +INF             .         

---- VAR b 

          LOWER          LEVEL          UPPER         MARGINAL

i1          .             1.0000        +INF             .         
i2          .             1.0000        +INF             .         
i3          .             2.0000        +INF             .         
i4          .             1.0000        +INF             .         
i5          .              .            +INF            1.5000     

                           LOWER          LEVEL          UPPER         MARGINAL

---- VAR z                 -INF           39.0000        +INF             .         


**** REPORT SUMMARY :        0     NONOPT
                             3 INFEASIBLE (INFES)
                    SUM          4.0000
                    MAX          2.0000
                    MEAN         1.3333
                             0  UNBOUNDED
                             0     ERRORS

 

When I use IIS on this I see no difference. (I believe IIS is only for LPs, but I don’t see a message to that effect. I would like to see some feedback about why this option did not work.).

Sometimes CONOPT can also provide a “trace” of the presolve which can be very helpful:

 ** An equation is inconsistent with other equations in the
    pre-triangular part of the model.
 
    Residual=           1.0000000
    Tolerance (Rtnwtr)= 2.00000000E-08
 
 
    The critical pre-triangular constraints and the variables they are
    solved for in solution order:
 
    Equation e1(i2) has been solved with respect to
    variable a(i1). Value = 1
    Equation e1(i1) has been solved with respect to the slack
    After the last operation the residual is still -1
 
CONOPT time Total                            0.002 seconds
   of which: Function evaluations             0.000 =  0.0%
             1st Derivative evaluations       0.000 =  0.0%
 

**** ERRORS/WARNINGS IN EQUATION e1(i1)
     1 error(s): Inconsistency in pre-triangular part of model.

With GAMS+Cplex there is also some confusion about messages only available in the listing file or the log. You really have to inspect both very carefully. I would prefer important messages to be in both.

In this case a reasonable Cplex message ended up in the log but not in the listing file:

Constraints 'e1(i2)' and 'e1(i1)' are inconsistent. 

For developers the handling of error messages is probably a boring detail, but my argument is that well-designed error messages and other feed feedback is very important. They are the only thing you have when things go wrong, and when there is already a state of confusion as things are not going the way they should go.

No comments:

Post a Comment