LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Closed Thread
  Search this Thread
Old 07-12-2013, 01:49 PM   #1
linuxUser123linux
LQ Newbie
 
Registered: Jul 2013
Posts: 22

Rep: Reputation: Disabled
Post LEACH on ns2. Anyone know how to obtain residual network energy?


total energy
68
120.346
300.506
464.28
551.866
641.406
769.706
798.109
838.914
849.66
915.611
973.924
1006.277

Given that I started with 300J of energy. The LEACH results shows that I expended 1006.3J of energy. This is not realistic. Where is the error. I checked the stats.tcl and found

set total_energy [expr $total_energy + $expended]

This is reasonable, where the file prints the total energy. I tried to print the $expended energy and got very small decimal values and when removed the total energy is zero. This is ok as each node expends little energy and without any expenditure there will be zero total energy.

But the problem remains in printing the residual network energy values.
 
Old 07-13-2013, 04:54 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread once and in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread should be closed because it is a duplicate of the ongoing discussion in https://www.linuxquestions.org/quest...ng-4175469160/.
 
  


Closed Thread



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 07:10 AM
NS2 Code for Energy Based Clustering Routing Protocol in Wireless Sensor Network Sudha Rajaram Programming 6 11-26-2014 04:55 AM
leach.out total energy increase leach ns2.34 linuxUser123linux Linux - Software 1 07-13-2013 04:54 AM
NS2: LEACH Energy Error... Nimat Ullah Linux - Software 0 06-02-2013 10:44 PM
How to obtain network parameters from NS2 trace file? musemicang Linux - Software 1 07-07-2012 09:33 AM

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

All times are GMT -5. The time now is 03:44 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