LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 05-11-2011, 08:27 AM   #1
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Question Differences between LEACH results on ns2.1b5 and ns2.35


I have implemented LEACH on ns2.35. But, the simulation results vary highly from the LEACH paper. The energy consumption in ns2.35 seems to be 4-5 times that of the LEACH paper (which used ns2.1b5). So, I assume it is due to differences in ns2 versions.

Is my assumption valid ??
 
Old 06-27-2011, 05:24 AM   #2
jayakumarksrit
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
hai deepa...

i am working in a project for designing energy efficient routing in wireless sensor network..

i installed ns2.34 in fedora 14 and leach with it.... but the results are as you mentioned above....

did you installed leach in ns2.1b5?... if it soo means how and which linux version...

please help me out of this paradox....
 
Old 06-28-2011, 09:05 AM   #3
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Original Poster
Rep: Reputation: 268Reputation: 268Reputation: 268
hey Jayakumar,

no.. i didnt not install ns2.1b5 .... i think you can do it with any virtual box ... see other posts... i have readi t somewhere
 
Old 09-15-2011, 01:46 AM   #4
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Quote:
Originally Posted by deepa_2111 View Post
I have implemented LEACH on ns2.35. But, the simulation results vary highly from the LEACH paper. The energy consumption in ns2.35 seems to be 4-5 times that of the LEACH paper (which used ns2.1b5). So, I assume it is due to differences in ns2 versions.

Is my assumption valid ??
exactly!
Im going to install ns2.1b5 un ubuntu instead of ns2.34, and I dont know really wich version of ubuntu really works with ns2.1b5. I have tried to install ns2.1b5 under ubuntu 11.04 but but I was not successfull in installing ns2.1b5, even with lower versions of gcc like gcc-3.3.
please share your experiences about wich linux distribution of linux (ubuntu if posible) is better for ns2.1b5 and leach. thank you...
 
Old 09-15-2011, 02:13 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
I don't think you have much chance with an 11 year old ns-2.1b5.

The later ns-2.1b8 can be compiled with gcc/g++ version 3.2,
but that's a different story, and is not for LEACH.

But why not use ns-2.27 ?

..

Last edited by knudfl; 09-15-2011 at 02:18 AM.
 
Old 09-15-2011, 02:39 AM   #6
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 18

Rep: Reputation: 22
Quote:
Originally Posted by knudfl View Post
I don't think you have much chance with an 11 year old ns-2.1b5.

The later ns-2.1b8 can be compiled with gcc/g++ version 3.2,
but that's a different story, and is not for LEACH.

But why not use ns-2.27 ?

..
Does LEACH work correclty in ns-2.27?
I didn't try that. According to this blog there is much differences between ns-2.1b5 as LEACH base and ns-2.27.
please tell me did you try LEACH on ns-2.27 and how was the result.
 
Old 02-12-2012, 11:40 AM   #7
deeptimayee
LQ Newbie
 
Registered: Feb 2012
Posts: 1

Rep: Reputation: Disabled
hii its deepti, please suggest, what i need to do, if i get the following warning during LEACH implementation. its not showing NAM output.

./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
warning: no class variable Phy/WirelessPhy::alive_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Phy/WirelessPhy::Efriss_amp_

warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning: no class variable Phy/WirelessPhy::EXcvr_

warning: no class variable Phy/WirelessPhy::sleep_

warning: no class variable Phy/WirelessPhy::ss_

warning: no class variable Phy/WirelessPhy::dist_

INITIALIZE THE LIST xListHead
warning: no class variable Phy/WirelessPhy::alive_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Phy/WirelessPhy::Efriss_amp_

warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning: no class variable Phy/WirelessPhy::EXcvr_

warning: no class variable Phy/WirelessPhy::sleep_

warning: no class variable Phy/WirelessPhy::ss_

warning: no class variable Phy/WirelessPhy::dist_

warning: no class variable Phy/WirelessPhy::alive_

see tcl-object.tcl in tclcl for info about this warning.

warning: no class variable Phy/WirelessPhy::Efriss_amp_

warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_

warning: no class variable Phy/WirelessPhy::EXcvr_

warning: no class variable Phy/WirelessPhy::sleep_

warning: no class variable Phy/WirelessPhy::ss_

warning: no class variable Phy/WirelessPhy::dist_

Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
 
