⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 a.h

📁 蚂蚁算法又称蚁群算法
💻 H
字号:
#define Bw 70              /* threhold of band,delay,jitter,loss */
#define Dw 50
#define Lw 1e-3
#define Jw 3
#define a0  0.069          /* parameter   */
#define a1  0.079
#define cons 0.32
#define A 0
#define B 10
#define C 15
#define T 5
#define M 20                    // number of ant 
#define constant 100.0            // initialization of pheromone  
#define N 15               // the threhold of node

void rout();
void network();
double exp(int x);
int CHOOSE(double x[9]);             // choose the next node 
double SUM(double x[9]);             // double array summing 
double L_UPDATE(double x);           // local update
double G_UPDATE(double x, double z);    // global update 
int OPTIMIZATION(double x[M+1]);      // select the shortest path 
double COST_F(int x[N]);           // cost function 


double phero[N][N]={0};
int ndl[N]={0};
double lr[N]={0};
int dv[N]={0};
int link[N][N]={0};
int cost[N][N]={0};
int bw[N][N]={0};
int ldl[N][N]={0};
int path[M][N]={0};
int n,sour_n,dest_n;
double s1,s2;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -