Thursday, September 3, 2009

Numerical issues with CONOPT

Here is a small linear model we solve as CNS (constrained nonlinear system) with CONOPT:

1  variable x;
2  equation e;
3  
4  e.. x =e= exp(100);
5  
6  model m /e/;
7  solve m using cns;

The resulting error message is somewhat difficult to comprehend:

** An equation in the pre-triangular part of the model cannot
   be solved because the equation or its derivatives appear to
   be discontinuous or because the function and derivative are
   inconsistent.

   x appearing in
   e: Equation and/or derivative appear to be discontinuous or inconsistent

**** SOLVER STATUS     1 Normal Completion        
**** MODEL STATUS      4 Infeasible               

                           LOWER          LEVEL          UPPER

---- VAR x                 -INF      5.0000000E+9        +INF        

I suspect CONOPT is using some upper-bound internally for variables leading to this message.

GAMS generates the equation:

---- e  =E= 

e..  x =E= 2.68811714181616E43 ; (LHS = 0, INFES = 2.68811714181616E43 ****)

which seems correct.

No comments:

Post a Comment