how to integrate the "Resource/Energy" leach class into NS-2.34?
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i'm new to this forum and i tried to run pegasis really bad, but it just doesn't want to work...
i'm using
tcl-8.4
gcc-4.4
ns-allinone-2.34
ubuntu 12.04
did not edit .bashrc
i also set all paths in every file for leach or pegasis
every other protocol is running exept leach/pegasis because of the Resource/Energy error i get in pegasis.out
i really need to simulate pegasis for my research
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81
Rep:
Quote:
Originally Posted by AlgorithMan
hello guys,
i'm new to this forum and i tried to run pegasis really bad, but it just doesn't want to work...
i'm using
tcl-8.4
gcc-4.4
ns-allinone-2.34
ubuntu 12.04
did not edit .bashrc
i also set all paths in every file for leach or pegasis
every other protocol is running exept leach/pegasis because of the Resource/Energy error i get in pegasis.out
i really need to simulate pegasis for my research
please help me, i would be very thankfull!!
my pegasis work, but no data has been transferd (0data). try fix ur leach first. read post before ur post.
ref #921
thank you for your reply! i also read your conversation with knudf, but nothing seems to work...
i can run leach protocol , but still no data is sent to bs.
in leach.out it says, that nodes are initialized, CH were selected and cluster ADVs are broadcasted, but not a single node has a CH ADV received.... :/
--> therefore no node has a cluster were it belongs to
it seems, that every time i start simulation with ./test is has a completely different output and leach.data.txt always says data=0.
the file leach.err shows no errors.
but although i solved the Resource/Energy problem
can u please help me? i'm trying to run leach and pegasis for about two weeks now.
Last edited by AlgorithMan; 03-25-2015 at 06:24 AM.
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81
Rep:
Quote:
Originally Posted by AlgorithMan
ref #921
thank you for your reply! i also read your conversation with knudf, but nothing seems to work...
i can run leach protocol , but still no data is sent to bs.
in leach.out it says, that nodes are initialized, CH were selected and cluster ADVs are broadcasted, but not a single node has a CH ADV received.... :/
--> therefore no node has a cluster were it belongs to
it seems, that every time i start simulation with ./test is has a completely different output and leach.data.txt always says data=0.
the file leach.err shows no errors.
but although i solved the Resource/Energy problem
can u please help me? i'm trying to run leach and pegasis for about two weeks now.
u said u have solve the resource/energy problem
can u show output, and ur scenario.
for pegasis still not work correctly.
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81
Rep:
Quote:
Originally Posted by AlgorithMan
hi emprit,
[/CODE]
the simulation continues and finishes. but at the end of the simulation data is always 0...
leach.err.
Code:
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!
my szenation file is complex but works with every other routing protocol and in other simulations, so no problems there i guess.
Thank you for your reply!!!
which path of leach u use? then i mean scenario is like
all variable on leahc_test
example:
Code:
alg= leach
init_energy = 2
eq_energy = 1 (1 mean is all node have same energy for begining)
num_cluster = ?
and how about area of sensor scenario 100x100?
i look on ur output startup some node on 8s, that was to long.
many reason why no data have been send, like energy every node is not enough / distance every node too far. it make node died or cant reach target.
Warning!!! No Cluster Head ADVs were heard! it mean all node doesn't have a cluster head, so all node send to BS directly. this need more energy to send data, because distance.
as u see, energy is infinite in my sim, so there's no problem.
about my scenario. i have 18 static nodes, which don't move during simulation and 80 that are moving. the nodes are relatively close together, so there should also be no problem i guess. like i said, every other protocol works....
PS: no nodes are dying during sim
end of leach.out
Code:
.
.
.
.
.
.
.
Node 0 sending {{0 , 178.79607199999998}} to BS at time 178.79737546479419 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
Node 30 sending {{30 , 178.79607199999998}} to BS at time 178.79690242914086 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
Node 42 sending {{42 , 178.79607199999998}} to BS at time 178.80352472721975 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
Node 95 sending {{95 , 178.79607199999998}} to BS at time 178.80451493322806 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
At 180: - mit/uAMPS/stats.tcl
Total Energy = 84768.298567677557
Total Data = 0
Total Alive = 98
Simulation complete. - mit/uAMPS/stats.tcl
u said that if there's no cluster head for node, data is sent to BS directly. i know that, but the problem is, that although no data is shown in statistics....
and that's the main problem of the sim..
Last edited by AlgorithMan; 03-27-2015 at 04:47 AM.
Hi every one, I have a problem with my leach implementation, I installed ns2 and module leach 234
when i ran this command, i gived an error, pls help me...!!! thank you all. Sorry for my bad english
ns /home/et/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl \
>
couldn't read file "/ns-2.34/tcl/mobility/dsdv.tcl": no such file or directory
while executing
"source.orig /ns-2.34/tcl/mobility/dsdv.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 /ns-2.34/tcl/mobility/$opt(rp).tcl"
(file "/home/et/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl" line 187)
How to run a default tcl/ex/wireless.tcl :
$ cd ns-2.34/tcl/ex/ && ns wireless.tcl
I.e. you can never do like $ ns /home/et/ns-allinone-2.34/ns-2.34/tcl/ex/wireless.tcl
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.