LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-06-2013, 07:24 AM   #601
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22

knudfl and deepa_2111, so much thanks for always helping

Quote:
Originally Posted by knudfl View Post
# 598 .

The "exidus-pegasis" is the latest version of LEACH.
And may be @exidus has included all the file edits suggested by @deepa_2111 and others ?

** The fact is that the "exidus-pegasis LEACH" works very well.
-
Maybe I did a mistake when I installed NS on my computer, that caused the problem appears.
And now I think you can suggest other people to install your "pegasis-ns-2.34-ubuntu10_i386.deb" file if they want to run Leach/Pegasis to avoid errors on installation.

Quote:
Originally Posted by deepa_2111 View Post
@ mhmdmahdi (598)

Congratulations !

I opened my last copy of leach_test and found this :

"ns tcl/ex/wireless_leach.tcl".

Now, I recollect that the steps included replacing the wireless.tcl file with the wireless_leach.tcl file. Was it not there in the instructions you followed ?

Anyway, to answer your question, the reason why it is working now is as follows :

The problem was related to your MAC layer, or the channel. If you parse the wireless_leach file, you'll see the following :

Code:
source tcl/lib/ns-mobilenode.tcl
i'm using the simulation modified by our friend exidus.
On exidus's wireless.tcl, there's also a line to take TCL scripts from external source just like on wireless_leach.tcl. This is from exidus's wireless.tcl:

Quote:
...
# Source External TCL Scripts
#
source tcl/lib/ns-mobilenode.tcl

#if { $opt(rp) != "" } {
...

I have a question, how can I make the nodes mobile (change position each rounds/every 20 seconds). Any hints where to get started?

Last edited by mhmdmahdi; 12-06-2013 at 09:18 AM. Reason: add comment on knudfl post, I missed to read that post :)
 
Old 12-09-2013, 12:37 PM   #602
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
@ mhmdmahdi,

Hmm ... never tried this.
I think the best option would be to randomly generate the positions at the start of each round.
To see how the positions were randomly generated, please have a look at the files in the uAMPS folder ( I forget which tcl file, and since I am away from the home PC, I cannot tell you right now.)

I think you can incorporate a similar code at the start of each round.

Quote:
Originally Posted by mhmdmahdi View Post
I have a question, how can I make the nodes mobile (change position each rounds/every 20 seconds). Any hints where to get started?
 
Old 12-09-2013, 02:49 PM   #603
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
number of nodes, nodes id and nodes position were generated at the beginning of the simulation based on nodes.txt file, right?
Do you think we can re-generate position of alives nodes on tcl file? do you think it will have an impact on nodes id that determined at the beginning of the simulation?

Quote:
Originally Posted by deepa_2111 View Post
@ mhmdmahdi,

Hmm ... never tried this.
I think the best option would be to randomly generate the positions at the start of each round.
I think you can incorporate a similar code at the start of each round.
 
Old 12-10-2013, 02:34 PM   #604
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
Please I need to know the changes required to run leach or leach-c with 200 nodes instead of 100 node

I mean how to run simulation with 200 node
 
Old 12-11-2013, 02:08 AM   #605
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
you can use this guide:
http://www.linuxquestions.org/questi...368/page8.html (post #112)

Quote:
Originally Posted by eng_mohamed_sc View Post
Please I need to know the changes required to run leach or leach-c with 200 nodes instead of 100 node

I mean how to run simulation with 200 node
 
Old 12-11-2013, 03:47 AM   #606
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
Thanks mhmdmahdi

I will try it

Please I need to make sure of this posted at another forum about total energy dissipated in the systems is more that the total initial energy

http://network-simulator-ns-2.7690.n...ol-td4312.html

"I am also working on Leach.I am using mannasim to
implement leach.Although you have not provided the code but according to
what you have mentioned, the following is the explanation,
The energy mentioned is in *mJ(mili).* Initially each node
has 2000mJ of energy. At the end of the simulation (after 542 sec)total
energy is 292mJ i.e (292/100)2.92 mJ per node if all nodes have been
assigned the same Tx/Rx energy including the cluster heads.Total no of nodes
which are alive are 4 which can still transmit/recieve data packets.
The calculation approx is as follows acc to the data,
Total energy=2*100*1000mj=200000mj
Assume Energy to transmit/recieve for each node=3mj
Data packets transmit recived=55934
Therefore,Energy require to Transmit data=55934*3mj=167802mj
Add to this route packets and other overhead transmission of 32000(approx)
TOTAL=199707mj
Therefore Energy left=293mj ,Nodes alive=4.
Hope this solve your problem. "



