how to integrate the "Resource/Energy" leach class into NS-2.34?
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
melody this page is for issues.
if you want more information abaout leach itself and how it wrols, you can send a private message to me or chat me in facebook:
facebook.com/farabf33
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 301
Quote:
this page is for issues.
All technical information about LEACH :
It would be highly appreciated if you write your ideas here in an LQ thread.
( This thread or a new thread. Or an 'LQ Blog'.)
LQ is a knowledge base for everybody, and I am sure that
all the people interested in ns2 leach would want to read
any information, that you can present.
( So far this thread has had 24,000 readers.)
melody this page is for issues.
if you want more information abaout leach itself and how it wrols, you can send a private message to me or chat me in facebook:
facebook.com/farabf33
hello... I heard, you know about the simulation of leach in wsn? Can you help me? please..
I try to read all threads but nobody replied this error. Although when i run ./test in my teminal display: num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
INITIALIZE THE LIST xListHead
Loading connection pattern...
Loading scenario file...
Starting Simulation...
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
but in my leach.out, there are no data and in leach.err, it announces:
can't read "opt(nn_)": no such element in array
while executing
"set opt(bsID) $opt(nn_) "
(file "mit/uAMPS/sims/uamps.tcl" line 35)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/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 tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
Please help me, because i try for many times, i actually, feel axhausted.hix
Thanks in advanced!
Last edited by anataodesu; 09-22-2012 at 12:02 AM.
Hello again,
I intergrated LEACH in ns-2.34 on UBUTU 10.04.3, i try to run it for long times but i can't. I have two days left to finish. Please, please help me soon
hi exidus..couldnt download the file...could you pls share the file once again...thank you
Quote:
Originally Posted by exidus
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
hi, i installed leach successfully but i need to know which .tcl or cc files are related to packages in leach
i want to add encryption to packages and i don't know how to find package information
could u please guid me? thanks
1. Make sure the bind code is there in wireless-phy.cc
2. Add the commands in uamps.tcl
i think there was something else i did ... check the tcl-object.tcl file. I remember i followed instructions from there.
Got it !
You need to set the variables in \tcl\lib\ns-default.tcl also ::
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
# ------------------------------------------------------
Let me know if the warnings are removed now
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..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.