How To Solve This Logical Error Of LEACH?

Hello,
I have installed LEACH in NS-2.34 (ubunto-14.04)

I could run it successfully..

But it always stopped in a few seconds without sending data

i.e. Total Data=0

And it consumed a large energy!!!!

It didn't show any error in leach.error

Is it a logical error or others?

thanks


Similar Content



Help In Leach

Hello

Now i try with leach+pegasis-ns234-files-2.tar.gz

but the same problem

in leach.err

mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!

but leach.out

Total Energy = 1.8677000593689714
Total Data = 0
Total Alive = 4

Leach Doubt..

Hi. I have some doubts regarding “LEACH” protocol. I’m using ns-2.34 on Ubuntu 10.04 and patched leach protocol by following below link. I got ‘leach.out’ file, but I didn’t get ‘leach.err’ file.

https://abdusyarif.wordpress.com/201...-step-by-step/

Then I want to check out the leach source code file. The source code of the leach is not found in that folder. I ran out the leach test file and I’ve got a warning message.

No Data Sent In Pegasis.out (NS2)

Hi all,

I was wondering did anyone try running PEGASIS simulation on NS-2.34? I am using Ubuntu 10.04 and I tried running it with the LEACH+PEGASIS patch from exidus, but the pegasis output does not seem right, although the leach output seems fine.
As seen there is not data sent and the nodes alive stays 10 (used only 10 nodes) with energy still intact. Any input/thoughts are appreciated, thanks!

Code:
Creating sensor nodes... - uAMPS.tcl
0 1 2 3 4 5 6 7 8 9 (10 == BS) - uAMPS.tcl
*** NOTE: no connection pattern specified. - wireless.tcl
Loading scenario file... - wireless.tcl
Node 0: (3.6149593552644173,36.078549379519444)
Node 1: (58.871299055810688,72.899243455798938)
Node 2: (66.192033079542227,78.762060347368035)
Node 3: (26.408279047537725,13.096542662520214)
Node 4: (69.871280002347788,8.1301262174407611)
Node 5: (59.175824494648644,20.065448163107714)
Node 6: (23.120326699279399,59.510628627385309)
Node 7: (35.061642916436142,75.71922716485301)
Node 8: (10.49768087011654,98.860375722339555)
Node 9: (28.928238399759049,88.984149177085683)
Max Distance for this Simulation is 113.0
Load complete... - wireless.tcl
Starting Simulation... - wireless.tcl
BS received info: (3.6149593552644173 36.078549379519444 2) from Node 0  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 1 - mit/uAMPS/ns-bsapp.tcl
BS received info: (58.871299055810688 72.899243455798938 2) from Node 1  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 2 - mit/uAMPS/ns-bsapp.tcl
BS received info: (66.192033079542227 78.762060347368035 2) from Node 2  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 3 - mit/uAMPS/ns-bsapp.tcl
BS received info: (26.408279047537725 13.096542662520214 2) from Node 3  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 4 - mit/uAMPS/ns-bsapp.tcl
BS received info: (69.871280002347788 8.1301262174407611 2) from Node 4  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 5 - mit/uAMPS/ns-bsapp.tcl
BS received info: (59.175824494648644 20.065448163107714 2) from Node 5  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 6 - mit/uAMPS/ns-bsapp.tcl
BS received info: (23.120326699279399 59.510628627385309 2) from Node 6  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 7 - mit/uAMPS/ns-bsapp.tcl
BS received info: (35.061642916436142 75.71922716485301 2) from Node 7  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 8 - mit/uAMPS/ns-bsapp.tcl
BS received info: (10.49768087011654 98.860375722339555 2) from Node 8  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 9 - mit/uAMPS/ns-bsapp.tcl
BS received info: (28.928238399759049 88.984149177085683 2) from Node 9  a nodik je 10 - mit/uAMPS/ns-bsapp.tcl
BS received: 10 - mit/uAMPS/ns-bsapp.tcl

At 10: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 20: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 30: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 40: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 50: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 60: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 70: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 80: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 90: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 100: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 110: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 120: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 130: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 140: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 150: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 160: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 170: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 180: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 190: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 200: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 210: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 220: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 230: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 240: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 250: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 260: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 270: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 280: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 290: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 300: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 310: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 320: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 330: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 340: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 350: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 360: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 370: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 380: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 390: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 400: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 410: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 420: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 430: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 440: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 450: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 460: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 470: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 480: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 490: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 500: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 510: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 520: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 530: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 540: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 550: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 560: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 570: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 580: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 590: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


At 600: - mit/uAMPS/stats.tcl
		Total Energy = 0.00020132494141871592
		Total Data = 0
		Total Alive = 10


Simulation complete. - mit/uAMPS/stats.tcl

num_nodes is set 11
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5,  distCST_ = 160.8

Understand Leach.out

when running leach. i got different leach.out
first i was confusing is it correct or no.

for example, one of them show that there is a collision. some times one TDMAschedule.txt file generated and some times more than one.

every time i run leach_test the out put differ. but i notice that in coditions.txt ==> the desired number of clusters is always 1

first, how can i change this value. and how it will effect on leach.out?

second, i need some illustration on how to understand leach.out to be able to determine it is correct or not.

thanks in advance

How Do I Go About Evaluating Energy Efficiency In Aodv And Leach Protocol.

Hi,

I am interested in evaluating the energy efficiency for aodv and leach protocol. I havent been able to get through with mannasim because of this error:

ns:
[code omitted because of length]
: invalid command name "DataGenerator/TemperatureDataGenerator"
while executing
"DataGenerator/TemperatureDataGenerator set sensing_interval_ 0.0"

Do anyone have a link that could be of help? Also I would appreciate if anyone has a file/link in which energy efficiency of this two protocols have been evaluated on ns2.

Be sure your contribution is highly valued

Thanks

Error In Mannasim Generated Tcl File

hi ,
i have integrated mannasim with ns2.35 on 32 bit ubuntu 12.04 and on 13.04 also. generated leach.tcl on desktop. but while simulating got an error: meta size 2844 is too large(max-1000).

pl help.
very urgent

Nam Of Leach Protocol Not Complete

i run leach protocol on ns2.34
from the package provided is
the additional module "pegasis/leach" > exidus-pegasis_ns-234-leach.tar.gz
Download link https://docs.google.com/file/d/0B7S2...it?usp=sharing

the generated nam file look like this

V -t * -v 1.0a5 -a 0
W -t * -x 1000 -y 1000
A -t * -n 1 -p 0 -o 0xffffffff -c 31 -a 1
A -t * -h 1 -m 2147483647 -s 0


why it is not complete ?

I Wish To Request To All People Who Viewing This Message For V-leach Protocol Code

Now i am doing m.tech and i wanna do project on NS-2. i have to study about this v-leach protocol and also i want prepare some extensions in that so if you's having any possibility please send some v-leach protocol code for me

LEACH Simulation

hey everybody, I have a problem, I am supposed to use two mobile sinks in a field of x=100 and y=100
when I add the second sink after editing many files like leach test and ranodes.tcl and I add a bsapp for the second Sink too
but!!! when I execute the leach test, the 2nd sink is not known neither its coordinates
any suggestions plz !!
thanks a lottt

I Get An Error While Executing Leach.tcl

couldn't read file "mit/uAMPS/ns-leach.tcl": no such file or directory
while executing
"source.orig mit/uAMPS/ns-leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source mit/uAMPS/ns-leach.tcl"
(file "leach.tcl" line 7)