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.
I'm trying to run ./test now there is nothing on the written on the file: LEACH.out and in the leach.err there the following errors may you please help me to solve this problem.
Code:
can't read "bs50 175": no such variable
while executing
"set bs[list $opt(bs_x) $opt(bs_y)]"
(file "mit/uAMPS/sims/uamps.tcl" line 151)
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)
thank you for assisting to solve my problems now if i'm trying to run the ./test the leach.out does not have anything in it and on the other side the leach.err is having the following errors:
Code:
can't read "bs50 175": no such variable
while executing
"set bs[list $opt(bs_x) $opt(bs_y)]"
(file "mit/uAMPS/sims/uamps.tcl" line 153)
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)
@deepa2111 and helyos
I thank you so much I got this result on my first simulation but now I need to check delay, throughput, and other metrics please help to find the TCL script for finding this metrics.
Code:
At 450.90000000003403:
Total Energy = 253.80849852085049
Total Data = 49710
Total Alive = 4
Simulation complete.
Please go through all the previous posts in the links that knudfl sent you. Your outputs are all in leach_sims folder. You have the different files there (for amount of energy used in the different rounds, energy for each round and nodes alive in each round, as well as time stamps) . Please try to understand what each one does thoroughly, and if you still can't find your answer, let us know.
the tcl file which prints the statistics is stats.tcl
Thank you for helping me on my work my main work is to find delay between the for leader election,communication over head and average number of hop to the base station. please help me to find this.
number of nodes = 100;
amount of energy of each node = 2j;
Therefore, the total energy consumption should be less than 200J. And the protocol is generating a result of 253.8j.
Could someone explain? For I have installed on the leach ns-2.34, but the results are quite different from the results of ns-2.15b.
Quote:
Originally Posted by keepwalking
@deepa2111 and helyos
I thank you so much I got this result on my first simulation but now I need to check delay, throughput, and other metrics please help to find the TCL script for finding this metrics.
Code:
At 450.90000000003403:
Total Energy = 253.80849852085049
Total Data = 49710
Total Alive = 4
Simulation complete.
hey Guys,
I'm new in here i have been following this thread for a couple of days and your posts have been very helpful.
I'm trying to install LEACH on ns-2.34 in Ubuntu 11.04. When i run the ./test i get a
invalid command name "Resource/Energy" error
i guess its because of the gcc version i have installed 4.2
Is there a way to resolve this or i should go back and istall ubuntu 10.04 ?
Hey everyone
I'm trying to simulate the LEACH-C but getting the following errors, when I'm trying to change parameter rp on file leach_test can any one help me to solve this problem.
Code:
can't read "env(uAMPS_LIBRARY)": no such variable
while executing
"source $env(uAMPS_LIBRARY)/ns-leach.tcl"
(file "tcl/mobility/leach-c.tcl" line 7)
invoked from within
"source.orig tcl/mobility/leach-c.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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.