help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Re: simulated annealing


From: Carl Boettiger
Subject: [Help-gsl] Re: simulated annealing
Date: Thu, 30 Apr 2009 10:52:35 -0700

Looks like I was passing gsl_siman_solve a sizeof(double) instead of
sizeof(STR), my structure. I believe I want to use the variable-sized
option with copy constructors and destructors to handle my case.

On Thu, Apr 30, 2009 at 1:22 AM, Carl Boettiger <address@hidden> wrote:
> Hi,
>
> I am finding strange behavior in the simulated annealing package.  I
> have modified the trivial example so that the state space can be
> represented as a structure, rather than a single double value.  This
> is crucial for me as I need to pass my objective function that i am
> trying to minimize several different parameters of different types.
> This works fine for the trivial structure of one element.  However, as
> soon as I add another element to the structure _ahead_ of the element
> I am varying to minimize my objective function, the routine fails.  It
> prints out a fixed and meaningless value in place of the variable I am
> trying to minimize.  If the structure is defined in the other order,
> this does not happen.
>
> I've attached the code.  I have no idea why I get this behavior.  If
> anyone has an example function that calls the simulated annealing
> package using a statespace that is not a single value or array, I'd
> appreciate it too.  Thanks for your insights,
>
> Carl
> --
> Carl Boettiger
> Population Biology, UC Davis
> http://two.ucdavis.edu/~cboettig
>



-- 
Carl Boettiger
Population Biology, UC Davis
http://two.ucdavis.edu/~cboettig




reply via email to

[Prev in Thread] Current Thread [Next in Thread]