
122
Chapter 7
A Sample Program
A general optimization subroutine using simulated annealing is given
here.
It can easily be modified to minimize any multivariate function.
The principle involved is exactly the same as in learning network
weights, and the reader's understanding of the algorithm is enhanced
by avoiding the overhead of a complete network learning program.
Again note that this algorithm departs from traditional techniques in
several ways. See the last section of this chapter for a discussion.
#define RANDMAX 32767
static void shake ( int nvars, double 'center, double *x, double temp ) ;
double anneal (
double (*func)( int n , doubl ...