LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Differences between LEACH results on ns2.1b5 and ns2.35 (http://www.linuxquestions.org/questions/linux-software-2/differences-between-leach-results-on-ns2-1b5-and-ns2-35-a-880080/)

deepa_2111 05-11-2011 08:27 AM

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 ??

jayakumarksrit 06-27-2011 05:24 AM

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....

deepa_2111 06-28-2011 09:05 AM

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

farab 09-15-2011 01:46 AM

Quote:

Originally Posted by deepa_2111 (Post 4353242)
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...

knudfl 09-15-2011 02:13 AM

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 ?

..

farab 09-15-2011 02:39 AM

Quote:

Originally Posted by knudfl (Post 4472194)
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.

deeptimayee 02-12-2012 11:40 AM

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...

scoder 03-04-2012 10:56 AM

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??

knudfl 03-04-2012 11:58 AM

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).

.

scoder 03-04-2012 12:36 PM

thx for a prompt reply...but i am on ubuntu 11.10 incidently..!!
I will check the link you have given.

rockben 05-10-2012 10:13 PM

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

knudfl 05-11-2012 03:42 AM

# 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/

.

rockben 05-11-2012 09:09 AM

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 !

deepa_2111 05-11-2012 11:20 PM

@ rockben (#13)

did you do a clean and a rebuild after making your changes ?

rockben 05-13-2012 12:19 AM

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)


All times are GMT -5. The time now is 11:41 AM.