[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Simulated Annealing
From: |
John Gehman |
Subject: |
Re: [Help-gsl] Simulated Annealing |
Date: |
Tue, 31 Oct 2006 14:20:11 +1100 (EST) |
User-agent: |
SquirrelMail/1.4.8 |
G'day Fred,
I don't have the documentation handy at the moment, so just some general
guidance ...
What you've done is a systematic search of all parameter space. And even
though you've declared double type, you appear to be considering only
integer values for x and y. Maybe that's good enough, but if you consider
real double number, you might get a better extremes.
Simulated Annealing will help you if your "energy surface" (i.e. the
surface defined by z values for give (x,y) is relatively discontinuous,
i.e. very very flat in most areas with narrow bands of steep descent, or
strafed with lots of local minima/maxima which make it difficult to find
the global minimum/maximum.
On the other hand if your surface is reasonably smooth, and if you have an
analytic expression for the derivative of your function with respect to
both x and y, (or even if not), you could look into nonlinear least
squares fitting routines with or without derivatives, (or use the
empirical derivative-finding routines). Alternatively you can use the
minimizer functions which iteratively bracket the minimum until a
satisfactory minimum is found.
Regards,
john
> Hi
>
> I have a routine
> double myRou ( double x, double y ) { ... };
>
> the way I use it is run it with many combinations of x,y and find which
> x,y combination gives the lowest or highest retrun. so I do
> vector<double> res;
> for(double i = 1; i < 1000; ++i) {
> for( double j = 1; j < 1000; ++j) {
> res.push_back( myRou( i, j );
> }
> }
> then I go to find the maximum or minimum values in res.
> with out the loop which ends up taking the whole day.
>
> is there some algorithm that can help me find the global min/max.
> with out the looping, I was reading about gsl Simulated Annealing
> http://www.gnu.org/software/gsl/manual/html_node/Trivial-example.html#Trivial-example
> but realy could not understand how to apply it to my function. if someone
> could please show a code on how to use myRou.
>
> thanks
>
>
> ---------------------------------
> We have the perfect Group for you. Check out the handy changes to Yahoo!
> Groups.
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>
--
Dr John Gehman
Research Fellow
School of Chemistry
Bio21 Institute
University of Melbourne (Australia)