LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-17-2014, 09:44 AM   #1
Faez
LQ Newbie
 
Registered: May 2014
Posts: 2

Rep: Reputation: Disabled
How to change number of nodes for LEACH in NS 2.34


Hi everyone,

I have final year project related to the LEACH routing protocol. I want to change the number of nodes for LEACH? As for existing package, it is already 100 nodes, and i want to change it to 80 nodes and below..what should I do?

Thanks
 
Old 05-17-2014, 11:13 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
Welcome to LQ.

The files used in the leach simulation :
$ export RCA_LIBRARY=/<name>/ns-allinone-2.34/ns-2.34/mit/rca && export uAMPS_LIBRARY=/home/<name>/ns-allinone-2.34/ns-2.34/mit/uAMPS && ./test

... are : { test, leach_test, tcl/ex/wireless.tcl, mit/uAMPS/sims/nodescen,
mit/uAMPS/sims/100nodes.txt, tcl/mobility/{mte.tcl, stat-clus.tcl} }, etc. etc.

The file `100nodes.txt was generated with mit/uAMPS/sims/genscen ,
like $ ns genscen
* Edit a copy of genscen (genscen-50) to 50 nodes , and $ ns genscen-50
... will create the file "new50nodes.txt".

Now edit line 35 in 'leach_test', nn=101 ,,, to : nn=51
.. and line 17, topology_file="mit/uAMPS/sims/100nodes.txt"
..to : topology_file="mit/uAMPS/sims/new50nodes.txt"
-
Attached Files
File Type: txt genscen-50.txt (452 Bytes, 59 views)
File Type: txt new50nodes.txt (1.8 KB, 43 views)

Last edited by knudfl; 05-17-2014 at 11:19 AM.
 
3 members found this post helpful.
Old 05-17-2014, 11:53 AM   #3
Faez
LQ Newbie
 
Registered: May 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thankz for your response knudfl..

I've already follow your instruction..but the output still showing 100nodes or can be said nothing changes..i dont know what else did i missed..can u share your wireless.tcl file?..it is default wireless.tcl file right?anyway my dimension is 100*100..

this is what appear on my terminal:

num_nodes is set 61
INITIALIZE THE LIST xListHead
*** NOTE: no connection pattern specified.
Loading scenario file...
Load complete...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 50.5
SORTING LISTS ...DONE!
NS EXITING...

why there is no connection pattern specified?

Last edited by Faez; 05-17-2014 at 11:14 PM. Reason: adding question
 
Old 05-18-2014, 12:29 PM   #4
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
# 3 .
Quote:
... share your wireless.tcl file ?
I used the "leach+pegasis-ns234-files-2.tar.gz" setup. (By @exidus.)
So that's "my wireless.tcl".

Be aware that post #2 doesn't claim to get the result "50 nodes".
It's just some hint's. There may be more files to edit.
Please read all the leach tcl files in mit/ and tcl/mobility/.

The three versions of wireless.tcl I can think of are attached →
a) @MayTamer (classic mit)
b) Leach + pegasis, by @exidus
c) The @deepa_2111 ns-2.35+leach project.
-
Attached Files
File Type: txt leach__wireless.tcl-files.tar.bz2.txt (5.0 KB, 61 views)
 
1 members found this post helpful.
Old 09-20-2014, 07:15 AM   #5
tsabran
LQ Newbie
 
Registered: Sep 2014
Posts: 8

Rep: Reputation: Disabled
Hi, knudfl and Faez,

I'm also implementing several scenarios with various number of nodes, I've followed what knudfl had suggested in post #2 but I'm wondering where does the result from running the new leach_test exist? Since my leach.out still shows 100 nodes as it usually is.

Thanks mates!

---------- Post added 09-20-14 at 06:15 PM ----------

 
Old 02-17-2015, 02:39 PM   #6
nadine01
Member
 
Registered: Oct 2014
Posts: 62

Rep: Reputation: Disabled
How to calculate the throughput of leach???
 
  


Reply

Tags
leach, ns2, pegasis


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
How to change propagation model in leach lintreesa Linux - Newbie 1 03-18-2014 08:12 AM
Limitation on the number of nodes in ns2 mohn.ssn Linux - Software 1 11-10-2013 04:04 PM
Redhat Cluster hung when date change on one of the nodes ravindert Linux - Server 1 05-08-2013 12:08 PM
[SOLVED] RHEL 5.8 Cluster: Nodes keep prompting to change PW Enochs Linux - Security 1 12-13-2012 04:54 PM
how to change the complex number display mode. ... real number sandeep002gupta Programming 1 05-09-2011 07:15 AM


All times are GMT -5. The time now is 10:50 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