![]() |
@lavender:
1) k=5 signifies the average no. of cluster heads during the entire simulation. Hence, in some rounds, it can be high, and in some low. If you read the PhD thesis by Heinzelman, you'll see that they have a plot which shows that the no. of cluster heads during simulation can vary between 0 and 10 2) Initially, the dist is set as max distance for every node. Once the nodes receive CH advertisements, they calculate the distance between themselves and the CH. Again, not that the distance is not the physical distance, but the communication distance. For the CH, the dist is set as Max dist as it should be capable of transmitting over the entire network, and 139 is the physical distance between the 2 farthest nodes in the network Quote:
|
1 Attachment(s)
@ Deepa Thank you ^_^:hattip:
but could you tell me if my simulation result is true or false? |
hellow deepa 2111 , i integrate leach in ns-allinone 2.34 in ubuntu 10.04 i did all the steps one by one at the end when i checked leach.out i found it empty and leach.err has this error :
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/rain/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11) invoked from within "source.orig /home/rain/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 $env(RCA_LIBRARY)/resources/ns-energy-resource.tcl" (file "mit/uAMPS/sims/uamps.tcl" line 18) 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) pleaaaaaaaaaaaaaaaaaaaaaaaaaaase help me :( , despite i didn't make any changes to the files that showed in the error |
thank you all for helping me to install leach,
Now i have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file...... And how to calculate network lifetime and remaining energy for both leach and leach-c protocol. |
Quote:
can you more explain this step because I don't understand where exactly I will insert this code on the file /ns-allinone-2.34/ns-2.34/mac/wireless-phy.cc.I try many time but it generate this error error:expected initializer before ‘alive_’ please help me!!!!! |
i installed leach finally in my ns2.27 according to one of the threads in this site but when i do ./test and verify my energy in leach .out my nergy is > 200 j which is not correct because i have 100 nodes with 2 J each one i did all the modifications i even change my CC=gcc-4.4 and cpp=g++-4.4 in makefile.in i don't know what to do everything seems normal and i got no error when i do
./configure make clean make but my leach.out is false !! please help this is urgent for my project and i have no more time |
[QUOTE=engr;4869599]alos my leach.out file is empty. while
leach.err file has these errors invalid command name "Resource/Energy" while executing "Resource/Energy instproc setParams {args} { hi please could u tell me if u found a solution for that because i have the same problem ??? :( thx |
[QUOTE=rakeshpanchiwala;4878908]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. add these changes: Edi the file in ns-allione-2.27/ns-2.27/mit/uAMPS/sims/uamps.tcl Replace lines #12 to 15 with these lines: source mit/rca/ns-ranode.tcl source mit/uAMPS/ns-bsapp.tcl source mit/uAMPS/extras.tcl source mit/uAMPS/stats.tcl Replace lines #20 to 22 with these lines: source mit/rca/resources/ns-resource-manager.tcl source mit/rca/resources/ns-energy-resource.tcl source mit/rca/resources/ns-neighbor-resource.tcl Follow the same logic of replacing $env(RCA_LIBRARY) and $env(uAMPS_LIBRARY) with mit/rca and mit/uAMPS correspondingly in the following files: ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach.tcl ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach-c.tcl Step 3: cd ns-allione-2.27/ns-2.27/ ./configure make clean make ./validate ./leach-test Check in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.err if the file reports any errors Check the simulation outputs in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.out |
[QUOTE=monajh;4899843]hello all
i am installing leach protocol in ns 2.34 try to do this : Edi the file in ns-allione-2.27/ns-2.27/mit/uAMPS/sims/uamps.tcl Replace lines #12 to 15 with these lines: source mit/rca/ns-ranode.tcl source mit/uAMPS/ns-bsapp.tcl source mit/uAMPS/extras.tcl source mit/uAMPS/stats.tcl Replace lines #20 to 22 with these lines: source mit/rca/resources/ns-resource-manager.tcl source mit/rca/resources/ns-energy-resource.tcl source mit/rca/resources/ns-neighbor-resource.tcl Follow the same logic of replacing $env(RCA_LIBRARY) and $env(uAMPS_LIBRARY) with mit/rca and mit/uAMPS correspondingly in the following files: ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach.tcl ns-allione-2.27/ns-2.27/mit/uAMPS/sims/leach-c.tcl Step 3: cd ns-allione-2.27/ns-2.27/ ./configure make clean make ./validate ./leach-test Check in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.err if the file reports any errors Check the simulation outputs in ns-allione-2.27/ns-2.27/mit/leach_sims/leach.out |
thank you all for helping me to install leach,
@ deepa 2111 I have installed leach and leach-c protocol but how to plot graph from leach.alive, leach.energy and leach.data file...... And how to calculate network lifetime and remaining energy for both leach and leach-c protocol. |
@lavender ...
I did not go through the 88 pages of your result .. I looked at the last page, and find that though the total data sent and the energy consumption seem to be fine,the nodes alive seem strange. Why does your simulation stop despite there being 33 nodes ? Generally, simulation stops when the no. of alive nodes = k-1 Quote:
|
@rakesh (#415)
You can have 3 plots: no.of nodes alive on Y axis and time on X axis energy consumption on Y axis and time on X axis total data received at BS on Y axis and time on X axis from leach.alive, leach.energy and leach.data files respectively. Try to see if your plots match those plots in the PhD thesis by Heinzelman. If they do, your simulation results are fine. Quote:
|
@ emma166
Please go through the earlier posts on this link ... There has already been a discussion on this issue. I had updated my fixes for this problem. Hope it helps you. I used ns2.35 though. Quote:
|
Result of Leach & Leach-c
@ deepa 2111
I already run Leach and Leach-c. But my result of leach is better than result of leach-c. why this for result ? Please help me ! Leach.out Code:
Leach-c.out Code:
H 47 must now perform comp and xmit to BS. |
@deepa 2111
Thanks for your reply........... I have plotted my graph as you described but i want to plot graph of network lifetime and remaining energy. so please give me quick reply its urgent. I also want to compare that results in xgraph but it only plots one graph. If possible to compare in xgraph then Please give me quick reply. |
All times are GMT -5. The time now is 11:46 AM. |