Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00030 #ifndef NE_SUP_SA_H
00031 #define NE_SUP_SA_H
00032
00033
00034 #include "ne_std.h"
00035 #include "ne_sys.h"
00036 #include "ne_mut.h"
00037 #include "ne_per.h"
00038 #include "ne_sim.h"
00039
00041 typedef ne_err_code_t ne_sup_sa_analysis_fn_t (ne_sys_t *sys, ne_dyn_vec_t *dyn, int iteration,
00042 double temp, double Q, ne_bool_t forceOutput);
00043
00045 typedef struct {
00046 int initialTrials;
00047 double tempReduce;
00048 int mainTrials;
00049 int acceptTrials;
00050 int acceptRunsNoChange;
00051 double minTemp;
00052 int maxIterations;
00053 double (*initialTempFn) (double);
00054 ne_per_t *QFn;
00055 ne_mut_t *mutationFn;
00056 ne_sim_fn_t *simFn;
00057 void *simParams;
00058 ne_dyn_vec_t *initCond;
00059 ne_sup_sa_analysis_fn_t *analysisFn;
00060 FILE *evoFile;
00061 } ne_sup_sa_params_t;
00062
00064 typedef struct {
00065 double Q1;
00066 double Q2;
00067 double dQ;
00068 double a;
00069 ne_dyn_vec_t *curDyn;
00070 } ne_sup_sa_trail_results_t;
00071
00073 ne_sup_sa_params_t * ne_sup_sa_params_alloc (int initialTrials, double tempReduce, int mainTrails,
00074 int acceptTrials, int acceptRunsNoChange, double minTemp,
00075 int maxIterations, double (*initialTempFn) (double),
00076 ne_per_t *QFn, ne_mut_t *mutationFn, ne_sim_fn_t *simFn,
00077 void *simParams, ne_dyn_vec_t *initCond,
00078 ne_sup_sa_analysis_fn_t *analysisFn, FILE *evoFile);
00079
00081 void ne_sup_sa_params_free (ne_sup_sa_params_t *params);
00082
00084 ne_sys_t * ne_sup_sa_run (ne_sys_t *sys, ne_sup_sa_params_t* params);
00085
00087 ne_sys_t * ne_sup_sa_trail (ne_sys_t *sys, double T, ne_sup_sa_trail_results_t *results,
00088 ne_sup_sa_params_t *params);
00089
00091 double ne_sup_sa_simulate (ne_sys_t *sys, ne_sup_sa_params_t* params);
00092
00094 double ne_sup_sa_int_temp_basic (double qMax);
00095
00096
00097 #endif