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

📄 leach_test

📁 这个市一个ns环境下的leach算法!大家可以多下在啊!我想要一个matlab环境下的概算法!
💻
字号:
#!/bin/bash# This file runs a generic LEACH protocol simulation.#This is the algorithm that we are going to run.alg=leach#dirname, filename =  #   The directory and filename that we want our output to be written.dirname="mit/leach_sims"filename=$alg#Topology#  This file is the scenario that we are going to run.#  This file can be editted manually if you are very careful to create#    a predefined topology.  To generate a random topology go to the#    ./mit/uAMPS/sims directory and run 'ns genscen'.topology_file="mit/uAMPS/sims/100nodes.txt"#number of clusters we want.  It is recommended to use 5% of the total#   number of nodes in the scenario.num_clusters=5# energy values.  How much energy does each node have initiallyeq_energy=1init_energy=2# stop is the time to stop the simulation if it is still runningstop=3600# x,y is the size of the fieldx=1000y=1000# bs_x, bs_y is the location of the base station in the field.bs_x=50bs_y=175# Number of nodes.  WARNING!  This should be 1 higher then the number#  of nodes generated in the scenario.nn=101ns tcl/ex/wireless.tcl  \-sc mit/uAMPS/sims/nodescen \-rp $alg \-x $x \-y $y \-nn $nn \-stop $stop \-eq_energy $eq_energy \-init_energy $init_energy \-filename $filename \-dirname $dirname \-topo $topology_file \-num_clusters $num_clusters \-bs_x $bs_x \-bs_y $bs_y 2>$dirname/$filename.err 1>$dirname/$filename.out &

⌨️ 快捷键说明

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