LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 03-14-2013, 07:07 AM   #421
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268

@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:
Originally Posted by rakeshpanchiwala View Post
@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.
 
Old 03-14-2013, 07:11 AM   #422
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@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:
Originally Posted by nmmn134 View Post
@ 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
 
Old 03-14-2013, 08:58 AM   #423
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Rep: Reputation: Disabled
@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

Last edited by emma166; 03-14-2013 at 08:51 PM.
 
Old 03-14-2013, 10:42 AM   #424
rakeshpanchiwala
LQ Newbie
 
Registered: Dec 2012
Posts: 12

Rep: Reputation: Disabled
@deepa 2111
Thanks for your reply.
But i want to calculate remaining energy after each round to plot graph.
 
Old 03-14-2013, 11:19 AM   #425
nmmn134
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Result of Leach & Leach-c

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
Attached Thumbnails
Click image for larger version

Name:	plot.png
Views:	310
Size:	45.8 KB
ID:	12055  
 
1 members found this post helpful.
Old 03-15-2013, 02:27 PM   #426
emma166
LQ Newbie
 
Registered: Mar 2013
Posts: 14

Rep: Reputation: Disabled
Quote:
Originally Posted by deepa_2111 View Post
@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.
hi deepa2111
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.
 
1 members found this post helpful.
Old 03-18-2013, 02:30 PM   #427
D23
LQ Newbie
 
Registered: Mar 2013
Posts: 6

Rep: Reputation: Disabled
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..
 
1 members found this post helpful.
Old 03-20-2013, 05:46 PM   #428
sonatasin
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Rep: Reputation: Disabled
Question 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
 
Old 03-20-2013, 08:09 PM   #429
inamul
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
Question

Quote:
Originally Posted by deepa_2111 View Post
Are there any files in leach_sims ? for example, leach.err ?
What do you mean by "and I reached leach.out" ???
And did you made a folder called "ns-234-leach". If so, have u modified the leach_test file (line that says dirname="mit/leach_sims") accordingly?

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???????????
 
Old 03-21-2013, 09:28 AM   #430
sonatasin
LQ Newbie
 
Registered: Mar 2013
Posts: 11

Rep: Reputation: Disabled
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
 
Old 04-04-2013, 03:19 AM   #431
@lavender
LQ Newbie
 
Registered: Feb 2013
Posts: 15

Rep: Reputation: Disabled
Question Xgraph

@rakeshpanchiwala

Quote:
Originally Posted by rakeshpanchiwala View Post

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.
Could you please tell me how did you plot it please.and did you use AWk script or not.
Thank you
 
Old 04-08-2013, 12:55 AM   #432
rakeshpanchiwala
LQ Newbie
 
Registered: Dec 2012
Posts: 12

Rep: Reputation: Disabled
@lavender

I have plotted graph in xgraph format. Does not need any awk script.
 
Old 04-08-2013, 06:07 AM   #433
@lavender
LQ Newbie
 
Registered: Feb 2013
Posts: 15

Rep: Reputation: Disabled
Lightbulb could you tell me how ?

Quote:
Originally Posted by rakeshpanchiwala View Post
@rakeshpanchiwala

I have plotted graph in xgraph format. Does not need any awk script.
Could you Tell me how please? and i will be grateful.
 
Old 04-09-2013, 07:02 PM   #434
@lavender
LQ Newbie
 
Registered: Feb 2013
Posts: 15

Rep: Reputation: Disabled
@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 ?
 
Old 04-10-2013, 01:27 AM   #435
harshil00022
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
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
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration