LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to integrate the "Resource/Energy" leach class into NS-2.34? (https://www.linuxquestions.org/questions/linux-software-2/how-to-integrate-the-resource-energy-leach-class-into-ns-2-34-a-870368/)

shailu 03-22-2012 08:32 PM

Hello TSE_2011
u have to provide path in the uAMPS directory. the answer is given by deepa in few page ahead in this same thread try that it will work.

prat810 03-28-2012 08:05 AM

@deepa_2111...need help..!! what to do
 
leach.err:

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 "/home/sameep/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/sameep/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 /home/sameep/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 30)
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)

deepa_2111 03-29-2012 08:43 AM

Hi prat,

you have to give the proper address of your libraries.

prat810 03-29-2012 09:51 AM

@deepa_2111.....
 
where do i change the addresses of libraries...am unable to detect the value to change..!!
please can u give alittle detail on the three errors..??

auvikuet 03-30-2012 02:32 AM

sorry for the duplicate post

naitikshah 04-04-2012 04:26 AM

Leach on ns2.34 in ubuntu 11.10
 
Hi frndzz,

I want help to install leach on ns2.34 in ubuntu 11.10.
Will the steps given for installation in Post 5 work? Ubuntu 11.10 doesnot have gcc4.3 ....
I have gcc 4.4 and 4.6 installed.

knudfl 04-04-2012 05:04 AM

Post #246 , @naitikshah : Welcome to LQ.

No Ubuntu version can use gcc-4.3 for ns-2.xx any more, I think.
That was more than a year ago.
Some packages got updated. Now it's gcc-4.1 for ns-2.33 , ns-2.34 etc.
And : Ubuntu 11.04, 11.10 ( 12.04 ? ) cannot use old Ubuntu gcc compilers.

There is a fix to install ns-2.34 to Ubuntu 11.10 :
http://erl1.wordpress.com/2011/10/14...neiric-ocelot/
.. But no guarantees with the validate result / leach result.
If it must be Ubuntu : 10.04 produces the best result.
Default OS for ns2 is CentOS 6 ( or CentOS 5 or any Fedora.)

LEACH, ns234 : Please read posts #9, #11 here
http://www.linuxquestions.org/questi...dora13-907076/

.

engr 04-04-2012 05:14 PM

mobility models to leach
 
hi everyone..!
i have installed leach on ns2.34 successfully thnx alot.
now but now i dont know how to generate graphs :( plz help me.
plz help me to add mobility models to leach.. its urgent plz
Regards

meprogrammer 04-06-2012 10:16 AM

Quote:

Originally Posted by prat810 (Post 4638706)
leach.err:

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 "/home/sameep/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/sameep/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 /home/sameep/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 30)
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)

I have the same problem than u please tell me what I should do to resolve it

naitikshah 04-13-2012 01:59 PM

@ knudfl

As per your explanation I have successfully installed leach on ns2.34 on ubuntu 10.04. Thank you for that.

But now I have a doubt regarding the output of it.
By default the number of clusters are set to 5. What does that mean? Does it mean that the number of clusters should be exactly 5 till the end or that they cant be more than 5 or etc?

The reason why I am asking is that my TDMA Schedule files show the number of clusters varying from 1 to 8.

deepa_2111 04-13-2012 11:14 PM

@ naitikshah,

if you go through the leach thesis, you'll see that the what is set is the average number of clusters during the simulation, and leach being a probabilistic model, this can vary.
Please go through the leach thesis thoroughly before asking questions based on the leach technique.

deepa_2111 04-13-2012 11:18 PM

@ prat810 (#224) :

The setting of libraries and paths was discussed in an earlier thread. Please go through the earlier posts.

deepa_2111 04-13-2012 11:21 PM

@ TSE_2011 (#238)

In leach.out, you will see that you have outputs every 10 sec for energy, total data at the BS and nodes alive in the netwrk. You can plot these against time as done in the leach phd thesis by Heinzelman et al.

prat810 04-14-2012 04:15 AM

Libraries..
 
Thanx Deepa for yr help..!! Leach working successfully..!!

meprogrammer 04-14-2012 05:20 PM

@ MayTamer
 
plzzz I've the same problem, can you help me how I can add Resource/Energy !!!!! :(


All times are GMT -5. The time now is 06:29 PM.