📄 psovrp.h
字号:
// PsoVrp.h: interface for the CPsoVrp class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PSOVRP_H__3BA3E859_DDC6_4CEB_B093_7515BB2E0A82__INCLUDED_)
#define AFX_PSOVRP_H__3BA3E859_DDC6_4CEB_B093_7515BB2E0A82__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"
class CPsoVrp
{
typedef struct Node{
int Xv[TASK+1];
double Xr[TASK+1];
int iXr[TASK+1];
int Vv[TASK+1];
double Vr[TASK+1];
double value;
}PNODE;
typedef struct DNode{
PNODE Node;
PNODE LocalNode;
}DPNODE;
typedef struct GPNode{
int index[TASK+1];
int x[TASK+1];
int y[TASK+1];
double weight[TASK+1];
}GPNode;
private:
DPNODE VNode[PopSize];
PNODE GBest;
public:
GPNode GPNode;
private:
void initialize();
void reserial(PNODE *PNode);
double Eval(PNODE *PNode);
void localbest(int Pos);
void globalbest(int Pos);
void comput_Pso(int Pos);
double abs(double s);
public:
double Vrp_Pso();
CPsoVrp();
virtual ~CPsoVrp();
};
#endif // !defined(AFX_PSOVRP_H__3BA3E859_DDC6_4CEB_B093_7515BB2E0A82__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -