LinuxQuestions.org
Review your favorite Linux distribution.
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

Reply
 
Search this Thread
Old 11-11-2012, 02:08 PM   #331
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268

@ nzny,

you can change the distance over which the ADV_CH are transmitted. Thats what I did.
Changing RXTresh wont help as the transmitting node transmits with enough power for all nodes to hear

Quote:
Originally Posted by nzny View Post
dear all,

in Leach, when the CHs broadcast their ADV_CH, it assumed that all nodes can hear ADV_CH from all CHs. How do I limit the transmission range so that only close nodes can hear ADV_CH from corresponding CH? I've tried to change the RXThresh in wireless-phy.cc and uamps.tcl. However, it seemed the changes didnot give any effect to the clusterChoices_.

if anyone has any idea, hope you can share...thank you...
 
3 members found this post helpful.
Old 11-13-2012, 02:16 AM   #332
minhntbkhn
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
Hi all ! @deepa_2111
When I move leach.tr in directory "home/ns-allinone-2.34/ns-2.34" to other path and then I make command ./test . In leach.err show the following content :

Quote:
couldn't open "/tarik/leach.tr": no such file or directory
while executing
"open $opt(tr) w"
invoked from within
"set tracefd [open $opt(tr) w]"
(file "tcl/ex/wireless.tcl" line 219)
I think this error cause I've changed the directory of leach.tr . But when I move leach.tr to initial position and make ./test command again, the above error still occurs.
please someone*helps*me*about*this*problem ! Thanks !
 
Old 11-14-2012, 12:07 AM   #333
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268
@ minhntbkhn

you need to run .\leach_test and not .\test

Quote:
Originally Posted by minhntbkhn View Post
Hi all ! @deepa_2111
When I move leach.tr in directory "home/ns-allinone-2.34/ns-2.34" to other path and then I make command ./test . In leach.err show the following content :



I think this error cause I've changed the directory of leach.tr . But when I move leach.tr to initial position and make ./test command again, the above error still occurs.
please someone*helps*me*about*this*problem ! Thanks !
 
1 members found this post helpful.
Old 11-15-2012, 01:00 AM   #334
forco
LQ Newbie
 
Registered: Nov 2012
Posts: 6

Rep: Reputation: Disabled
Hello,

I installed leach on ns2.34 under fedora 16 (with the help from this forum)

I run the ./test and with fixings here and there, I got no errors on leach.err
leach.err
INITIALIZE THE LIST xListHead
SORTING LIST ...DONE!

But I got weird results on leach.out
leach.out
At 1.099999999999
Total Energy = 22094.xxxx
Total Data = 0
Total Alive = 4

My "stop" at leach_test is 500 and I tried other value but the results were the same,
it always prints at 1.0999999 with no data

leach.tr also only prints out until 1.10000

any comments, please?
 
Old 11-15-2012, 09:55 AM   #335
farab
LQ Newbie
 
Registered: Aug 2011
Posts: 17

Rep: Reputation: 22
Quote:
Originally Posted by forco View Post
Hello,

I installed leach on ns2.34 under fedora 16 (with the help from this forum)

I run the ./test and with fixings here and there, I got no errors on leach.err
leach.err
INITIALIZE THE LIST xListHead
SORTING LIST ...DONE!

But I got weird results on leach.out
leach.out
At 1.099999999999
Total Energy = 22094.xxxx
Total Data = 0
Total Alive = 4

My "stop" at leach_test is 500 and I tried other value but the results were the same,
it always prints at 1.0999999 with no data

leach.tr also only prints out until 1.10000

any comments, please?

How much is your energy? i mean init_energy in leach_test.
 
Old 11-15-2012, 08:09 PM   #336
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
@deepa_2111,

thanks for your reply...how do i change the distance over which the ADV_CH are transmitted?
 
Old 11-15-2012, 08:19 PM   #337
forco
LQ Newbie
 
