-
Notifications
You must be signed in to change notification settings - Fork 1
/
SNGA.h
65 lines (47 loc) · 2.09 KB
/
SNGA.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __SNGA_FUNC_H_
#define __SNGA_FUNC_H_
//class CSNGAInd;
#include "sngaind.h"
//enum TUpdated {_No_Updated, _New_Inserted, _Distance_Replaced, _Angle_Replaced, _Distance_Angle_Replaced};
class CSNGA
{
public:
CSNGA(int pop_size);
virtual ~CSNGA();
void execute(int run, vector<double>& hvl, vector<double>& igd, double& totaltime, double &unevolvetime);//vector<double> execute(int run);
void init_population();
double calc_distance();
void save_population(vector <CSNGAInd> &mypopulation, char saveFilename[1024]); // save the pareto front into files
void save_ps(char savefilename[1024]);
//vector <int> sectorialgrid;
vector <CSNGAInd> sectorpop;
vector <CSNGAInd> ps;
CSNGAInd onechild;
int popsize;
vector<vector <double>> AnchorPoint; //êµã
vector <double> TrueNadirPoint; //true-nadir-point
vector <double> ObserverPoint;
vector <double> ReferencePoint;
//int sectornum;
//double anglesingle;
//int p_nparts;
//vector <double> UtopiaPoint;
//vector <double> PseudoNadirPoint;
//double distance;
//int nfes;
//void operator=(const CSNGA &alg);
bool Pareto_HyperVolume_compare_sectorialgrid(CSNGAInd& ind);
bool update_extreme_point(CSNGAInd& ind);
//void initial_observation_and_reference_point(CSNGAInd& ind);
//void uniform_selection(CSNGAInd*& ind_selected);
//void sbx_mutation_evolution(CSNGAInd& ind_selectedparents1, CSNGAInd& ind_selectedparents2);
void reset_angle();
void population2front(vector <CSNGAInd> &mypopulation, vector <vector<double>> &population_front);//vector <CSNGAInd>
double GetFastigiateHyperVolume(CSNGAInd& ind, int ind_index, vector <double> &ReferencePoint);
int tour_selection_hv2(vector <CSNGAInd> &mypopulation);
double tour_selection_hv_difference(int p, vector <CSNGAInd> &mypopulation);
///////////////////////////////////////////////////////////////////////////////////////////
//#Modified on 2013/9/5//////////////////////////////////////////////////////////////
double compute_hypervolume(vector <CSNGAInd>& mysectorpop, int mypopsize, int mynobj) ;
};
#endif