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 10-26-2012, 09:53 AM   #316
yueling
LQ Newbie
 
Registered: Sep 2012
Posts: 7

Rep: Reputation: Disabled

Quote:
Originally Posted by lubelube View Post
Hello deepa_2111..
I have some problem with keepwalking..
on the line to what I have to add this code in \tcl\lib\ns-default.tcl?
thanks before..
hello @lubelube

you can try to add the code in uamps.tcl and ns-default.tcl, both of them in last line..
don't forget to run make clean and make before..

code:

# ------------------------------------------------------
Phy/WirelessPhy set alive_ 1
Phy/WirelessPhy set Efriss_amp_ 100e-12
Phy/WirelessPhy set Etwo_ray_amp_ 0.013e-12

Phy/WirelessPhy set EXcvr_ 50e-9
Phy/WirelessPhy set sleep_ 0
Phy/WirelessPhy set ss_ 1
Phy/WirelessPhy set dist_ 0
# ------------------------------------------------------

you can try and i think it's working..Deepa_2111 resolved this problem..
i hope it will help you.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-01-2012, 01:16 AM   #317
aparyay
LQ Newbie
 
Registered: Oct 2012
Posts: 4

Rep: Reputation: Disabled
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead

Last edited by aparyay; 11-01-2012 at 01:18 AM. Reason: i got this warning in leach.out,what is meaning of that .can u help???
 
Old 11-04-2012, 02:15 AM   #318
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
Hello dears
I am trying to underestand tcl files but I don't know witch one is the main LEACH
ns-leach.tcl
leach.tcl
or
wireless.tcl
which one produce leach.out
plllssssss help me
tnx
 
Old 11-05-2012, 04:51 AM   #319
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 264Reputation: 264Reputation: 264
it is ns-leach

---------- Post added 11-05-12 at 06:52 AM ----------

ns-leach

Quote:
Originally Posted by ni_saghari View Post
Hello dears
I am trying to underestand tcl files but I don't know witch one is the main LEACH
ns-leach.tcl
leach.tcl
or
wireless.tcl
which one produce leach.out
plllssssss help me
tnx
 
3 members found this post helpful.
Old 11-05-2012, 04:55 AM   #320
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 264Reputation: 264Reputation: 264
Replace occurrences of
[$self agent] set dst_ $mac_dst
with
[$self agent] set dst_addr_ $mac_dst

(forgot in which tcl files. Please do a search and replace all occurrences)

Quote:
Originally Posted by aparyay View Post
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
Warning dst_ is no longer being supported in NS. dst_ 0xffffffff
Use dst_addr_ and dst_port_ instead
 
2 members found this post helpful.
Old 11-05-2012, 10:38 AM   #321
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
thank you,Deepa
this package of leach has one example : wireless.tcl
and it used mobile node
but I wanna a static node example
How to change this example
or do u have a normal example of leach
pls help me, I am beginner in ns and this topics helped me alot
 
Old 11-06-2012, 02:48 AM   #322
lattu
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
hi farab i read the previous conversation about alive nodes and energy consumption si plz send me thw awk scripts for LEACH protocol
and i want compare the LEACH AND LRACH-C PROTOCOL IN GRAPHS . SO HOW I DO

contact me on:

email: lalit_chourse@rediffmail.com
 
Old 11-07-2012, 11:38 AM   #323
minhntbkhn
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
@exidus

Let me know your email address or facebook. I want to ask some questions about your code attached in this post. Thanks!
Quote:
Originally Posted by exidus View Post
Hi guys,

here is my version of uAMPS extension. I added option for protocol PEGASIS simulations.
You can also simulate modified version of LEACH and LEACH-C. By default number of cluster nodes is
5% from all nodes (5 CH nodes for 100 sensor nodes). In these modified version, number of CH nodes is
changed dynamically - 5% nodes from actual alive nodes. The simulations are longer a more data is send
with this modified version.

Manual how to use modified LEACH,LEACH-C and PEGASIS
1. In folder mit/uAMPS are files ns-leach_2.tcl and ns-bsapp_2.tcl
2. You have to rename file to ns-leach_2 to ns-leach.tcl and you can simulate modified protocol LEACH
3. You have to rename file to ns-bsapp_2.tcl to ns-bsapp.tcl and you can simulate modified protocol LEACH-C
4. You have to use option alg=pegasis in leach_test. Option num_clusters MUST BE 1 like this: num_clusters=1. Only if you want to simulate PEGASIS of course

I hope that it will help you in your simulations.
 
Old 11-07-2012, 11:44 AM   #324
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by ni_saghari View Post
thank you,Deepa
this package of leach has one example : wireless.tcl
and it used mobile node
but I wanna a static node example
How to change this example
or do u have a normal example of leach
pls help me, I am beginner in ns and this topics helped me alot
Hi every one
plsssss help me
 
Old 11-08-2012, 09:02 AM   #325
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
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...
 
Old 11-09-2012, 03:13 AM   #326
minhntbkhn
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
Hi all .In Wireless.tcl there are following lines but I can't find the file named "leach.tr". Do you know why? thanks !
Quote:
#
# Initialize Global Variables
#
set ns_ [new Simulator]
set chan [new $opt(chan)]
set prop [new $opt(prop)]
set topo [new Topography]
#set tracefd [open leach.tr w]
set tracefd [open $opt(tr) w]
 
1 members found this post helpful.
Old 11-09-2012, 06:00 AM   #327
nzny
LQ Newbie
 
Registered: Jan 2012
Posts: 22

Rep: Reputation: Disabled
i am not sure about that..however,if u would like to see the output of leach,u only need to check leach.out which is available in leach_sims folder.
 
Old 11-10-2012, 01:56 PM   #328
minhntbkhn
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
Hi all, I found in leach.out following lines :
Quote:
0: Current cluster-head is 65, code is 4, dist is 21.842424526036606 - ns-leach.tcl
1: Current cluster-head is 65, code is 4, dist is 23.606122445272167 - ns-leach.tcl
2: Current cluster-head is 73, code is 1, dist is 22.382492952566789 - ns-leach.tcl
3: Current cluster-head is 11, code is 2, dist is 23.041694265937817 - ns-leach.tcl
But I don't know what is "cost" means ? Please someone gives me a explanation. And I want to know how long does 1 round of LEACH take ? Thanks !
 
Old 11-10-2012, 11:23 PM   #329
ni_saghari
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
@ Minhntbkn
If you mean "code" it means node 0 is in a cluster (node 65) and any cluster head have a code
and its code is 4 (4th cluster)
its my idea!!
 
1 members found this post helpful.
Old 11-10-2012, 11:59 PM   #330
minhntbkhn
LQ Newbie
 
Registered: Oct 2012
Posts: 8

Rep: Reputation: Disabled
Hi all !
I've implemented simulation by running ./test but I just find Leach.out but not leach.tr . Can I use xgraph tool to extract any parameters from Leach.out? So Can I plot graph to descript parameters : alive time of network, energy consumption / time ... etc
Can you suggest me how to do ? Please look at my pictures that are attached in following link . Thank you in advance !
 
  


Reply

Tags
leach, leach-deepa#774, leach-warning50, 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 04:52 AM.

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