?? leach_test
字號:
#!/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 + -