LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2015, 04:29 AM   #1
walaa_ali22
LQ Newbie
 
Registered: Nov 2014
Posts: 3

Rep: Reputation: Disabled
understand leach.out


when running leach. i got different leach.out
first i was confusing is it correct or no.

for example, one of them show that there is a collision. some times one TDMAschedule.txt file generated and some times more than one.

every time i run leach_test the out put differ. but i notice that in coditions.txt ==> the desired number of clusters is always 1

first, how can i change this value. and how it will effect on leach.out?

second, i need some illustration on how to understand leach.out to be able to determine it is correct or not.

thanks in advance
 
Old 05-03-2015, 08:18 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
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.


-
 
  


Reply

Tags
leach, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with running leach protocol in ns2.34 leach.er Mohamed69 Linux - Software 9 04-16-2014 07:10 AM
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 05:54 AM


All times are GMT -5. The time now is 12:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration