[SOLVED] erorr in leach.err (invalid command name "Resource/Energy)
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.
Originally Posted by knudfl*
Go to ns-2.34/, and edit the paths to your name :
$ grep -Rn knudfl *-[/QUOTE
directory of my ns in ubuntu is /etc/opt/
go to /etc/opt/ns-allinone-2.34/ns-2.34 ?and edit path?
or go to /home/saho/9tmp/ns-allinone-2.34/ns-2.34?
... Then you can run the usual "export ***** && ./test"
... in this ordered copy of the usual files.
( Or you can copy your own files / folders to the new odd locations in your current ns-allinone-2.34/.)
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_
mac/chanel.cc: 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_
warning: no class variable Phy/WirelessPhy::ss_
warning: no class variable Phy/WirelessPhy::dist_
Loading connection pattern...
Loading scenario file...
Starting Simulation...
mac/channel.cc: sendUp - Calc highestAntennaZ_ and distCST_
mac/channel.cc: highestAntennaZ_ = 1.5, distCST_ = 89.8
SORTING LISTS ...DONE!
NS EXITING...
my leach.err
Code:
mac/chanel.cc: INITIALIZE THE LIST xListHead
SORTING LISTS ...DONE!
Partial of my leach.out
Code:
Creating sensor nodes... - uAMPS.tcl
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 (100 == BS) - uAMPS.tcl
*** NOTE: no connection pattern specified. - wireless.tcl
Loading scenario file... - wireless.tcl
Node 0: (67.837825076579037,0.95365322239401429)
Node 1: (5.6106347616811441,59.567387057266842)
Node 2: (12.847064953691822,12.473798362758847)
Node 3: (51.243302110230225,83.015594297561606)
Node 4: (76.816643763713842,16.092541495381173)
Node 5: (88.698179828328165,94.414985316998795)
Node 6: (49.698749394015756,71.163323927281112)
Node 7: (18.752563846648002,37.040607369058115)
Node 8: (66.948251550527402,58.999779009725792)
Node 9: (84.093159662603014,13.760461338684177)
Node 10: (53.398475681151481,34.751569263055721)
Node 11: (35.43723776724061,81.252306830721125)
Node 12: (94.39568416885831,64.282461146024275)
Node 13: (75.900641584722621,81.116376016808843)
Node 14: (94.025061975244924,22.741639904091898)
Node 15: (47.483933645991577,53.024388501897633)
Node 16: (19.265831783072013,19.761381819733131)
Node 17: (52.722785367035677,65.422820470027077)
Node 18: (1.9091479489156733,83.866523198721239)
Node 19: (37.249374872655316,15.680148832351037)
Node 20: (77.114107076597449,63.760125946141841)
..
..
..
THRESH = 0.01 - ns-leach.tcl
31: ******************************************* - ns-leach.tcl
....
69 rcvd ADV_CH from 95 at 0.00037192340076594145 - ns-leach.tcl
27 rcvd ADV_CH from 95 at 0.00037192601976843799 - ns-leach.tcl
31 rcvd ADV_CH from 95 at 0.00037192860920644922 - ns-leach.tcl
66 rcvd ADV_CH from 95 at 0.00037193607648821665 - ns-leach.tcl
18 rcvd ADV_CH from 95 at 0.00037196231845486636 - ns-leach.tcl
54 rcvd ADV_CH from 95 at 0.00037196413578480914 - ns-leach.tcl
47 rcvd ADV_CH from 95 at 0.00037197426923008762 - ns-leach.tcl
0: Current cluster-head is 95, code is 1, dist is 32.715918042681771 - ns-leach.tcl
1: Current cluster-head is 95, code is 1, dist is 67.063908175559192 - ns-leach.tcl
..
..
..
19 sending data {19 , 1.8193381172329781} to 95 at 1.8193381172329781 (dist = 35.169893489600447) - ns-leach.tcl
CH 95 received data (19 , 1.8193381172329781) from 19 at 1.8275802344659562 - ns-leach.tcl
80 sending data {80 , 1.8277381374720205} to 95 at 1.8277381374720205 (dist = 41.241606187822342) - ns-leach.tcl
CH 95 received data (80 , 1.8277381374720205) from 80 at 1.835980274944041 - ns-leach.tcl
CH 95 must now perform comp and xmit to BS. - ns-leach.tcl
compute_energy = 0.00198 - ns-leach.tcl
Node 95 sending {{95 , 1.835980274944041}} to BS at time 1.8437453110472473 - ns-leach.tcl
BS Received data 95 , 1.835980274944041 from 95 at time 1.8519877857415654 - mit/uAMPS/ns-bsapp.tcl
...
..
..
79 sending data {79 , 4.3897381425501125} to 95 at 4.3897381425501125 (dist = 42.765034007937345) - ns-leach.tcl
CH 95 received data (79 , 4.3897381425501125) from 79 at 4.3979802851002257 - ns-leach.tcl
82 sending data {82 , 4.3981382031124383} to 95 at 4.3981382031124383 (dist = 60.933731777113294) - ns-leach.tcl
CH 95 received data (82 , 4.3981382031124383) from 82 at 4.4063804062248773 - ns-leach.tcl
74 sending data {74 , 4.4065381070079104} to 95 at 4.4065381070079104 (dist = 32.10237340306093) - ns-leach.tcl
CH 95 received data (74 , 4.4065381070079104) from 74 at 4.4147802140158214 - ns-leach.tcl
64 sending data {64 , 4.4149382131854287} to 95 at 4.4149382131854287 (dist = 63.955628932182599) - ns-leach.tcl
CH 95 received data (64 , 4.4149382131854287) from 64 at 4.423180426370859 - ns-leach.tcl
32 sending data {32 , 4.4233380717248707} to 95 at 4.4233380717248707 (dist = 21.517461318223035) - ns-leach.tcl
CH 95 received data (32 , 4.4233380717248707) from 32 at 4.4315801434497422 - ns-leach.tcl
33 sending data {33 , 4.4317380897910201} to 95 at 4.4317380897910201 (dist = 26.937306218960448) - ns-leach.tcl
CH 95 received data (33 , 4.4317380897910201) from 33 at 4.4399801795820411 - ns-leach.tcl
19 sending data {19 , 4.4401381172329772} to 95 at 4.4401381172329772 (dist = 35.169893489600447) - ns-leach.tcl
CH 95 received data (19 , 4.4401381172329772) from 19 at 4.4483802344659553 - ns-leach.tcl
80 sending data {80 , 4.4485381374720196} to 95 at 4.4485381374720196 (dist = 41.241606187822342) - ns-leach.tcl
CH 95 received data (80 , 4.4485381374720196) from 80 at 4.4567802749440402 - ns-leach.tcl
CH 95 must now perform comp and xmit to BS. - ns-leach.tcl
compute_energy = 0.00198 - ns-leach.tcl
Node 95 sending {{95 , 4.4567802749440402}} to BS at time 4.4606188410730612 - ns-leach.tcl
BS Received data 95 , 4.4567802749440402 from 95 at time 4.4688613157673798 - mit/uAMPS/ns-bsapp.tcl
This represents data from nodes: 57 9 40 60 53 23 77 78 28 50 35 10 73 36 27 12 96 87 5 15 29 83 90 13 99 2 25 61 41 8 11 30 21 17 56 81 34 68 7 55 76 84 3 22 46 18 88 43 66 72 98 62 14 59 47 75 6 91 71 97 44 16 24 4 58 70 67 51 37 86 38 0 26 69 85 49 92 20 93 63 39 89 45 48 54 65 52 94 42 31 1 79 82 74 64 32 33 19 80 95 - mit/uAMPS/ns-bsapp.tcl
57 sending data {57 , 4.4989381890333568} to 95 at 4.4989381890333568 (dist = 56.710007374425011) - ns-leach.tcl
CH 95 received data (57 , 4.4989381890333568) from 57 at 4.5071803780667148 - ns-leach.tcl
9 sending data {9 , 4.5073380864465848} to 95 at 4.5073380864465848 (dist = 25.933975595504535) - ns-leach.tcl
CH 95 received data (9 , 4.5073380864465848) from 9 at 4.5155801728931699 - ns-leach.tcl
40 sending data {40 , 4.5157382265280051} to 95 at 4.5157382265280051 (dist = 67.958401767457744) - ns-leach.tcl
tcl
..
Data was sent to the base station - ns-leach.tcl
62: Warning!!! No Cluster Head ADVs were heard! - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
Node 62 sending {{62 , 40.001159999999999}} to BS at time 40.002653033213306 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
63: Warning!!! No Cluster Head ADVs were heard! - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
Node 63 sending {{63 , 40.001159999999999}} to BS at time 40.007423170594471 - ns-leach.tcl
Data was sent to the base station - ns-leach.tcl
64: Warning!!! No Cluster Head ADVs were heard! - ns-leach.tcl
Data being sent to the Base Station - ns-leach.tcl
...
...
...
BS Received data 33 , 48.401160000000033 from 33 at time 48.517264731731991 - mit/uAMPS/ns-bsapp.tcl
This represents data from nodes: - mit/uAMPS/ns-bsapp.tcl
BS Received data 85 , 48.401160000000033 from 85 at time 48.525722938115145 - mit/uAMPS/ns-bsapp.tcl
...
...
...
BS Received data 43 , 49.241160000000036 from 43 at time 49.708086719163973 - mit/uAMPS/ns-bsapp.tcl
This represents data from nodes: - mit/uAMPS/ns-bsapp.tcl
At 50: - mit/uAMPS/stats.tcl
Total Energy = 156.00720250752127
Total Data = 4149
Total Alive = 53
Simulation complete. - mit/uAMPS/stats.tcl
Hello Mr., I got same error, but my OS is Ubuntu 14.04 and when I try to install gcc-4.1, I got this
Quote:
mau@mau-Satellite-L745:~$ sudo apt-get install g++-4.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package g++-4.1
E: Couldn't find any package by regex 'g++-4.1'
mau@mau-Satellite-L745:~$ sudo apt-get install gcc-4.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gcc-4.1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.1' has no installation candidate
Thank you Mr.
I use this for my simulation
https://www.linuxquestions.org/questions/linux-software-2/how-to-integrate-the-resource-energy-leach-class-into-ns-2-34-a-870368/page20.html#post4680064
but when I run ./leach_test I got error, so I try to use this thread but I can't download gcc4.1
So I must do :
1. Install ns-2.34
2. In /home/mau/ns-allinone-2.34 :
$ cd ns-2.34/
$ tar xvf ns-234-leach.tar.gz
$ bash leach-setup.sh
$ ./configure
$ make clean
$ export CC=gcc34 CXX=g++34 && make
tar xvf ns-allinone-2.34.tar.gz
cd ns-allinone-2.34/
patch -p0 < ns234_gcc49.patch
patch -p0 < leach+pegasis_ns234.patch
./install
cd ns-2.34/
sudo make install
When using Ubuntu 10.04, skip the patch "ns234_gcc49.patch".
Quote:
I can't download gcc4.1
Please read post #21 : "There is no gcc, g++ version 4.1 for Ubuntu 14.04".
i am getting this error in leach.err file
please help. i tried all the prior posted instructions . but still error is not going
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/home/gecetc/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/gecetc/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.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 /home/gecetc/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "/home/gecetc/ns-allinone-2.35/ns-2.35/tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig /home/gecetc/ns-allinone-2.35/ns-2.35/tcl/mobility/leach.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 /home/gecetc/ns-allinone-2.35/ns-2.35/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
Re #26, @Ashika Naik : Welcome to LQ.
»» invalid command name "Resource/Energy" «« :
Either you are using a wrong copy of the executable 'ns' with no Leach.
→ Please make sure that no *PATH text was added to .bashrc : Not required.
Or you have a failed build.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.