Thursday, June 11, 2009

AMPL error message

This is not a very informative error message:

sw: ampl
ampl: var b, binary;
var h;

maximize obj: b;

e: b=0 <==> h>=0;

option solver cplex;
solve;
Error executing "solve" command:

    unexpected type 0x920c in lsimplify()
sw:

I believe error messages are the “user interface” when it really matters: when the user is confused. The value of good error messages is often underestimated. Of course we can assume the developer never thought this message would be issued.

I tried the implication based on information in http://www.ampl.com/INFORMS06.pdf. I assume this has to be written as

e: b=0 ==> h>=0 else h<=-0.0001;

or

e: b=0 ==> h>=0 else h<=0;

if the ambiguity about h=0 is no problem.

No comments:

Post a Comment