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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
01-22-2013, 06:29 AM
|
#376
|
|
Member
Registered: Apr 2011
Posts: 94
Rep: 
|
@ engr (#375),
At the end of a round, make a loop and add the energy of each node in the cluster, and divide by total number of nodes in the cluster.
You can do this in the function "decideClusterHead"
Make a new variable (array) similar to clusterDist_, and like in function recvADV_CH, add the cluster node's energy to the newly created variable. After that, in decideClusterHead, calculate the average energy in each cluster
Hope this helps
|
|
|
1 members found this post helpful.
|
01-28-2013, 04:42 AM
|
#377
|
|
LQ Newbie
Registered: Dec 2012
Posts: 12
Rep: 
|
hello everyone
|
|
|
|
01-28-2013, 04:47 AM
|
#378
|
|
LQ Newbie
Registered: Dec 2012
Posts: 12
Rep: 
|
Hello Everyone
i have insalled ns2.34 in ubuntu12.04 with gcc-4.4.
i also want to simulate leach in ns2.34 but i got error in leach.err file.
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.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 /opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 31)
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 to solve error.
|
|
|
|
01-28-2013, 04:59 AM
|
#379
|
|
Member
Registered: Jan 2012
Posts: 30
Rep: 
|
Quote:
Originally Posted by rakeshpanchiwala
Hello Everyone
i have insalled ns2.34 in ubuntu12.04 with gcc-4.4.
i also want to simulate leach in ns2.34 but i got error in leach.err file.
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.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 /opt/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 31)
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 to solve error.
|
Check ur gcc compiler version and export gcc-4.3
|
|
|
|
01-28-2013, 11:28 PM
|
#380
|
|
LQ Newbie
Registered: Dec 2012
Posts: 12
Rep: 
|
@engr
thanks yar but how to install gcc-4.3.
i have use many commands but it gives error.
i used
sudo apt-get install gcc-4.3 g++-4.3
but it gives error like
E: Package 'gcc-4.3' has no installation candidate
E: Unable to locate package g++-4.3
E: Couldn't find any package by regex 'g++-4.3'
so please help me as quick as possible....
|
|
|
|
01-29-2013, 06:34 AM
|
#381
|
|
Member
Registered: Jan 2012
Posts: 30
Rep: 
|
Quote:
Originally Posted by rakeshpanchiwala
@engr
thanks yar but how to install gcc-4.3.
i have use many commands but it gives error.
i used
sudo apt-get install gcc-4.3 g++-4.3
but it gives error like
E: Package 'gcc-4.3' has no installation candidate
E: Unable to locate package g++-4.3
E: Couldn't find any package by regex 'g++-4.3'
so please help me as quick as possible....
|
Edit both “Makefile” & “Makefile.in” as following:
CC = gcc-4.3
CPP = g++-4.3
and ./configure
make clean
make
|
|
|
|
02-01-2013, 11:08 PM
|
#383
|
|
LQ Newbie
Registered: Dec 2012
Posts: 12
Rep: 
|
@engr
after the installation of gcc-4.4, it cant read packages of gcc-4.3.
please anyone help me to install gcc-4.3 in ubuntu 12.04.
|
|
|
|
02-02-2013, 01:18 AM
|
#384
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,615
|
# 383, @rakeshpanchiwala.
There is no "Ubuntu g++/gcc version 4.3" for Ubuntu 12.04.
Please use version 4.1.2, also mentioned in post # 181.
The version for 12.04 is 1) gcc41-compat-4.1.2.ubu1204_i386.deb
2) g++41-compat-4.1.2_i386.deb
$ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb g++41-compat-4.1.2_i386.deb
... See post # 18 here ..
http://www.linuxquestions.org/questi...022/page2.html
-
Last edited by knudfl; 02-03-2013 at 06:40 AM.
|
|
|
|
02-05-2013, 08:04 PM
|
#385
|
|
LQ Newbie
Registered: Feb 2013
Posts: 15
Rep: 
|
@engr, @deeba2111 i want to contact you my mail is engineerali2009@gmail.com
thank you
|
|
|
|
02-12-2013, 08:02 AM
|
#386
|
|
LQ Newbie
Registered: Feb 2013
Posts: 3
Rep: 
|
hello everyone
i have installed this leach pacth on my ns-2.34 on ubuntu 12.04 and i've run the ./test, then after i read some file from this patch like test, leach_test, i just know that test file call the leach_test then run the tcl/ex/wireless.tcl
my question is why in the wireless tcl in this global variabel for routing variable this still use DSDV routing protocol?
and why call the leach protocols?
thx before and i'm sorry for my bad english
|
|
|
|
02-13-2013, 04:29 AM
|
#387
|
|
Member
Registered: Jan 2012
Posts: 30
Rep: 
|
hi all
can anyone please tel me..
in ns-leach.tcl clusterDist_ is what?
is is physical distance or max signal strength?
kindly reply me asap..
also kindly tel me whats spreading?
thnx
|
|
|
|
02-14-2013, 07:57 AM
|
#388
|
|
LQ Newbie
Registered: Feb 2013
Posts: 3
Rep: 
|
hello everyone
Is there anyone simulate HEED protocol in NS2 ?
i need this code for my assignment
thx before 
|
|
|
1 members found this post helpful.
|
02-15-2013, 06:38 AM
|
#389
|
|
LQ Newbie
Registered: Feb 2013
Posts: 15
Rep: 
|
can u help me plz . when i run Leach protocol in ns2 in the leach.out the number of nodes is more than 5 although nodes numbers=100, and in leach_test num of nodes k=5 where is the problem ??
|
|
|
|
02-20-2013, 10:44 PM
|
#390
|
|
LQ Newbie
Registered: Feb 2013
Posts: 3
Rep: 
|
Hello everryone I've got same result with @forco while running the leach simulation, what should i do so that the simulation can run normally
thx regards
Quote:
Originally Posted by forco
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
|
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:54 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|