Optimization again



Hello,

> Last night I programmed up a very simplified simulated annealing 
> function using an independent multivariate normal proposal. 

The distrib package contains the box-mueller gaussian simulator.

> I noticed 
> several issues, the first is that I'm not sure the "right" way to 
> evaluate an expression within this type of a function. I've heard the 
> debates on ev versus subst and soforth, but it seems to me like I need 
> to use "ev" because I'm not guaranteed that I have a simple expression. 
> for example if the figure of merit is a block or a call to a function, 
> or a compound expression. Currently when I want to evaluate my figure of 
> merit at the current location I do something like this:
>
> nextval:ev(expr,map("=",vars,nextpos))
>
> Any comments?
>   
subst also work in both cases, expressions and functions:

subst(map("=",[x,y],[1,2]), x^2+y^2);
f(x,y):=x^2+y^2$
subst(map("=",[x,y],[1,2]), f(x,y));


> Anyone have any experience on simulated annealing as far as how to deal 
> with different scales for each of the variables, and how to adjust the 
> temperature as the iterations proceed? Any reference books or websites?
>
>   
Here are a pair of ideas about the cooling scheme, together with some 
bibliography:
http://esa.ackleyshack.com/thesis/esthesis7/node32.html


See also this site from Wolfram Research:
http://mathworld.wolfram.com/SimulatedAnnealing.html

and the comments on the 'threshold acceptance' method. Maybe this is the 
one used by Mathematica, who knows?

-- 
Mario Rodriguez Riotorto
www.biomates.net