Running AMPL with SNOPT: can't evaluate acos'(-1). Bug: "scream" called.

26 views
Skip to first unread message

Cuicui Chen

unread,
Jul 20, 2017, 10:29:31 PM7/20/17
to AMPL Modeling Language
Hi! 

I am using SNOPT 7.5-1.2 with AMPL Version 20170630. The problem seems to be related to SNOPT, so if there is a better place to discuss this, please let me know (and my apologies for posting it in the wrong place!). 

Otherwise, the problem is as follows.  For a nonlinear optimization problem, I encountered the following error:

Error evaluating objective function: can't evaluate acos'(-1).
SNOPT 7.5-1.2 : Bug: "scream" called.
4294956185 iterations

I cannot figure out why...I also tried KNITRO in place of SNOPT, and there is no error message.  Could anyone help explain what was wrong with SNOPT?

The files are attached. To run, cd to the folder firm_10, and call AMPL to run MC_2d_generate_behavior.mod.  I would really appreciate your help!

Best,
Cuicui
problem_cuicui.zip

Robert Fourer

unread,
Jul 21, 2017, 7:41:14 PM7/21/17
to am...@googlegroups.com
The immediate problem is that when target_W_t=min_W or integrand_GH[w]=min_P, your expressions for v_plus and dv_plus_dW involve acos(-1). When SNOPT asks for derivatives of your problem functions, this results in a computation that involves the derivative of acos at -1, which is -Infinity -- hence the message "can't evaluate acos'(-1)". (Here acos' represents the first derivative of acos.)

This error seems to be occurring at the very beginning of the SNOPT run, so changing the initial values of the variables to avoid evaluations of acos' may avoid the problem. We are not sure of the reason for the strange messages from SNOPT after the evaluation error, but they may represent just a bug in reporting the error. We'll investigate that further.

Knitro is more robust in recovering from evaluation errors, and that is probably why you did not see any similar message when solving with Knitro.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages