LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   calculating PDR--leach in NS2.35 (https://www.linuxquestions.org/questions/linux-software-2/calculating-pdr-leach-in-ns2-35-a-4175604877/)

rc49 04-28-2017 12:42 PM

calculating PDR--leach in NS2.35
 
i run leach application in NS2.35.
system configuration Ubuntu14.04 64bit

received output files successfully. please find attached documents below
leach.out https://drive.google.com/file/d/0B3n...ew?usp=sharing

leach.alive https://drive.google.com/file/d/0B3n...ew?usp=sharing

leach.data https://drive.google.com/file/d/0B3n...ew?usp=sharing

leach.save1 https://drive.google.com/file/d/0B3n...ew?usp=sharing

leach.save2 https://drive.google.com/file/d/0B3n...ew?usp=sharing

in the files leach.save1 and leach.save2 both files have different values of total data BUT in leach.out total data=0
this is confusing.
for calculating metric PDR if the total data is data received by BS node then how could i get sent data so as to calculate packet delivery ratio

i also have to calculate other metrics like throughput and delay but different values in different files,,!!
i also searched for the same on google but havent found enough stuff to calculate PDR of leach!!
any help will be appreciated!
thank you

knudfl 04-30-2017 04:30 AM

The files leach.alive, leach.data, leach.energy are for meant for a graphics plot e.g. Xgraph.

I don't know if you can get anything useful from the leach.out files.
Usually the genuine trace file.tr (leach.tr) is used for PDR, e.g. with :
PDR.awk, PacketDeliveryRatio.awk, PaDeFr.awk, Pdf-0.awk, pdf.awk
https://drive.google.com/file/d/0B7S...ew?usp=sharing



"packet delivery ratio leach" https://scholar.google.dk/scholar?q=...1MAicQgQMIITAA
→ omnet++ → http://ieeexplore.ieee.org/abstract/...8/?reload=true

omnet++ https://groups.google.com/forum/?fro...!forum/omnetpp
→ leach https://groups.google.com/forum/?fro...sort:relevance
Latest postings https://groups.google.com/forum/?fro...ch%7Csort:date


-

rc49 04-30-2017 01:46 PM

Quote:

Originally Posted by knudfl (Post 5704168)

what i am able to conclude on the basis of facts collected,,,,most of the authors in their papers,,,plots total received packets at base station..not the ratio actually(A:B)

i think its not possible to calculate PDR(A:B) of leach in ns2.35 via trace file unless we change leach code files..m i right?
what u say knudfl??

knudfl 04-30-2017 02:14 PM

Re #3.
Quote:

I think its not possible to calculate PDR(A:B) of leach in ns2.35 via trace file unless we change leach code files
I have no Idea.
Please ask Pradeepkumar http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
... He is the latest person who have worked with the leach code.


The leach setup for ns2 is ancient. I guess the OMNeT++ leach is better ?

-

mauriz 12-26-2017 10:40 PM

Quote:

Originally Posted by rc49 (Post 5703653)
in the files leach.save1 and leach.save2 both files have different values of total data BUT in leach.out total data=0
this is confusing.
for calculating metric PDR if the total data is data received by BS node then how could i get sent data so as to calculate packet delivery ratio

i also have to calculate other metrics like throughput and delay but different values in different files,,!!
i also searched for the same on google but havent found enough stuff to calculate PDR of leach!!
any help will be appreciated!
thank you


Hello!
I do research on this too.
1. leach.save1 and leach.save2 used for what?
2. Did you find any solution?
Thankyou

knudfl 12-27-2017 06:32 AM

Re #5, @mauriz.

leach.save1 and leach.save2 : Are old saved examples of leach.out .
Not to be used for anything : You can read the files.

PDR :
Code:

$ awk -f PDR.awk leach.tr
cbr s:102 r:199, r/s Ratio:1.9510, f:0

The file leach.tr should be present: ns-2.35/leach.tr

Perl, awk scripts https://drive.google.com/file/d/1oid...ew?usp=sharing

P.S. : Better results, see posts #1007, #1009 here
https://www.linuxquestions.org/quest...68/page68.html


-

mauriz 12-27-2017 08:23 PM

Quote:

Originally Posted by knudfl (Post 5798330)
leach.save1 and leach.save2 : Are old saved examples of leach.out .
Not to be used for anything : You can read the files.

-

Thanks. But why when I check leach.out the result is always show Total Data = 0 ?
Even though leach.save1 and save2 have different results? Is it time-based? Then I'd better process the data from leach.out or leach.save?
Additionally, is there an explanation of the data that displayed? Like, what is total energy, total data, total alive, how can node die, etc?

knudfl 12-28-2017 03:23 AM

Re #7.
Quote:

is there an explanation of the data that displayed
May be somewhere in the documentation .... leach-doc.tar.gz
https://drive.google.com/file/d/0B7S...ew?usp=sharing


Quote:

when I check leach.out the result is always show Total Data = 0
1. You are using an OS that's not ns2-leach friendly? Ubuntu 10.04 seems to work →
→ #1013 → https://www.linuxquestions.org/quest...68/page68.html
2. Wrong patch. Wrong ns2 version.
``ns-2.34 and leach+pegasis_ns234.patch.gz creates better results →
https://www.linuxquestions.org/quest...68/page68.html → #1007 #1009

-

mauriz 12-28-2017 09:18 AM

calculating PDR--leach in NS2.35
 
Thank you for sharing. I am using leach in ns-2.35, Ubuntu 14.04. I do patch with tutorial on youtube (https://www.youtube.com/watch?v=XX9fooieASAS&sns=sms). In the video, leach.out shows Total Data = 0 too, is this error on leach patch or does leach can not be used on ns-2.35? Thank you

knudfl 12-28-2017 10:57 AM

Re #9.

The "Leach for ns-2.35" may have worked once.
With a specific OS, at a specific OS update level.
I have tested "leach_ns235-Jun2015.patch" with multiple OSs.
No perfect results with any, I think.
Ref. http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html


Quote:

shows Total Data = 0
? Which file ? ?

A typical leach.out from a contemporary OS: Uploaded as leach.out__ns235.txt →
https://drive.google.com/file/d/1bFw...ew?usp=sharing
All . https://drive.google.com/drive/folde...lk?usp=sharing

-

mauriz 12-28-2017 08:09 PM

Quote:

Originally Posted by knudfl (Post 5798826)
The "Leach for ns-2.35" may have worked once.
With a specific OS, at a specific OS update level.
I have tested "leach_ns235-Jun2015.patch" with multiple OSs.
No perfect results with any, I think.
Ref. http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
-

Thank you. I also use the ref
So, Is there any simulator I can use for LEACH and DTN?
Actually I use ns-2.35 because I know ns-2.35 can be used for DTN.
Ref. https://www.netlab.tkk.fi/tutkimus/dtn/ns/

Quote:

? Which file ? ?
leach.out

knudfl 12-29-2017 04:58 AM

Re #11.

? Do you want to combine DTN with Leach ?

Note : You can have as many ns-allinone-2.xx as you want, installed at the same time.
But do never add any *PATH text to .bashrc. Not required.



-

mauriz 12-29-2017 09:25 PM

calculating PDR--leach in NS2.35
 
yes, but I think I need much ref for simulate it
Did you have any ref, Mr?

knudfl 12-30-2017 04:45 AM

Quote:

I think I need much ref for simulate it
Please explain in common words, what your question really means.
( Ref. is short for reference. And "it" can mean anything.)


To use "Leach": ns-2.34 + an old Ubuntu version is required : For Leach only.
For DTN : A separate ns-allinone-2.35, for DTN only.
( And a /usr/local/bin/ns-orig for default simulations.)


-

mauriz 12-31-2017 09:36 AM

Quote:

Originally Posted by knudfl (Post 5799598)
Please explain in common words, what your question really means.
( Ref. is short for reference. And "it" can mean anything.)
-

It = wsn (leach) over dtn

Quote:

To use "Leach": ns-2.34 + an old Ubuntu version is required : For Leach only.
For DTN : A separate ns-allinone-2.35, for DTN only.
( And a /usr/local/bin/ns-orig for default simulations.) -
Is there a simulator to simulate leach and dtn? Not only leach or dtn, but both of them


All times are GMT -5. The time now is 02:29 PM.