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 guess you are right, but the comsumption level will depend on the total time of simulation. The test file probably executes the transmission events until almost the depletion of the network.
guys it seems leach protocol dont work well on ns2.34
there is much differences in results and its hard to setup completly.
I suggest to try leach on ns2.1b or ns2.27.
I have solved all your errors above. but the final result is not satsifying...
now Im trying to install earlier versions of ns.
What differences do you mean. You have successfully installed an older version?
What results did you get? Thanks
I setup ns2.34 on ubuntu10.04 for my term project and trying to run leach.
but I encountered these mistakes, Would you please someone there help me with this.
leach.tcl error:
can't read "opt(num_clusters)": no such element in array
while executing
"expr 1.5*$opt(num_clusters)"
invoked from within
"expr int([expr 1.5*$opt(num_clusters)])+1"
invoked from within
"set opt(spreading) [expr int([expr 1.5*$opt(num_clusters)])+1]"
(file "leach.tcl" line 12)
leach-c.tcl error :
can't read "env(uAMPS_LIBRARY)": no such variable
while executing
"source $env(uAMPS_LIBRARY)/ns-leach.tcl"
(file "leach-c.tcl" line 7)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post # 171, @skimence : Please edit posts #170 #171 to use code tags http://www.linuxquestions.org/questi....php?do=bbcode
I.e. write [/code] at text end, and [code] at code text start.
Or use the # button in the Advanced Editor : Edit >> Go Advanced.
Where did you get the `/sener/ - word ? Not found in "leach-setup.sh".
Suggest : Start from scratch using /home/<your-name>/ns-allinone-2.34/.
And then use this setup script : leach-HOME-setup234.sh.txt http://www.linuxquestions.org/questi...6/#post4494091
Other issues : ns-allinone-2.34/ns-2.34/trace/cmu-trace.h
are also described in that thread.
hi
i am working on leach simulation in ubuntu 10.10 and i followed your link "install leach on ns2.34" and
when i typed $make i got the following error
make:g++-4.3:command not found
make:***[tools/random.0]error 127
plz help me in finding the solution as soon as possible.
moin@moin-Inspiron-N5010:~$ bash leach-setup.sh
tar (child): ns-234-leach.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
/home/moin/ns-allinone-2.34/ns-2.34/leach-setup.sh: line 3: cd: ns-234-leach/: No such file or directory
cp: cannot stat `mit': No such file or directory
cp: cannot stat `apps/app.*': No such file or directory
cp: cannot stat `mac/channel.cc': No such file or directory
cp: cannot stat `mac/ll.h': No such file or directory
cp: cannot stat `mac/wireless-phy.*': No such file or directory
cp: cannot stat `mac/phy.*': No such file or directory
cp: cannot stat `mac/mac.cc': No such file or directory
cp: cannot stat `mac/mac-sensor*': No such file or directory
cp: cannot stat `trace/cmu-trace.*': No such file or directory
cp: cannot stat `common/packet.*': No such file or directory
cp: cannot stat `common/mobilenode.cc': No such file or directory
cp: cannot stat `tcl/mobility/leach-c.tcl': No such file or directory
cp: cannot stat `tcl/mobility/leach.tcl': No such file or directory
cp: cannot stat `tcl/mobility/mte.tcl': No such file or directory
cp: cannot stat `tcl/mobility/stat-clus.tcl': No such file or directory
cp: cannot stat `tcl/ex/wireless.tcl': No such file or directory
cp: cannot stat `test': No such file or directory
cp: cannot stat `leach_test': No such file or directory
cp: cannot stat `Makefile': No such file or directory
cp: cannot stat `Makefile.in': No such file or directory
I install ns-2.27 on Ubuntu 9.10. and i install leach based on this instructions on this posts ,
but now my problem with the results of energy consumption it is greater than the initial energy
for example if the initial energy of node is 5 J the final results of energy consumption of the same node is 11 J!!!
from where it gain the rest energy ? is it right ?
please if any one have any information please tell me ASAP.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 178 @CHIDAMBARGURAV : Welcome to LQ.
Quote:
Quote post #172
Suggest : /home/<your-name>/ns-allinone-2.34/.
And then use this setup script : leach-HOME-setup234.sh.txt http://www.linuxquestions.org/questi...6/#post4494091
Other issues : ns-allinone-2.34/ns-2.34/trace/cmu-trace.h
are also described in that thread.
hi after make in leach protocol i got this error
moin@moin-Inspiron-N5010:~/ns-allinone-2.34/ns-2.34$ make
g++-4.3 -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -DMIT_uAMPS -I. -I. -I/home/moin/ns-allinone-2.34/tclcl-1.19 -I/home/moin/ns-allinone-2.34/otcl -I/home/moin/ns-allinone-2.34/include -I/home/moin/ns-allinone-2.34/include -I/home/moin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -I./mit/rca -I./mit/uAMPS -o trace/cmu-trace.o trace/cmu-trace.cc
trace/cmu-trace.cc: In member function ‘void CMUTrace::format(Packet*, const char*)’:
trace/cmu-trace.cc:1327: error: ‘format_rca’ was not declared in this scope
trace/cmu-trace.cc: At global scope:
trace/cmu-trace.cc:1523: error: no ‘void CMUTrace::format_rca(Packet*, int)’ member function declared in class ‘CMUTrace’
make: *** [trace/cmu-trace.o] Error 1
plz help me out soon
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.