Registered: Nov 2012
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by farab View Post
How much is your energy? i mean init_energy in leach_test.
the init_energy is 2
the eq_energy is 1

(what is eq_energy ??? )

I have not do any modification on the code,,

also, can you help me in understanding the output files?
this is my understanding, please tell me if its incorrect,
leach.alive = [time] [node] [0 means dead, 1 means alive]
leach.data = [time] [node] [data sent] --> in my file, the data sent is all zeros
leach.energy = [time] [node] [???]
startup.energy = [time] [node] [???]
leach.save1 = ???
leach.save2 = ???
 
Old 11-15-2012, 10:47 PM   #338
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
@deepa_2111,

do you mean that I need to change the max_dist in instproc advertiseClusterHead?

Quote:
Originally Posted by deepa_2111 View Post
@ nzny,

you can change the distance over which the ADV_CH are transmitted. Thats what I did.
Changing RXTresh wont help as the transmitting node transmits with enough power for all nodes to hear
 
Old 11-16-2012, 09:03 AM   #339
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268
@nzny,

Instead of using the max_dist value, give your own value (I used 86 as this is the max distance over which the energy consumption is proportional to square power of distance). Do not change the max_dist value without verifying how it is used further in the code.

Quote:
Originally Posted by nzny View Post
@deepa_2111,

do you mean that I need to change the max_dist in instproc advertiseClusterHead?
 
Old 11-16-2012, 09:07 AM   #340
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268
@ forco,

eq_energy means that all nodes are allotted the same amount of energy (init_energy). I think the reason why your code is not printing values could be that all nodes are trying to transmit at the same time, leading to collisions and thereby huge energy expenditure. How many nodes do you have in the network ? If you have 100, max energy can only be 200.

Also, note that increasing no. of nodes to beyond 300 causes the LEACH code to stop working/run improperly.

Quote:
Originally Posted by forco View Post
the init_energy is 2
the eq_energy is 1

(what is eq_energy ??? )

I have not do any modification on the code,,

also, can you help me in understanding the output files?
this is my understanding, please tell me if its incorrect,
leach.alive = [time] [node] [0 means dead, 1 means alive]
leach.data = [time] [node] [data sent] --> in my file, the data sent is all zeros
leach.energy = [time] [node] [???]
startup.energy = [time] [node] [???]
leach.save1 = ???
leach.save2 = ???
 
1 members found this post helpful.
Old 11-16-2012, 09:59 AM   #341
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
@forco
leach.alive = [time] [node] [0 means dead, 1 means alive]
leach.data = [time] [node] [all data sent from nodes toward CH and BS]
leach.energy = [time] [node] [energy dissipation of node]
startup.energy = [time] [node] [startup energy]
leach.save1 = I think is a backup file of leach.out!!
 
Old 11-16-2012, 10:02 AM   #342
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
Hi all
and @deepa
How can I calculate latency?
time of send data and recieve data is in leach.out
but I need such file like leach.latency
pleas guide me
tnx so much
 
Old 11-16-2012, 06:33 PM   #343
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
@deepa_2111,

thank you very much for your answer. can we get the received signal strength of the ADV_CH, from wireless-phy.cc may be?
 
Old 11-17-2012, 10:12 AM   #344
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268
Yes, you can

Quote:
Originally Posted by nzny View Post
@deepa_2111,

thank you very much for your answer. can we get the received signal strength of the ADV_CH, from wireless-phy.cc may be?
 
Old 11-17-2012, 10:14 AM   #345
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 268Reputation: 268Reputation: 268
You can modify the receiver function for the BS (forgot the tcl file name) so that it prints the latency experienced by each CH. This is possible as the BS received packets with the node ID and the time at which the transmission was done by the CH

Quote:
Originally Posted by ni_saghari View Post
Hi all
and @deepa
How can I calculate latency?
time of send data and recieve data is in leach.out
but I need such file like leach.latency
pleas guide me
tnx so much
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM


All times are GMT -5. The time now is 07:23 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration