@rakesh:
No. of nodes alive at the end of a round is the same as network lifetime. I didnt use xgraph ... so can't suggest anything. Quote:
|
@nmmn134
I saw the same .. leach was better than leach-c. I can only assume that this is due to the differences between ns2.35 (which i used) and ns2.1 (which Heinzelman) used ... There are significant differences in the implementation on the wireless channel. However, the shape of my plots match those in the thesis for leach-c too ... and hence, i assumed my simulation was fine. Quote:
|
@deepa 2111
thx a lotttttttttt i changed the energy.cc and wireless-phy.cc as u said and my nergy is < 200 J GOD bless u.thx a lot |
@deepa 2111
Thanks for your reply. But i want to calculate remaining energy after each round to plot graph. |
Result of Leach & Leach-c
1 Attachment(s)
I install exidus-pegasis_ns-234-leach.tar of exidus. The result seems reasonable. Leach-c was better than Leach because Leach-c was develop from leach.
the plot. http://www.linuxquestions.org/questi...1&d=1363277097 |
Quote:
please i want to plot leach.alive leach .data and leach.energy (i'm using gnuplot) but i don't know really how to do that,i tried to use this command (plot "leach.X" 1:3 using lines; by the way X here is data,energy or alive) but the graphs that i got are really so strange and don't match with the theoric results !!! could u please help me and tell me what should i do exactly ?? thx in advance. |
i want to know how to get correct .nam file for leach
i added following code in WIRELESS.TCL set nf [open $opt(rp).nam w] $ns_ namtrace-all-wireless $nf $opt(x) $opt(y) but in leach.nam file i am getting following output and its not working or showing simulation in nam(just empty window) V -t * -v 1.0a5 -a 0 W -t * -x 1000 -y 1000 A -t * -n 1 -p 0 -o 0xffffffff -c 31 -a 1 A -t * -h 1 -m 2147483647 -s 0 please tell how to do correct simulation with correct output in leach.nam file asap. thanx in advance.. |
recovering energy of node in ns-leach.tcl
hello every one i am doing some modifications in ns-leach.tcl and i am stuck in how to recover the energy of node to know who has the biggest one so i can chose it like second cluster head plz help me :scratch:
|
Quote:
What and how to modify that...plz describe step by step... I m stuck on the problem: "In member function ‘void CMUTrace::format_rca(Packet*, int)’: trace/cmu-trace.cc:1531: error: ‘A’ was not declared in this scope trace/cmu-trace.cc:1535: error: ‘R’ was not declared in this scope trace/cmu-trace.cc:1539: error: ‘D’ was not declared in this scope make: *** [trace/cmu-trace.o] Error 1" root@ubuntu:/home/raju/ns-allinone-2.34/ns-2.34# plz plz help.. how to solv??????????? |
choose a vice cluster head in leach
this is my code to select a vice cluster head among cluster nodes, according to their energy, the cluster head chooses among its member , the node with the highest energy . this is the code
# Set the TDMA schedule and send it to all nodes in the cluster. set TDMA $clusterNodes_ set Ei 0 set nodeID [$self nodeID] set element $nodeID foreach element $TDMA { set E [[$self getER] query] puts " energy est $E " if { $Ei < $E } { set Ei $E } } set SCH $element puts " le vice cluster de CH $chID est $SCH " -->the result (energy nodes of each cluster are equal) energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 energy est 1.4088472606115843 the vice cluster head of CH 7 is 23 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 energy est 1.3976149376339855 the vice cluster head of CH 10 is 42 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 energy est 1.4792380219880841 the vice cluster head of CH 25 is 53 energy est 1.3267670010478381 energy est 1.3267670010478381 energy est 1.3267670010478381 energy est 1.3267670010478381 the vice cluster head of CH 56 is 27 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 energy est 1.5025911961133158 the vice cluster head of CH 59 is 88 |
Xgraph
@rakeshpanchiwala
Quote:
Thank you |
@lavender
I have plotted graph in xgraph format. Does not need any awk script. |
could you tell me how ?
Quote:
|
@Deepa 2111
please when i run the simulation of leach the output was At 524.60000000005073: Total Energy = 199.88864065249675 Total Data = 53086 Total Alive = 4 Simulation complete. even if in the PhD thesis by Heinzelman the time was more than this could you tell me what is the problem please ? |
dsr routing protocol modification
hello sir i harshil
i want to modification in DSR routing protocl by using some code in dsr.cc file .i want to add this code in dsr.cc but some error is generated so plese help me.this code for acknolodgment reply for imrove performance of dsr void MDSRAgent::getRouteForPacket(SRPacket &p, bool retry) { Entry *e = request_table.getEntry(p.dest); Time time = Scheduler::instance().clock(); if snooze==1&&recv.ACK==1 SRPacket rrp = p; rrp.pkt = p.pkt->copy(); hdr_sr *srh = hdr_sr::access(rrp.pkt); hdr_ip *iph = hdr_ip::access(rrp.pkt); hdr_cmn *cmh = hdr_cmn::access(rrp.pkt); iph>daddr()=Address::instance().create_ipaddr(p.dest.getNSAddr_t(),RT_PORT); iph->dport() = RT_PORT; iph>saddr()=Address::instance().create_ipaddr(net_id.getNSAddr_t(),RT_PORT); iph->sport() = RT_PORT; cmnh->ptype() = PT_DSR; cmnh->size() = size_; cmnh->num_forwards() = 0; }#endif |
All times are GMT -5. The time now is 11:12 PM. |