Go to the first, previous, next, last section, table of contents.

Simulated Annealing functions

Simulated annealing: gsl_siman_Efunc_t
double (*gsl_siman_Efunc_t) (void *xp);

Simulated annealing: gsl_siman_step_t
void (*gsl_siman_step_t) (void *xp, double step_size);

Simulated annealing: gsl_siman_metric_t
double (*gsl_siman_metric_t) (void *xp, void *yp);

Simulated annealing: gsl_siman_print_t
void (*gsl_siman_print_t) (void *xp);

Simulated annealing: gsl_siman_params_t
These are the parameters that control a run of gsl_siman_solve.

/* this structure contains all the information 
   needed to structure the search, beyond the 
   energy function, the step function and the 
   initial guess. */

struct s_siman_params {
  /* how many points to try for each step */
  int n_tries;          

  /* how many iterations at each temperature? */
  int iters_fixed_T;    

  /* max step size in the random walk */
  double step_size;     

  /* the following parameters are for the 
     Boltzmann distribution */
  double k, t_initial, mu_t, t_min;
};

typedef struct s_siman_params gsl_siman_params_t;

Simulated annealing: void gsl_siman_solve (void *x0_p, gsl_siman_Efunc_t Ef, gsl_siman_metric_t distance, gsl_siman_print_t print_position, size_t element_size, gsl_siman_params_t params)
Does a simulated annealing search through a given space. The space is specified by providing the functions Ef, distance, print_position, element_size.

The params structure (described above) controls the run by providing the temperature schedule and other tunable parameters to the algorithm (see section Simulated Annealing algorithm). p The result (optimal point in the space) is placed in *x0_p.

If print_position is not null, a log will be printed to the screen with the following columns:

number_of_iterations temperature x x-(*x0_p) Ef(x)

If print_position is null, no information is printed to the screen.


Go to the first, previous, next, last section, table of contents.