Simulated annealing
lchen29
03-24-2003, 08:53 PM
Simulated Annealing Question :(
Hi,
Does any one familier with the "simulated annealing" code found in the "Numerical Recipe" ?
For the continuous optimization problem, it seems to me that the FORTRAN
code is lacking of a annealing schedule,
i.e. the variable "tt" in the code does not change with time or the space of
the Brownian motion does not decrease.
Am I right ? IF so, How should I fix it ?
Any thought is welcome. Thanks
Larry Chen
behzadi
09-16-2003, 07:25 AM
Dear Larry
Hi,
As you may have found out till now, the simulated annealing subroutines lack the annealing part, and you must initialise and then 'anneal' the 'temptr' parameter in a suitable method in the main program. You may want to use one of the 3 methods described in chap.10 before the subroutines are introduced. Now, if you have managed to do this, do you ( or anyone else) know how the technique is terminated? Does a quick return mean end of the minimisation, or should the best point be saved and evaluated after every return to the main program, or is it just a matter of reducing temptr a specific number of times?
Regards,
Bahman Behzadi
David Buchan
05-26-2006, 02:58 PM
Bahman,
There are two reasons for an exit from amebsa: the requested tolerance was met, or you used up the maximum allowed number of ameoba iterations (iter) while at the current temperature. Note that iter is to be reset after each temperature reduction (i.e., each time you enter amebsa).
If you exit amebsa because the tolerance was met (rtol<ftol and so you will exit with iter>0), then you should end the whole process and print out your best answer, because that met what you were asking for. Note that iter counts DOWN from the maximum allowed number.
If you exit amebsa because you ran out of iterations (iter<0) and the tolerance was not yet met, then it's time for a temperature reduction, and you're ready to go back to amebsa for more amoeba iterations.
For my problem (see "Simulated annealing success..." post), I set the maximum number of cooling steps to 100 (knocking 20% off the temperature each step), but you can choose whatever you desire. Your goal is to, at some point, have it exit because your tolerance was met. Although, you could just give an overly restrictive tolerance and let it go through all cooling steps, and all amoeba iterations at each temperature. I chose a maximum of 2000 amoeba iterations at each temperature, but that's because I wanted iter to be >> than ndim, the number of dimensions. Even still, 2000 was really overkill. I probably should've used something more like 600 since I would have, at most, 380 or 390 dimensions.
The reason I believe iter should be >> ndim is that an overall contraction (n-dimensional contraction) counts as ndim amoeba steps, and reduces the iteration count by ndim (remember we're counting down, not up). If I have iter=200 and ndim was 380, then an overall contraction would kick me out of amebsa (because iter<0) and I wouldn't have done a sufficient job of letting the amoeba roam around at that temperature.
Hope that helps,
Dave Buchan
kutta
04-09-2007, 05:53 AM
Simulated Annealing Question :(
Hi,
Does any one familier with the "simulated annealing" code found in the "Numerical Recipe" ?
For the continuous optimization problem, it seems to me that the FORTRAN
code is lacking of a annealing schedule,
i.e. the variable "tt" in the code does not change with time or the space of
the Brownian motion does not decrease.
Am I right ? IF so, How should I fix it ?
Any thought is welcome. Thanks
Larry Chen
Hello Mr LarryChen(Ichan29) through Mr Vetterling T.William(Author)
Indeed after repeated trials the annealing method ,a topic in Applied Thermodynamics has been made use of to find salesman's path (who s to visit number of cities ) with predetermined co- ordinates.I once again write to state that the approval is awaited from the author as the sample program in java has been already placed before the author for perusal.....
However for ur conveniences Do u require the codes in java.
since ur try is totally under fortran.
The annealing method is good alternative one in the algorithm development especially for the salesma'ns shortest path.:)
Thanking You
As Always
C.R.Muthukumar(Kutta)
kutta
04-24-2007, 10:20 AM
Hello LaryChen,
Hello Mr Vetterling.T William,
Neither you nor the author has replied to my simple query. I wanted the feed back on the above subject and if the codes are worth a glimpse.Well what is the point in a long waiting .
Here is the out come of annealing technique used in salesman's voyage to number of cities. Now please arrange to make it usable universally !!!
Thanking You
As Always,
kutta
05-04-2007, 11:00 PM
The proverb used by Mr Vetterling T.William (Author of NR)a decade ago was
"Too many cooks spoil the broth."
Contextually, this was adhered, but the current strategy for the NR in java would rather require more robustical and quicksorted strategy for implementing this Java Version.
Accordingly now the proverb may be "something is better than nothing".However , we still believe that patience will be rewarded . But the patience if prolonged further may give room for .....!!!
So the current question is how long more to wait in the great Expectation of making Java blooming in the field of NR
After all goal once started should strive for its completion.
Thanking You
As Always
C.R.Muthukumar