[ADMB Users] inner maxg = 0 infinite loop in ADMB-RE

dave fournier otter at otter-rsch.com
Thu Dec 23 03:06:03 PST 2010


sorry that was a bit too much of a rush. you have to update the b at 
each stage as in the following.


#include <admodel.h>
main()
{
   int n=25;
   double Binit=1000;
   double C=500;
   double B=Binit;
   for (int i=1;i<=n;i++)
   {
      B=B/(1.0+C/(n*B));
   }
   cout << Binit-B << " " << C << endl;
}



More information about the Users mailing list