[ADMB Users] Interpolation while optimising

Mark Payne mpa at aqua.dtu.dk
Wed Oct 6 04:50:10 PDT 2010


Hi,

That's good to hear. I was wondering though if they are there or not in the current version published on the website (9.1), as I can't seem to get access to them?

The line  
  spliney2=spine(splinex,spliney,0,0); 
generates an "out of scope" compiler error:

g++ -c -O3 -Wno-deprecated -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I. -Ic:/admb/gcc440/include Forward.cpp
Forward.cpp: In member function 'virtual void model_parameters::report()':
Forward.cpp:166: error: 'spline' was not declared in this scope

Using "spine" instead of "spline" generates a corresponding error.

Running release 9.1 on Win XP.

Mark

-----Oprindelig meddelelse-----
Fra: Derek Seiple [mailto:dseiple84 at gmail.com] 
Sendt: 5. oktober 2010 21:14
Til: Richard Methot
Cc: Mark Payne; users at admb-project.org
Emne: Re: [ADMB Users] Interpolation while optimising

I have replaced those functions that you mentioned ( spine() and
splint() ). They are still in the replacement branch but they will be
merged into the trunk soon. The names will be the same and they should
produce the same output as the old ones. They will be replaced with
the new beta release.

Derek

On Tue, Oct 5, 2010 at 7:38 AM, Richard Methot <Richard.Methot at noaa.gov> wrote:
> When I need to join two discontinuous functions in a differentiable way, I
> do something like:
>
>  f1(x)  for x<X
>  f2(x)  for x>=X
>  steep=10.;  // or larger value depending on expected magnitude of x-X
>  join(x) =1./(1.+mfexp(steep*(x-X))));  // so is steep and centered on X
>
> // composite function is then
>  f(x) = f1(x)*join(x) + f2(x)*(1.-join(x));
>
>  this is not perfect and depending on the slope of f1 and f2 near X may
> result in a small wrinkle in the composite function, but it has served my
> purposes.
>
> Rick Methot
>
> Mark Payne wrote:
>>
>> Hi,
>>
>> I have been wondering about this for quite some time. What is the
>> "correct" way to do  interpolation in ADMB, so that you don't run into
>> problems with discontinuous gradients? I see that there are a series of
>> cubic spline interpolation functions in there, spine(), splint() but that
>> they are also marked for replacement. Is there something else in the works
>> or is this the best approach?
>>
>> Cheers,
>>
>> Mark
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
>




More information about the Users mailing list