Evolutionary Algorithm for Adaptive Phase Estimation
1.0.2
|
PSO class contains the functions that are specific to this particular optimization algorithm. More...
#include <mpi_optalg.h>
Public Member Functions | |
PSO (Problem *problem_ptr, Rng *gaussian_rng, int pop_size) | |
void | put_to_best () |
void | combination () |
void | selection () |
void | write_param (double *param_array) |
void | read_param (double *param_array) |
void | fit_to_global () |
void | find_global () |
Public Member Functions inherited from OptAlg | |
OptAlg (Problem *problem_ptr, Rng *gaussian_rng, int pop_size) | |
void | Init_population (int psize) |
void | Init_previous (double prev_dev, double new_dev, int psize, double *prev_soln) |
void | Cont_fitness (int p) |
void | Best_fitness (int p) |
void | update_popfit () |
void | set_success (int iter, bool goal) |
bool | check_success (int t, double *current_fitarray, double *memory_fitarray, int data_size, double t_goal, bool *mem_ptype, int *numvar, int N_cut, double *memory_forT) |
double | Final_select (double *fit, double *solution, double *fitarray) |
double | avg_Final_select (double *solution, int repeat, double *soln_fit, double *fitarray) |
void | dev_gen (double *dev_array, double prev_dev, double new_dev, int cut_off) |
int | find_max (double *fit) |
Additional Inherited Members | |
Public Attributes inherited from OptAlg | |
Problem * | prob |
bool | success |
bool | policy_type |
Protected Attributes inherited from OptAlg | |
int | num |
int | num_fit |
Rng * | gaussian_rng |
int | pop_size |
int | T |
int | t |
Candidate * | pop |
bool | goal |
int | total_pop |
int | my_rank |
int | nb_proc |
PSO class contains the functions that are specific to this particular optimization algorithm.
|
virtual |
This function main purpose is to prepare the population for optimization after the population is initialized and the first calculation of the fitness function.
Combination() generates the position and velocity for the next time step using the rule with inertia term. The new position is stored in the contender and computed for mean fitness value.
Reimplemented from OptAlg.
|
virtual |
This function copies memories on best array to global array.
The global best position is find for a neighborhood of three. Because of the circular topology, the neighbors are on other processors and the fitness values from the best array are sent back to the candidate. The candidate then communicates with the processor containing the highest fitness values of the three and ask for the rest of the information.
Reimplemented from OptAlg.
|
inlinevirtual |
This function reads the search parameters that are currently in use.
Reimplemented from OptAlg.
|
virtual |
|
virtual |
This function let the user specify new values to the search parameters.
Reimplemented from OptAlg.
|
virtual |
This function generates new candidates that competes with the existing population. This is one potential bottleneck in the communication between processors.
In PSO, selection chooses whether the position stored in contender is a new personal best, and, if so, store it in best array. The global best position is then searched and updated.
Reimplemented from OptAlg.
|
virtual |
This function performs selects the candidates for the next round of iteration.
Reimplemented from OptAlg.