Old 03-04-2012, 10:56 AM   #8
scoder
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
Hi,
i am trying to implement LEACH on ns2.35. Seems to be not much of help on web though. Some of you here have been able to implement it. Can somebody please guide me how to do it??
 
Old 03-04-2012, 11:58 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #8, @scoder : Welcome to LQ. .. ..

Please read post # 249 here, about the same question:
http://www.linuxquestions.org/questi...ml#post4612982


And by the way, you can have as many versions of ns-allinone-2.xx
as you want, installed at the same time. (Except on Ubuntu 11.10).

.
 
Old 03-04-2012, 12:36 PM   #10
scoder
LQ Newbie
 
Registered: Mar 2012
Posts: 6

Rep: Reputation: Disabled
thx for a prompt reply...but i am on ubuntu 11.10 incidently..!!
I will check the link you have given.
 
Old 05-10-2012, 10:13 PM   #11
rockben
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
hi
i have installed leach on ns2.34 (ubuntu8.10) successfully, but the simulation results are as mentioned above worse than in the leach paper. The total energy consumed is above 300j for leach and 700j for leach-c
and nodes are dead at time 100 for leach and 50 for leach-c
i can't see what's the problem
i have read other posts (i have change the code in energy.cc and wirelesphy.cc as mentioned by @deepa_211...) but without change in the simulation results
i have read olso that @asrmaster (in thread #30 "running leach on ns2.34") have found correct results without changes in the code of leach in (ns-2.1b5)
but i can't find the leach implementation for ns-2.1b5
please can you help me
what is the ns2 version i must use
thanks
 
Old 05-11-2012, 03:42 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 11

Please read the posts by @deepa_2111 about energy in "the long ns227-leach thread"
http://www.linuxquestions.org/questi...79/page16.html
→ post #236 and many others.

There is no or little difference if using ns-2.27 or ns-2.34, AFAIK.

There are no links for the ns-2.1b5 LEACH any more.
NS-2.1b5 is from about 1998 and a "1995-1999 computer" + a 1997 OS was required.

PS
The long ns234-leach thread http://www.linuxquestions.org/questi...2-34-a-870368/

.

Last edited by knudfl; 05-11-2012 at 06:20 AM.
 
Old 05-11-2012, 09:09 AM   #13
rockben
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
thanks for your fast reply
i have read those threads and i have made the changes in the files(wirelessphy,energy.cc) but without results i ask if i should change the ns2 version, cause this version that i use generate bad results even after the changes (in some threads there is some people have obtained good results...)
if someone who have obtained correct results, advise me what version of ns2 and leach i should use
please help i have no time !
 
Old 05-11-2012, 11:20 PM   #14
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Original Poster
Rep: Reputation: 268Reputation: 268Reputation: 268
@ rockben (#13)

did you do a clean and a rebuild after making your changes ?
 
1 members found this post helpful.
Old 05-13-2012, 12:19 AM   #15
rockben
LQ Newbie
 
Registered: Nov 2011
Posts: 5

Rep: Reputation: Disabled
yes i did make clean and make but i know the stupid mistke i made
sorry i have read the fals tarce file (i have simulated the leach-c and read in leach.out file) the problem with total energy consumed is ok (total energy is less than 200j), but i still have the same problem with nodes which dead early
i know that the changes that you have mentioned are just for limiting the consumption of energy for nodes that are dead
but i think that we should find the source of the problem. as you have mentioned before may be the problem is in the chanel..!(i think that we should stop the function that invoke the remove function, not to stop the remove process after it have invoked)
i have an other question: how we send a message in leach
the function send invokes the function send_now and send_now invoke the function sendmsg (but i can't see how the sendmsg works) can you please explain me how it works ?
thanks (sorry for my bad english, i hope you can understand what i mean)
 
1 members found this post helpful.
  


Reply

Tags
leach, ns2



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
running leach on ns2.34 Stanley33 Linux - Software 76 12-06-2015 11:21 AM
LEACH on NS2 deepa_2111 Linux - Newbie 1 04-05-2011 07:53 PM
leach in ns2.33 hayet Linux - Newbie 2 03-18-2011 06:03 PM
Leach Installation on NS2 Asmaa Seyam Linux - General 3 10-19-2010 12:31 PM

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

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