LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 08: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, 10:13 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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, 81 views)
File Type: txt new50nodes.txt (1.8 KB, 67 views)

Last edited by knudfl; 05-17-2014 at 10:19 AM.
 
3 members found this post helpful.
Old 05-17-2014, 10: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 10:14 PM. Reason: adding question
 
Old 05-18-2014, 11:29 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 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, 94 views)
 
1 members found this post helpful.
Old 09-20-2014, 06: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, 01: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 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
Open Source Consulting | Domain Registration