[ADMB Users] Function minimizer not making progress

Skip to first unread message

Hamazaki, Hamachan (DFG)

Jun 1, 2011, 1:12:25 PM6/1/11
to us...@admb-project.org



I am getting an error code : “Function minimizer not making progress … is minimum attained?” at the beginning of iteration  and stops without iteration.   To solve this, I tried changed  convergence_criteria and maximum_function_evaluations, but none of them worked.


Does anyone know how to solve this error?

If anyone wants to see the code and data, I am happy to send them.






Toshihide "Hamachan" Hamazaki, 濱崎俊秀PhD

Alaska Department of Fish and Game: アラスカ州漁業野生動物課

Diivision of Commercial Fisheries: 商業漁業部

333 Raspberry Rd.  Anchorage, AK 99518

Phone:  (907)267-2158

Cell:  (907)440-9934


dave fournier

Jun 1, 2011, 10:12:39 PM6/1/11
to us...@admb-project.org
I wouldn't call it an error. It simply means that the function
minimizer can't improve
the function value any more. Now THAT may be due to an error, or it
could mean for
example that your data are highly non informative and the model is badly
or just about anything bad.
Users mailing list

dave fournier

Jun 2, 2011, 2:54:26 PM6/2/11
to us...@admb-project.org
On 11-06-02 10:29 AM, Toshihide Hamazaki wrote:

Maybe you can write this up for the list. It is a good debugging exercise.

first one should check that the derivatives are OK. I got rid of upper
case names.
I hate them because they are treated inconsistently in various stuff.

./kusko -dd 0

brings up the derivative checker. entering 0 for all parameters and
1.e-6 for
the step size shows That the derivatives are wrong.

Your LL is the sum of a bunch of stuff. Easiest is to identify which part
leads to the incorrect LL. Here I use the first 5 parts.

//f = tf1+tf2+tf3+tf4+tf5+tf6+tf7+tf8;
to this
f = tf1+tf2+tf3+tf4+tf5;

quick check of the derivatives shows they are OK.

so problem is in this part

change to

f = tf1+tf2+tf3+tf4+tf5+tf6+tf7;

play around a bit and you will find that tf6, 7, and 8 are all bad.
So there is an error in that part of the code.

Open the file in vi (your favourite text editor) or take a year off and
learn emacs.
and search for tf6. It only occurs in 3 places.

dvariable tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8;

tf6 += square(log(esc(Yr_tak(n)))-log(sltak*Obs_tak(n)))/wgt_Weir;

f = tf1+tf2+tf3+tf4+tf5+tf6+tf7+tf8;

et voila. You didn't initialize tf6-8.

Also the model is badly scaled. Pity they don't teach this stuff. Oh
well so long as your self esteem is high.
You should scale your effort to have an average of 1. Use log_q instead
of q as the independent variable and probably also for a bunch of other
parameters. As well. afew other things and I get

# Number of parameters = 39 Objective function value = 880.399 Maximum
gradient component = 1.49297e-05
# Tot_Run:
124828. 100000. 184083. 179048. 100000. 231722. 189527. 100000.
120630. 119154. 100000. 100000. 195827. 195979. 202405. 183813. 192496.
184842. 217128. 233187. 153358. 171826. 152269. 132511. 100000. 132118.
220728. 243343. 408677. 337317. 371276. 239961.
# slkwe:
# sltul:
# slgeo:
# slkog:
# sltat:
# sltak:
# log_q:

thats a q of 0.00019178798954070217

You owe me $AUD 5K (real money these days) worth of single malt.

Ian Taylor

Jun 2, 2011, 4:44:06 PM6/2/11
to dave fournier, us...@admb-project.org
A link to this debugging example has been added here:

dave fournier

Jun 2, 2011, 7:02:22 PM6/2/11
to us...@admb-project.org
Besides not intializing variables you ar generating negative escapements
and taking the logs of them. Judicious use of posfun should fix the model.
Reply all
Reply to author
0 new messages