how to integrate the "Resource/Energy" leach class into NS-2.34?
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have successfully simulated Leach on Mannasim integrated with NS-2.35. now i m trying to do some variations in leach. i have selected NO. of nodes =100, scenario size= 1000X1000 , Simulation time =500s
but it is giving error
Error!!
str2addr:Address 1634300513 outside range of address field length 1073741824
can u pl. let me know if there is any problems with the mannasim.
'rca' is even not reflecting in my .tr file
I think there is some kind of an internal limitation. Debugged the back end and found that there was a limitation on both the size and the number of nodes.
Not sure if it was a limitation with my set up.
I don't remember a lot of the details since it was 3-4 years ago, but I remember not being to increase the network size as well as number of nodes beyond a point.
Hello guys,
I have successfully implemented LEACH in ns-2.35 ,but I am not sure about the output how good is it so I kindly want your help to look at it and let me know where the errors are.It seems that no ADVs has been sent and the total energy is not accurate.
Best Regards,
i don't get such output. my simulation work perfectly well for small no. of nodes. but giving errors for large no. of nodes.
i think u r not getting the correct output. have u worked on mannasim for generating leach.tcl?
Hello guys,
I followed the instructions that are mentioned in https://groups.google.com/forum/?fro...c/OlR1n0gAK_4J to run leach on ns-2.34, but I got error in leach.err. Then, I looked at all of the posts in this thread and I did what have been recommended, but I still have the same issue also I did what is recommended to change in uamps.tcl. Your help guys is urgent please.
I use ubuntu 14.04 64 bit.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Re #980, @Abdul_dos.
Quote:
couldn't read file "../../rca/ns-*‐ranode.tcl":
Solution : Somewhere in this very thread ...
But here it is again : In /home/name/ : $ tar xvf leach-test__Ubuntu12.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd 9tmp/ns-allinone-2.34/ns-2.34/
Thank you so much knudfl, I really appreciate your support that you have been providing and being kind and patient with all, i did what you mentioned in the last post and it worked but the leach.out shows "Warning!!! No Cluster Head ADVs were heard!-*‐ns-*‐leach.tcl" also Total Energy seems to be inaccurate.Could you please look at the attached document and guide me please.
Hello guys,
kindally I need your help I am still strugling with leach.out, and I read what is mentioned in http://www.linuxquestions.org/questi...68/page40.html but I got confused with it , could please guide me to approach a good output, the attaced file is my leach.out.
Please help please help
I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file......
And how to calculate network lifetime and remaining energy for both leach and leach-c protocol.
Quote:
Originally Posted by nmmn134
I install exidus-pegasis_ns-234-leach.tar of exidus. The result seems reasonable. Leach-c was better than Leach because Leach-c was develop from leach.
the plot. http://www.linuxquestions.org/questi...1&d=1363277097
i have in error in leach-ns2.35 in ubuntu 14.4 LTS
INITIALIZE THE LIST xListHead
Error!!
str2addr:Address 2147483647 outside range of address field length 1073741824
Hello LQ community. I've been reading the posts in this thread for a while now and didn't find anything useful to help me out.
I have successfully installed LEACH in NS-2.34 (also did the same in NS-2.35) on UBUNTU 14.04. The code is working and all but I got the following results:
Code:
.
.
.
Node 92 is DEAD!!!!
Node 93 is DEAD!!!!
Node 94 is DEAD!!!!
Node 95 is DEAD!!!!
At 1.0999999999999999:
Total Energy = 30007.100986809415
Total Data = 0
Total Alive = 4
Simulation complete.
num_nodes is set 101
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 222.8
Note that I just posted the last part of my leach.out file. As you can see, no data is sent to the Base Station and also Nodes die so fast (At 1.09...). I made a custom trace file and noticed that checkAlive function in ns-leach.tcl considers a node dead, even if it has remaining energy. So I changed the code so it checks remaining energy and hopefully nodes stay alive now. But still no data was sent to the base station.
I continued to trace the functions and found out that findBestCluster function in ns-leach.tcl is called before the packets arrive to each node. therefore clusterChoices_ variable is always empty and no JOIN_REQ packet is sent. (Or is sent in the next call of decideClusterHead, 10 seconds later which gets considered as invalid I guess) So I added some more time to opt(ra_adv_total) in leach.tcl. The trace shows that everything seems to be working just fine but, after a short while, everything stops! and end of my leach.out file and custom trace file are:
leach.out:
Code:
Data was sent to the base station
num_nodes is set 51
channel.cc:sendUplol - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 213.2
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.