running leach on ns2.34
I am trying to run leach ns2.27 on ns2.34, can any one give me a clue of how to do it am currently using ubuntu 10.4
thank you |
What do you mean "how to run"? I was under the impression LEACH was a wireless protocol... Can you explain exactly what you're trying to do, where you've looked for information and at what point in the process you've got stuck? Thankyou :)
|
Welcome to LQ. .. .. :) ..
You can have as many versions of ns-allinone-2.x installed, as you want. Installing ns-allinone-2.27 on Ubuntu, post #3 here http://www.linuxquestions.org/questi...10-a-782356/#3 More info : LQ Search , Tag = leach Or LQ Search , keyword = leach .. |
leach simulation
I want to run a simulation on leach (protocol )so I downloaded an ns2.27 package of it, currently I have ns2.34 installed
I am having problem compiling it is there any modification that needs to be made or I would not mind if I can get a link where I can download a package that can run on ns2.34 |
NS-allinone-2.27 :
Quote:
You will have to read everything , post #3 here http://www.linuxquestions.org/questi...10-a-782356/#3 EDIT : New package ns-234-leach.tar.gz + instructions here http://www.linuxquestions.org/questi...34-a-870368/#5 ( LEACH for ns-2.34 : posts 68 - 78 - 88 , etc., here http://www.linuxquestions.org/questi...379/page5.html ) .. |
hey !
I have just added LEACH to Ns 2.35. HAd to make a couple of changes, but it has passed all the validation tests. Now, while trying to run LEACH, am stuck at :: couldn't read file "/usr/local/ns-allinone-2.35-RC4 /ns-2.35/mit/rca /ns-ranode.tcl": no such file or directory while executing "source.orig {/usr/local/ns-allinone-2.35-RC4 /ns-2.35/mit/rca /ns-ranode.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 $env(RCA_LIBRARY)/ns-ranode.tcl" (file "mit/uAMPS/sims/uamps.tcl" line 9) 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_leach.tcl" line 187) I know this is from uamps.tcl. I know the file is there, and the env variables are set. Have seen this question on a couple of forums, but not able to figure out how to fiz this. Please help ! |
Post #6 @deepa_2111 : Welcome to LQ. .. .. :) ..
Please edit post #6 to use code tags: [/code] at code end, and [code] at code text start. http://www.linuxquestions.org/questi....php?do=bbcode Why ns-allinone-2.35-RC4, when RC7 is available ? http://www.isi.edu/nsnam/dist/release/ And /usr/local/ is not a very convenient location for ns-allinone-2.xx. Default is /home/<user-name>/ns2/ns-allinone-2.xx/. It is not quite clear, what you are doing. "run LEACH" : What do you mean ? Please specify the used command. (Most things are probably described here, posts # 68...# 140 .... .. http://www.linuxquestions.org/questi...79/page10.html ) LEACH for ns-2.34 : The latest files and install instructions are here http://www.linuxquestions.org/questi...34-a-870368/#5 .. |
Hey ..
Thanks a lot ... I've got it running. Regarding ns-allinone-2.35-RC4, it is coz I'm running it on cygwin, and I think this is the most stable version. I was trying to run the leach_test file, and i had the issues i mentioned above. I fixed it by manually typing the path to remove any extra spaces. I am going to analyse my results now. Thanks for the "code" suggestions. |
Hello,
I was analysing the results, and I come across this discrepancy (which I see mentioned on a couple of forum posts as well). If I start with 2J energy per node, with 100 nodes, the maximum energy that can be expended in the network is 200J. But, leach.out shows me:: Code:
At 548.60000000005618: Further, the document "Porting and Verifying AROS to NS in Linux/UNIX" (by Francisco José Mosqueira Sáez) (http://www.idt.mdh.se/utbildning/exj...les/TR0509.pdf) mentions this issue on page 33, with an explanation:: Quote:
|
Quote:
|
Quote:
wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34/mit/leach_sims$ awk -f TotEn.awk leach-c.energy // for Leach-C wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34/mit/leach_sims$ awk -f TotEn.awk leach.energy // for Leach |
Post # 11 : Thank you.
But the link isn't working. Shared settings in 'Google Docs': <awk file> → Actions > Share > Sharing Settings > Change > > Anyone with a link >>> Save ( > Close ). |
Hello ,
Thanks for ur replies. I modified the code as well :: In \mac\Wireless-Phy.cc: Code:
if (energy_) and in mit\rca\energy.cc : Code:
int EnergyResource::remove(double amount) |
Have you noticed that LEACH-C performs worse than LEACH though actually it is supposed to give better performance ? In a previous post, I see someone has mentioned this same observation ... not sure if it has been rectified though.
|
Quote:
|
hello every body
I'm doing my research based on leader election algorithms for wireless sensor network, may any one who knows other leader election algorithms help me with it installation packages and instruction so that I can add it on ns2.34. Thank you. |
Quote:
|
@deepa_2111
Yes I mean cluster heads as in LEACH thanks |
Hmm ...
I am finding a lot of discrepancies with the actual LEACH paper. For example, the avg energy/round plot for different clusters. After porting, I find that the values are 5 times that in the LEACH paper. Do you guys have the same findings ? Can you post your plots if you have ? |
What did you want help with ? Adding LEACH code to ns-2 ?
Quote:
|
adding LEACH to Ns2.34
when I'm using the make command I get the following error: Code:
|
Quote:
Code:
... |
hey Deepa 2111
I have added the code you said I must add but it still shows the same error. Please look at this code below for class cmu-trace.h Code:
/* -*- Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- |
Hey !
You have not added the format_rca declaration. You have added a "format_impe" declaration. This maybe why the error still persists. i am not sure if the #ifdef is case sensitive. If it is, change "MIt_uAMPS" to "MIT_uAMPS" Quote:
|
Thank deepa 2111 for helping me to so out the problem for cra format.
now it gives me the following error and may you please help me to solve this problem. Code:
trace/cmu-trace.cc:48:17: error: rca.h: No such file or directory |
@ Keepwalking,
Pls check out this link :: http://www.linuxquestions.org/questi...368/page4.html I have answered this question there |
Keepwalking,
I got your mail. you said Quote:
|
Does ns2.1b5 also show similar results ????
Quote:
|
Inconsistent results
Hi Deepa,
Thanks for your reply, it solved the problem of calculating the energy consumption. But I still see problems in the results. For ns-2.1b5 simulation results are approximately as follows: Parameters: energy: 2j energy per node; number of nodes: 100; network area: 100m x 100m; number of clusters: 5; distance from the base station: 75m; Approximate results in ns-2.1b5: Lifetime: 560 Amount of data being sent: between 62,000 and 64,000; Approximate results in ns-2.34: Lifetime: between 480 and 550; Amount of data being sent: between 45000 and 55000; That is, the ns-2.34 the results have a greater sway, with much variation. While ns-2.1b5, the results vary less. Moreover, ns-2.1b5, the results are better than the ns-2.34. Does anyone know how to explain these differences? NOTE: Please disregard any typos because my English is not very good. Quote:
|
Complementing, the network consumption in LEACH-C, running on the ns-2.1b5, is around 198j (without your changes in WirelessPhy.cc and Energy.cc) to 100 nodes, with 2j energy, ie it is calculated correctly.
|
hey asrmaster,
from what i have analysed, the problem is due to the manner in which the channel is implemented. I have posted my reply on the other thread. i havent run on ns2.1b5, but ns2.35 gives me the smae resutls as yours |
Hi deepa,
Thanks for your reply and help. But, I have a question. The your results in ns-2.35 are equivalent to my results in the ns-2.1b5 or ns-2.34? Quote:
|
hi asrmaster,
sorry for being unclear. my ns2.35 results match your ns2.34 results. am in the process of fixing the channel. Can you please do me a favour ? Can you send me your ns2.1b5 's leach.out ? can you please enable 'quiet' (set the parameter to 0) in uamps.tcl, re-run it and send me the output file leach.out (in ns2.1b5) ? just want to verify what happens when a cluster head dies on the ns2.1b5 version. also, can you tell me which version of linux you used to install ns2.1b5 ? Your help would be appreciated a lot .. thanks in advance Deepa |
Energy consumption
Hello
Can u give me the methode to calculate the energy consumption of nodes in NS2 (scripts or tcl code)? or any other information that can help me. Thank you |
LEACH on ns2.35
@deepa_2111. Can you please explain how you added LEACH on ns2.35? I am using cygwin. Thanks a lot
Quote:
|
mit leach in ns2.34
i have installed ns-leach2.34 in ns2.34.the test command in run successfully. but in leach.out file the following errors occured.plz help me. what should i done.
couldn't read file "/home/narendra/simulator/NS-allinone-2.34/NS-2.34/mit/rca/ns-ranode.tcl": no such file or directory while executing "source.orig /home/narendra/simulator/NS-allinone-2.34/NS-2.34/mit/rca/ns-ranode.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 $env(RCA_LIBRARY)/ns-ranode.tcl" (file "mit/uAMPS/sims/uamps.tcl" line 9) 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) |
help for ns2
could you please help me
im doing project with ns2 i have one problem that is how to make a node to dead randomly in ns2 |
pleese help me
how to make deadnodes in ns2 help me it's urrgenttt............
|
@deepa_2111...
i am also trying to implement LEACH on ns2.35. How did you go about this?? Which patch of LEACH did you use?? Its a little important for my project to kickstart. Kindly help!! Need steps in brief. Thx in advance. |
LEACH in ns2.35?
hi all;
anyone of you has implemented LEACH in ns2.35?? Kindly guide me..as i am stalled because of this. Please help!! |
|
@knudfl
I went through the link earlier also. deepa_2111 has not given detailed steps. Need to implement LEACH to kickstart things. Any other link?? @deepa_2111...are you reading this?? for benefit of beginners like me, kindly give us steps you took in ns2.35. |
# 42.
Well, you know that you can install leach on ns-2.34, if you have a usable OS. I.e. you can have as many versions of ns-allinone-2.xx as you want, installed at the same time. . |
@ knudfl
can u please tell me what pp means in tcl script that is provided in nsleach. |
#44
Quote:
Another example using pp : http://wiki.tcl.tk/1821 >>> Powerpoint - export slides to images. $pp Quit unset pp I guess you will have to learn tcl to find an answer. . |
@ Shailu (#44)
pp is a function that prints only when a certain flag is set to 1 (unlike puts). This function is described in one of the tcl files in the mit folder. Please study properly all the tcl and cc files in the mit library before asking these kind of questions. |
leach-energy calculation
Hi asrmaster,
I've also tried the code suggested by deepa,but the total expended energy is still much greater than the total initial energy. Could you show me your modified code? Quote:
|
leach-energy calculation
Hello deepa,
I've tried your code and did make clean and make. However, I still got the total expended energy is much greater than the total initial energy. Did I miss any important step? Really appreciated if you could reply. TQ Quote:
|
number of nodes alive
hello @deepa_2111
i modified the code in energy.cc file and wireless_phy.cc file.. and i got my energy decreased.. but still my number of alive nodes are 4.. Is there any way to increase it????? |
Quote:
./configure make clean make but my leach.out is false !! please help this is urgent for my project and i have no more time |
All times are GMT -5. The time now is 08:04 PM. |