Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Thanks Deepa 211 for your advise. My main challenge is that I don't know how to doing it may any one help me with the example of an Algorithm for selecting a leader maybe for it I can be able to learn from it.
Click here to see the post LQ members have rated as the most helpful post in this thread.
you need a structure with each of the vars in tcl. for example, to you can have a flag/variable 'hasbeenCH' which checks if the node has been a CH in the previous round. So, to go about this, you need the following :
1. a structure with the tcl variables (start with the basic variables. you can add more variables aas you keep going)
2. a function that havs the leader selection algorithm.
3. make an outline design of what you need, or of the logic you wanna implement. then, it becomes easier to write the commands.
Thanks Deepa 2111 for for advise I have came up with C++ code for selecting a leader based on the number that is Randomly generated the but the receiving function is not working. may you please help me to solve this problem I also need to use remaining energy as a criteria for selecting the new leader.
Im trying to implement and simulate leader selection algorithm on ns2 but I'm get error that say: [code]invalid conversion of MobileNode* to TclObject[code]
may any one help me to solve this following errors I'm trying simulate EECED protocol on ns.
bethel@ubuntu:~/ns-allinone-2.34/ns-2.34/EECED$ ns test.tcl
ns:
[code omitted because of length]
: invalid command name "Agent/EECED"
while executing
"Agent/EECED set DADTrials 0"
bethel@ubuntu:~/ns-allinone-2.34/ns-2.34/EECED$
Info about LEACH : LQ Search : Tag = leach
Or LQ Search : Keyword = leach
.
Thank you for the help Knfudl .. I am done installing LEACH on NS2.34 ... But after I execute ./test , I get the following :
"[root@project ns-2.34]# ./test
num_nodes is set 3
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
INITIALIZE THE LIST xListHead
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
warning: no class variable Phy/WirelessPhy::alive_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Phy/WirelessPhy::Efriss_amp_
warning: no class variable Phy/WirelessPhy::Etwo_ray_amp_
warning: no class variable Phy/WirelessPhy::EXcvr_
warning: no class variable Phy/WirelessPhy::sleep_
Hi
I want to know the same thing that how to work with leach.out file and leach.tr file
I want to plot graph for avg. energy consumption , network lifetime(no.of rounds after first node dies) avg.delivery ratio, load balancing...etc.....
I didn't have any knowledge that how to get this all results. please help me
Hi ,
Please help me to analyse the output generated by leach protocol
i have leach.out and leach.tr file.
this protocol works for 100 nodes.
I want to simulate for 200 nodes ,300 nodes etc. what should I do?
again want to measure network lifetime(no of.rounds). avg. delay etc.
Please its very urgent
Anybody can help me?
Thanks
when I'm running my tcl script I'm getting the following error now may you please help me with the advise of how to so it our .
Thanks for co-operation with me.
Code:
meloh-thabiso-setha@ubuntu:~/ns-allinone-2.34/ns-2.34/EECED$ ns test.tcl
num_nodes is set 20
INITIALIZE THE LIST xListHead
invalid command name "Agent/EECED"
while executing
"Agent/EECED create _o395 0"
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new Agent/EECED $i"
("for" body line 2)
invoked from within
"for { set i 0 } { $i < $val(nn) } { incr i } {
set EECED_($i) [new Agent/EECED $i]
$ns_ attach-agent $node_($i) $EECED_($i)
$EECED_($i) in..."
(file "test.tcl" line 125)
meloh-thabiso-setha@ubuntu:~/ns-allinone-2.34/ns-2.34/EECED$
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.