?? hardy_onecodedlg.h
字號:
#if !defined(AFX_HARDY_OneCodeDLG_H__5B05D228_95ED_4F9E_BF80_A405FCCBB54F__INCLUDED_)
#define AFX_HARDY_OneCodeDLG_H__5B05D228_95ED_4F9E_BF80_A405FCCBB54F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Hardy_GADlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CHardy_OneCodeDlg dialog
class CHardy_OneCodeDlg : public CDialog
{
// Construction
public:
CHardy_OneCodeDlg(CWnd* pParent = NULL); // standard constructor
#define POPSIZE 150
#define PARAMNUM 3
public:
double m_dParama[111],m_dParamq[111],m_dParamb[111]; //多面函數參數
double m_dXigmaE[221]; //E-Q(x,y)
int m_iRepeatNum;
double m_dB[211],m_dL[211],m_dE[211]; //已知數據
int m_iPtNum; //已知點個數
int m_iParamNum; //待求參數個數
double m_dCodeB[111],m_dCodeL[111],m_dCodeE[111]; //節點數據
int m_iCodeNum; //節點個數
double m_dAntibody[POPSIZE+1][PARAMNUM+1];
double m_dObjective[POPSIZE+1];
double m_dAbsV; //殘差絕對值之和/種群規模
double q[POPSIZE+1]; //用于選擇操作
public:
void GA_Initialization(void);
void GA_Evaluation(int gen);
void GA_Selection(void);
void GA_Crossover(void);
void GA_Mutation(void);
int GA_Constraint_check(double x[]);
void GA_Objective(void); //遺傳算法,求目標函數
// Dialog Data
//{{AFX_DATA(CHardy_OneCodeDlg)
enum { IDD = IDD_Hardy_OneCode };
double m_dCrosser;
CString m_strKnownFilePath;
double m_dMutation;
CString m_strParamFilePath;
double m_dq;
int m_db;
int m_iPopSize;
int m_iMaxCalcNum;
BOOL m_bOverwrite;
CString m_strOutputFilePath;
double m_dFlat;
int m_iCodeIndex;
BOOL m_iOpenOutputFile;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHardy_OneCodeDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CHardy_OneCodeDlg)
afx_msg void OnCalc();
afx_msg void OnBTNOpenKnownFile();
afx_msg void OnBTNOpenParamFile();
afx_msg void OnBTNOpenOutputFile();
afx_msg void OnChangeEDTPopSize();
afx_msg void OnChangeEDTMaxCalcNum();
afx_msg void OnChangeEDTCrosser();
afx_msg void OnChangeEDTMutation();
virtual void OnCancel();
afx_msg void OnChangeEdtb();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HARDY_GADLG_H__5B05D228_95ED_4F9E_BF80_A405FCCBB54F__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -