LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2013, 09:04 AM   #1
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
Lightbulb Leach-c


Please can any one explain Leach-C protocol by explain how it is work at ns2,all related files at ns2,all functions and how to read its files either tcl or c++ ones

how to start learning TCL to be able to read and understand tcl files


Notes : I'm master student I need to change clustering techniques at leach-c and change the way transmitting data from nodes to BS , Please I need your help .
 
Old 08-23-2013, 10:05 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
Leach-C : Edit line 5 in 'leach_test' to : alg=leach_c
... And the `leach_c' simulation can be run with ./test.

Works OK with the "leach-pegasis" patch :
http://www.linuxquestions.org/questions/tags/pegasis/
> exidus-pegasis_ns-234-leach.tar.gz >
> https://docs.google.com/file/d/0B7S2...it?usp=sharing


Quote:
how to read its files either tcl or c++ ones
c++ files are used only at compile time :
All c++ functions are compiled into the executable 'ns'.
Which means that only ns-allinone-2.34/{bin/, lib} and
ns-allinone-2.34/ns-2.34/{mit/, tcl/, test, leach_test} is used
at simulation time.
Everything else can actually be deleted, if you want to.

Leach_c uses the same files (files.tcl + scenarios) as `leach'.
+ some "leach_c" tcl file(s) . See test / leach_test.

-

Last edited by knudfl; 08-23-2013 at 10:06 AM.
 
1 members found this post helpful.
Old 08-23-2013, 12:59 PM   #3
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Original Poster
Rep: Reputation: Disabled
First many thanks for your replies but
I think you mean alg=Leach-c not Leach_c

second what about bsagent.cc and bsagent.h at uAMPS folder
 
Old 08-23-2013, 04:18 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
# 3 .
Quote:
second what about bsagent.cc and bsagent.h at uAMPS folder
What is your question ?
 
Old 08-23-2013, 06:21 PM   #5
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Original Poster
Rep: Reputation: Disabled
what is the two files used for?
 
Old 08-24-2013, 01:58 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
#3 #4 #5

Please read the documentation in bsagent.cc :
Lines 143, 181, 218, 419.
 
1 members found this post helpful.
Old 08-25-2013, 02:49 PM   #7
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Original Poster
Rep: Reputation: Disabled
Please tell me what is this mean

set nodeID [$self nodeID]

actually what is the meant by $self?
 
Old 08-26-2013, 11:53 AM   #8
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Original Poster
Rep: Reputation: Disabled
Lightbulb Leach/leach-c

Sorry I will centralized my Questions here

Please I need your help

set nodeID [$self nodeID]

actually what is the meant by $self?
 
Old 08-27-2013, 05:30 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
# 7 .

$self : I guess you can find it in "Basic otcl" in the manual :
http://www.isi.edu/nsnam/ns/doc/index.html

Example $self :
http://nms.csail.mit.edu/6.829-f05/o...utorial.ppt.gz

-
 
1 members found this post helpful.
Old 08-27-2013, 09:46 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,306

Rep: Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005Reputation: 6005
Quote:
Originally Posted by eng_mohamed_sc View Post
Sorry I will centralized my Questions here
Please I need your help

set nodeID [$self nodeID]

actually what is the meant by $self?
No, you need to quit opening new threads for the same topic. You've got SEVERAL open already about this, and if you're having this many problems, you need to talk to your teacher/instructor, and get them to explain things.

Thread reported as duplicate
 
1 members found this post helpful.
Old 08-31-2013, 12:35 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,321

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
http://www.linuxquestions.org/questi...4/#post5018952
""Simulated Annealing at leach-c"".

Google .. SA algorithm leach-c ..: 45,000,000 hits.
https://www.google.com/webhp?hl=all#...orithm+leach-c

http://www.netsup.net/~jtillett/new_slide_india.ppt
http://www.sersc.org/journals/IJEIC/vol3_Is3/4.pdf
http://web.cs.wpi.edu/~rek/Grads/rskowyra.pdf
http://www.es.mdh.se/pdf_publications/916.pdf
etc. etc.
 
1 members found this post helpful.
  


Reply

Tags
leach, leach_c, 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 14 04-16-2018 08:10 AM
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 PM.

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