LinuxQuestions.org
Visit Jeremy's Blog.
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 05-17-2011, 11:37 PM   #76
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261

Helyos,

Am sorry i forgot about the ns-default.tcl ...
once u modify the .tcl, make sure you do a 'make clean' and a 'make depend'
 
Old 05-18-2011, 06:00 AM   #77
helyos
LQ Newbie
 
Registered: May 2011
Posts: 28

Rep: Reputation: 3
deepa_2111 may I kiss you? )
Yes now the warnings are gone and leach is working!! I would like to thank you very, very much.

knudfl thank you too.
 
Old 05-19-2011, 07:05 AM   #78
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@ heylos and Deepa2111

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)
 
Old 05-19-2011, 07:12 AM   #79
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261
@ Keepwalking,

the problem is because there is no space between 'bs' and the '[' in your code. Change it to ::

set bs <space>[list $opt(bs_x) $opt(bs_y)]

Am sure there should be a space between 'bs' and '[' in your code. *<space> refers to the space key. Do not type '<space>'

@ Helyos,

Glad to be of help (but no, you can't kiss me )

Last edited by deepa_2111; 05-19-2011 at 07:17 AM.
 
Old 05-19-2011, 12:03 PM   #80
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@helyos and deepa2111

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)
may you please help me to solve this problem.
 
Old 05-19-2011, 12:28 PM   #81
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@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.
 
Old 05-19-2011, 12:33 PM   #82
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@deepa2111

please help me I need run leach_test but I'm not sure how should I do this.
 
Old 05-19-2011, 06:07 PM   #83
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 179

Rep: Reputation: 261Reputation: 261Reputation: 261
@ keepwalking :

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
 
Old 05-20-2011, 02:59 AM   #84
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
@deepa2111

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.
 
Old 05-20-2011, 04:50 AM   #85
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
hello everybody

Is there any one who have simulated the LEACH-C and PAGESES on ns2.34 if so please help me I need to add it on my system
 
Old 05-20-2011, 12:00 PM   #86
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
Hi everyone,

I need the code for PEGASIS protocol in sensor networks can anyone send that to me.

Thanking you
 
Old 05-31-2011, 03:45 AM   #87
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
Hey every one

I need to add LEACH-C on ns2.34 but I don't have an LEACH-C package and instructions to add it, can you please help me to find it.
 
Old 05-31-2011, 10:52 AM   #88
asrmaster
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 0
Inconsistents Results

Hello,

The parameters of the simulations are:

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 View Post
@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.
 
Old 05-31-2011, 09:38 PM   #89
mav3rick
LQ Newbie
 
Registered: May 2011
Posts: 1

Rep: Reputation: Disabled
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 ?
 
Old 06-01-2011, 03:14 AM   #90
keepwalking
Member
 
Registered: Oct 2010
Posts: 46

Rep: Reputation: 0
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
may you please help me to solve these errors.
 
  


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:26 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