Is this true or deeba is true
 
Old 12-11-2013, 04:40 AM   #607
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
After I apply deepa solution I found that

At 420.02960000000002:
Total Energy = 198.5657698721059
Total Data = 46140
Total Alive = 3

Simulation complete.

but before it was
At 600.02960000000007:
Total Energy = 947.72888309112454
Total Data = 70418
Total Alive = 3

Simulation complete.

but as you can see with apply Deepa solution simulation end at 420 and Total Data = 46140
but before apply Deepa solution simulation end at 600 and Total Data = 70418
and node died quickly
so please what is true please help

Last edited by eng_mohamed_sc; 12-11-2013 at 06:29 AM.
 
Old 12-13-2013, 06:18 AM   #608
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
Please I still waiting for replies

I use Ns2 ver 2.34 at Ubuntu 10.04

I need to know what is the optimal value for spreading Factor at conditions.txt file under Leach_sims folder

thank for all
 
Old 12-13-2013, 06:30 AM   #609
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
what is this mean Desired number of clusters = 3 at conditions.txt file
 
Old 12-13-2013, 11:06 AM   #610
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
#605 & #606
maybe deepa have an answer for this question.

#608 & #609
desired number of cluster:
number of cluster formed on simulation(5% of total number of nodes based on Wendi's papers). You can change the value desired number of cluster on your leach_test file.
Quote:
num_cluster=5
spreading factor:
highly depend on num_cluster value you use at leach_test file.
you could see leach.tcl file (tcl/mobility/) for spreading factor.
Quote:
set opt(spreading) [expr int([expr 1.5*$opt(num_clusters)])+1]
 
1 members found this post helpful.
Old 12-13-2013, 04:08 PM   #611
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
thanks mhmdmahdi
so I can change spreading factor at conditions.txt file based on nu of CH at leach_test file
eg. if nu of CH=5
so (1.5*5)+1=8.5 so I can put spreading factor =8 at conditions.txt file?

---------- Post added 12-13-13 at 05:09 PM ----------

thanks mhmdmahdi
so I can change spreading factor at conditions.txt file based on nu of CH at leach_test file
eg. if nu of CH=5
so (1.5*5)+1=8.5 so I can put spreading factor =8 at conditions.txt file?
 
Old 12-15-2013, 03:05 AM   #612
eng_mohamed_sc
Member
 
Registered: Jul 2013
Posts: 49

Rep: Reputation: Disabled
deepa please I waiting your replies
 
Old 12-16-2013, 10:47 AM   #613
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Hi eng_mohamed_sc, (for post #606)

The explanation you pasted in (post #606) is not true. If you read the Heinzelman thesis (as you should have in the first place), you will see that all values in the output files are in terms of Joules, and not mJ. I don't know how mannasim works, but as far as ns2 is concerned, I think it is all in Joules.

If you read the intial posts in the following thread (from post #9), you'll see a reference to a work I pasted, where the author explains clearly why the energy in versions other than ns2.1b crosses 200J. The link is : http://www.linuxquestions.org/questi...0/#post4336330.

Hope this solves your question.

Quote:
Originally Posted by eng_mohamed_sc View Post
deepa please I waiting your replies
 
Old 12-16-2013, 03:47 PM   #614
mhmdmahdi
Member
 
Registered: Nov 2013
Location: Indonesia
Distribution: Ubuntu 12.04
Posts: 41

Rep: Reputation: 22
@ deepa_2111

can you help me answer my questions on post #603
thanks
 
Old 12-17-2013, 11:19 AM   #615
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Hi mhmmahdi,

I think you can get the code to work as you please. Since the node ids are sequential (0-99), just have a buffer with the locations if you wish to retain the same locations (maybe the buffer is already present, I cannot remember). Else, you can give each node a random location.

Does this answer your question ?

Quote:
Originally Posted by mhmdmahdi View Post
@ deepa_2111

can you help me answer my questions on post #603
thanks
 
  


Reply

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



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 10:51 PM.

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