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

📄 antnet_common.h

📁 ns-2中的antnet算法源码
💻 H
字号:
/* * antnet_common.h * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * If you are using this program for any publication, we kindly request that you cite: * "Ant Colony Optimisation Based Routing on NS-2",  * V. Laxmi, Lavina Jain and M. S. Gaur,  * International Conference on Wireless Communication and Sensor Networks (WCSN),  * India, December 2006. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * * Author: Lavina Jain * *//////////////////////////////////////////////////////////////////////////////////////////// \file antnet_common.h/// \brief Defines global variables and methods for AntNet////////////////////////////////////////////////////////////////////////////////////////#ifndef __antnet_common_h__#define __antnet_common_h__#include <agent.h>#include <node.h>#include <packet.h>#include <ip.h>#include <trace.h>#include <timer-handler.h>#include <random.h>#include <classifier-port.h>#include<tools/rng.h>#include "trace/cmu-trace.h"#include "tools/queue-monitor.h"#include "queue/drop-tail.h"/// Macro to retrieve current simulator time #define CURRENT_TIME Scheduler::instance().clock()/// Maximum number of nodes in topology#define MAX_NUM_NODES 16/// file name in which routing tables generated by AntNet are dumped#define file_rtable "rtable.txt"#define DEBUG 0/// maximum length of observation window#define WIN_LEN 300/// AntNet parameters#define VARSIGMA 0.005#define ALPHA 0.45	//relative weight of heuristic info w.r.t pheromone#define c1 0.7#define c2 0.3#define zee 1.7/// Method to return number of neighbors of a nodeint get_num_neighbors(nsaddr_t node_addr);/// Method to return queue length of a link between two nodesint get_queue_length(Node *node1, Node *node2); #endif

⌨️ 快捷键说明

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