Simulations will often output a new result by every run.
Just like in a real world situation.
Ns-2 has some inbuilt random functions, e.g. "seed".
"num_clusters=1" :
Code:
$ grep -in clus leach_test
4:#This is the algorithm that we are going to run. Type leach, leach-c, stat-clus or pegasis
18:# number of clusters we want. It is recommended to use 5% of the total for LEACH and LEACH-C
19:# WARNING! - It is important to use 1 cluster for Pegasis
21:num_clusters=1
49:-num_clusters $num_clusters \
The numbers are the 'line numbers'.
I.e. you can try with a change in leach_test, line 21.
"least_test" is the main script for the simulations settings.
Please read all lines in least_test.
-