[SciPy-dev] Advice on Simulated Annealing (ticket #875)
Mon Mar 2 05:53:29 CST 2009
On Mon, Mar 2, 2009 at 12:55 AM, Stéfan van der Walt <email@example.com> wrote:
> Is there anyone here who has some experience with simulated annealing?
> The code at
> looks fragile, but I don't know how to fix it best.
I had looked at this ticket briefly, and, I think, following his
suggestion of building the random array xt incrementally should not
affect any other code and speed up finding a random array inside the
The elements of xc are independently drawn, so in each iteration only
those values, for which indu or indo are true, have to be replaced,
and successfull draws can be kept. xc can be drawn for the full array
and partially discarded, since this is cheap.
something like this (use correct `or` and initialize indu and indo for
first iteration) should work
xt[indu or indo] = x0[indu or indo] + xc[indu or indo]
More information about the Scipy-dev