Simulated anneling based supervisor. More...
#include "ne_std.h"
#include "ne_sys.h"
#include "ne_mut.h"
#include "ne_per.h"
#include "ne_sim.h"
Go to the source code of this file.
Data Structures | |
struct | ne_sup_sa_params_t |
Structure to hold parameters for simulated annealing algorithm. More... | |
struct | ne_sup_sa_trail_results_t |
Structure to pass current results between functions. More... | |
Typedefs | |
typedef ne_err_code_t | ne_sup_sa_analysis_fn_t (ne_sys_t *sys, ne_dyn_vec_t *dyn, int iteration, double temp, double Q, ne_bool_t forceOutput) |
Simulated annealing analysis function type. | |
Functions | |
ne_sup_sa_params_t * | ne_sup_sa_params_alloc (int initialTrials, double tempReduce, int mainTrails, int acceptTrials, int acceptRunsNoChange, double minTemp, int maxIterations, double(*initialTempFn)(double), ne_per_t *QFn, ne_mut_t *mutationFn, ne_sim_fn_t *simFn, void *simParams, ne_dyn_vec_t *initCond, ne_sup_sa_analysis_fn_t *analysisFn, FILE *evoFile) |
Allocate a parameters structure for simulated annealing supervisor. | |
void | ne_sup_sa_params_free (ne_sup_sa_params_t *params) |
Free simulated annealing parameters structure. | |
ne_sys_t * | ne_sup_sa_run (ne_sys_t *sys, ne_sup_sa_params_t *params) |
Runs the simulated annealing optimisation. | |
ne_sys_t * | ne_sup_sa_trail (ne_sys_t *sys, double T, ne_sup_sa_trail_results_t *results, ne_sup_sa_params_t *params) |
Runs an individual simulated annealing trail at a given temperature. | |
double | ne_sup_sa_simulate (ne_sys_t *sys, ne_sup_sa_params_t *params) |
Simulate a system with the given settings. | |
double | ne_sup_sa_int_temp_basic (double qMax) |
The startard function for picking initial temperature of simulated annealing process. |
Simulated anneling based supervisor.
Supervisor that implements an adapted form of simulated annealing for graph based problems. Most aspects are customisable via the parameters structure that is sent when run. Simulation of trials are performed in parallel using OpenMP to distribute and manage separate threads.
Definition in file ne_sup_sa.h.
typedef ne_err_code_t ne_sup_sa_analysis_fn_t(ne_sys_t *sys, ne_dyn_vec_t *dyn, int iteration, double temp, double Q, ne_bool_t forceOutput) |
Simulated annealing analysis function type.
Definition at line 41 of file ne_sup_sa.h.
double ne_sup_sa_int_temp_basic | ( | double | qMax | ) |
The startard function for picking initial temperature of simulated annealing process.
Definition at line 411 of file ne_sup_sa.c.
ne_sup_sa_params_t* ne_sup_sa_params_alloc | ( | int | initialTrials, | |
double | tempReduce, | |||
int | mainTrails, | |||
int | acceptTrials, | |||
int | acceptRunsNoChange, | |||
double | minTemp, | |||
int | maxIterations, | |||
double(*)(double) | initialTempFn, | |||
ne_per_t * | QFn, | |||
ne_mut_t * | mutationFn, | |||
ne_sim_fn_t * | simFn, | |||
void * | simParams, | |||
ne_dyn_vec_t * | initCond, | |||
ne_sup_sa_analysis_fn_t * | analysisFn, | |||
FILE * | evoFile | |||
) |
Allocate a parameters structure for simulated annealing supervisor.
Definition at line 33 of file ne_sup_sa.c.
void ne_sup_sa_params_free | ( | ne_sup_sa_params_t * | params | ) |
Free simulated annealing parameters structure.
Definition at line 67 of file ne_sup_sa.c.
ne_sys_t* ne_sup_sa_run | ( | ne_sys_t * | sys, | |
ne_sup_sa_params_t * | params | |||
) |
Runs the simulated annealing optimisation.
Definition at line 73 of file ne_sup_sa.c.
double ne_sup_sa_simulate | ( | ne_sys_t * | sys, | |
ne_sup_sa_params_t * | params | |||
) |
Simulate a system with the given settings.
Definition at line 363 of file ne_sup_sa.c.
ne_sys_t* ne_sup_sa_trail | ( | ne_sys_t * | sys, | |
double | T, | |||
ne_sup_sa_trail_results_t * | results, | |||
ne_sup_sa_params_t * | params | |||
) |
Runs an individual simulated annealing trail at a given temperature.
Definition at line 231 of file ne_sup_sa.c.