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.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
you told to add 'hardy' and post#134 says to add 'maverick' but in that places already i have precise
and also i am not seeing any lines in sources.list like
deb http://76.73.4.58/ubuntu/ ...
deb http://76.73.4.58/ubuntu/ ...
I m not getting exactly what to add and where to add
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
# 871 .
No old Ubuntu compilers will work on a contemporary Ubuntu.
So : No `hardy´ (or `maverick´) can be added.
! Do not use old instructions when you have Ubuntu 12.04.
hi i used pegesis patch, upon executing test in ns-2.34 directory i am getting error in pegasis.err . but in the following post knudfl mentioned to see err and output in mit/leach_sims/test_simulations/leach/,
mit/leach_sims/test_simulations/leach_2, but there are more files.there is one file leach.err-save in that i am seeing following
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!, but upon executing ./test , there is no changes in this file.
Pls tell me exactly where to see output and error in pegasis patched ns-2.34. Are pegasis.err pegasis.out right to see?
Quote:
Originally Posted by knudfl
# 471 : Well, you could 1) read the above thread.
2) Have a look in the mit/ folder.
3) Or use the find command : a) $ cd ns-allinone-2.34/
b) $ find ns-2.34/ -name "leach.err"
→ → ./mit/leach_sims/leach.err
b1) $ find ns-2.34/ -name "leach.out"
→ → ./mit/leach_sims/leach.out
If you are using the pegasis patch / files, then leach.err + leach.out
can be found in : mit/leach_sims/test_simulations/leach/,
mit/leach_sims/test_simulations/leach_2/
i am getting err in pegasis.err, since more than 10 days i stuck in this.
invalid command name "Resource/Energy"
i am using ubuntu 12.04 and ns-2.34,the following quote suggested to have gcc-4.1.2
is it possible me to install gcc 4.1.2 ?
is it mandatory to get rid of this err. or is there anyother way? almost i read all threads in thread.
Quote:
Originally Posted by knudfl
Post # 628, @rajamanjulasetty : Welcome to LQ.
That's a failed build. Better use gcc/g++ version 4.1.2 .
Already i have alg=pegasis only, i am seeing pegasis.err pegasis.out in mit/leach_sims. but there is no pegasis.alive, pegasis.alive.txt, pegasis.data, pegasis.data.txt,pegasis.energy, pegasis.energy.txt
my leach_test file
Quote:
#!/bin/bash
# This file runs a generic LEACH protocol simulation.
#This is the algorithm that we are going to run. Type leach, leach-c, stat-clus or pegasis
alg=pegasis
#dirname, filename =
# The directory and filename that we want our output to be written.
dirname="mit/leach_sims"
filename=$alg
#Topology
# This file is the scenario that we are going to
# This file can be editted manually if you are very careful to create
# a predefined topology. To generate a random topology go to the
# ./mit/uAMPS/sims directory and run 'ns genscen'.
topology_file="mit/uAMPS/sims/100nodes_random.txt"
Hi pon
I wonder, did you find any solution to the pegasis problem your facing? My pegasis.out generates incorrect output as the energy stays the same yet the data remains 0 and nodes stays 100.
Thanks!
Quote:
Originally Posted by pon
@ #874 Mr.knudfl,
Already i have alg=pegasis only, i am seeing pegasis.err pegasis.out in mit/leach_sims. but there is no pegasis.alive, pegasis.alive.txt, pegasis.data, pegasis.data.txt,pegasis.energy, pegasis.energy.txt
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Post #879, @NAYEFALDAUIS : Welcome to LQ.
* mit/rca/ns-ranode.tcl, mit/uAMPS/extras.tcl, mit/uAMPS/ns-bsapp.tcl
.. are configuration files for running a leach simulation.
Like all files.tcl, they are text files, easy readable.
Hello every body
I have installed ns2.34 in ubuntu 14.04 and then i added leach patch into ns2.34.But when i run command ./leach_test,the generated leach.out and leach.tr simulation is only for 1.09 secs, whereas in ./leach_test file simulation time is set to 3600 secs.
Please help me asap.
thank you.
* mit/rca/ns-ranode.tcl, mit/uAMPS/extras.tcl, mit/uAMPS/ns-bsapp.tcl
.. are configuration files for running a leach simulation.
Like all files.tcl, they are text files, easy readable.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
← Ref. post #881 .
`leach_test' →
Line 25 : # stop is the time to stop the simulation if it is still running
Line 26 : stop=3600
( The latest update :
leach+pegasis-ns234-files-2.tar.gz by @exidus : stop=50 ).
As you can read in line 25 : 3600 (or 50) is just the maximum time.
* The files are ancient.
./test, ./leach_test may have run for a longer time 15 years ago.
Different version of ns2. Slower computers.
With ns-2.34 and a modern computer, and with default parameters :
It's 1 .. 2 seconds.
Hello sir
I added leach+pegasis patch into ns2.34.firstly everything was going correct but soon i observed that in my trace file leach.tr number of received packets are double or even more than the number of packets sent.
Please tell me why this is happening.
thank you
Location: jl. bogor 1 no 91, malang, jawa timur, indonesia
Distribution: any linux
Posts: 81
Rep:
Quote:
Originally Posted by deepa_2111
@ forco,
eq_energy means that all nodes are allotted the same amount of energy (init_energy). I think the reason why your code is not printing values could be that all nodes are trying to transmit at the same time, leading to collisions and thereby huge energy expenditure. How many nodes do you have in the network ? If you have 100, max energy can only be 200.
Also, note that increasing no. of nodes to beyond 300 causes the LEACH code to stop working/run improperly.
i still confuse with eq_energy, u mean if i have 101node and i need all node get same amount of energy, so i must input eq_energy = 101?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.