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

📄 compute_avg_simulations.sh

📁 对IEEE 802.11e里的分布式信道接入算法EDCA进行改进
💻 SH
字号:
#!/bin/csh -f############             Lamia ROMDHANI    ###### This script is used to get the latency, goodput, bandwidth, medium utilisation and collision rate# results for each number of nodes averaged over 5 simulations. The user can modify the max_simulations # and so all the parameters as he likes.  ##############      Lamia    ################################set max_nodes = 50set max_simulations = 5set increment = 2set nodes = 2set name_file = AEDCF#set name_file = EDCFset gfile = $name_file.goodputset latfile = $name_file.latset bwfile = $name_file.bwset lowbwfile = $name_file.lowbwset lowbw1file = $name_file.lowbw1set chfile = $name_file.chset collfile = $name_file.collrm -f $gfiletouch $gfilerm -f $latfiletouch $latfilerm -f $bwfiletouch $bwfilerm -f $lowbwfiletouch $lowbwfilerm -f $lowbw1filetouch $lowbw1filerm -f $chfiletouch $chfilerm -f $collfiletouch $collfile#echo "#nodes  channel_use 	collision_rate "  >> $chfilewhile ( $nodes <= $max_nodes ) echo "nodes $nodes"   rm -f "gfile_many" touch "gfile_many" rm -f "latfile_many" touch "latfile_many" rm -f "bwfile_many" touch "bwfile_many" rm -f "lowbwfile_many" touch "lowbwfile_many" rm -f "lowbw1file_many" touch "lowbw1file_many" rm -f "chfile_many" touch "chfile_many"     set simulations = 1  while ( $simulations <= $max_simulations )  echo "simulation $simulations"   	rm -f "mean.dat"	touch "mean.dat"	rm -f "mean-bw.dat"	touch "mean-bw.dat"		rm -f "mean-lowbw.dat"	touch "mean-lowbw.dat"			rm -f "mean-lowbw1.dat"	touch "mean-lowbw1.dat"		        	    ns  main_AEDCF_EDCF.tcl audio-video-Bt.tcl $nodes 5000 80 1		    	 set goodput = `wlan-goodput-normal audio-video-Bt.tcl 0.5`	 	 	 echo "$goodput "  >> gfile_many	 set lowflow = $nodes	 @ lowflow1 = $nodes + $nodes 	 	 #echo "$lowflow1 "	 set flow = 0	 	 set lat_flow = 0	 set bw_flow = 0	 set bw_lowflow = 0	 set bw_lowflow1 = 0	 	   while ( $flow < $nodes )	      	    				  set lat_flow = `wlan-lat-mean audio-video-Bt.tcl $flow AGT `				echo "$lat_flow"  >> mean.dat					     				set bw_flow = `wlan-bw-mean  audio-video-Bt.tcl $flow 0.5 `				echo "$bw_flow"  >> mean-bw.dat											 set bw_lowflow = `wlan-bw-mean  audio-video-Bt.tcl $lowflow 0.5 `				echo "$bw_lowflow"  >> mean-lowbw.dat								set bw_lowflow1 = `wlan-bw-mean  audio-video-Bt.tcl $lowflow1 0.5 `				echo "$bw_lowflow1"  >> mean-lowbw1.dat					       @ flow = $flow + 1				 @ lowflow = $lowflow + 1				 @ lowflow1 = $lowflow1 + 1	   end		 	 set meandelay = `compute-mean mean.dat $nodes`	 set meanbw = `compute-mean mean-bw.dat $nodes`	 set meanlowbw = `compute-mean mean-lowbw.dat $nodes`	 set meanlowbw1 = `compute-mean mean-lowbw1.dat $nodes`	 	 echo "$meandelay "  >> latfile_many	 echo "$meanbw "  >> bwfile_many	 echo "$meanlowbw "  >> lowbwfile_many	 echo "$meanlowbw1 "  >> lowbw1file_many	 	 	  set channel_results = `wlan-chutil-load audio-video-Bt.tcl`  	  echo "$channel_results "  >> chfile_many		         @ simulations = $simulations + 1	   end  set avg_good = `compute-mean gfile_many 5`	  echo "$nodes $avg_good" >> $gfile  set avg_delay = `compute-mean latfile_many 5`	  echo "$nodes $avg_delay" >> $latfile  set avg_bw = `compute-mean bwfile_many 5`	  echo "$nodes $avg_bw" >> $bwfile  set avg_lowbw = `compute-mean lowbwfile_many 5`	  echo "$nodes $avg_lowbw" >> $lowbwfile  set avg_lowbw1 = `compute-mean lowbw1file_many 5`	  echo "$nodes $avg_lowbw1" >> $lowbw1file	  set avg_ch = `compute-mean-ch chfile_many 5`	  echo "$nodes $avg_ch" >> $chfile  set avg_coll = `compute-mean-coll chfile_many 5`	  echo "$nodes $avg_coll" >> $collfile  @ nodes = $nodes  +  $increment  end compute-diff-goodput $name_file.goodput  EDCF.goodput Gain-$name_file#compute-bw-normal $name_file.lowbw $name_file.lowbwn 125.168747 #compute-bw-normal $name_file.bw $name_file.bwn 7.835#compute-bw-normal $name_file.lowbw1 $name_file.lowbw1n 15.653000

⌨️ 快捷键说明

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