LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 12-05-2014, 01:52 PM   #1
mustf
LQ Newbie
 
Registered: Nov 2014
Location: Malaysia
Posts: 12

Rep: Reputation: Disabled
Question antnet algorithm execution problem


hi i m doing a project on ant routing algorithm in ns2.34,i had made changes to almost every file.
but when i tried to run the TCL the error i get is like this

invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o386 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/Antnet $i"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $sz} {incr i} {
set nn($i) [ new Agent/Antnet $i]
}"
(file "antnet.tcl" line 45)
 
Old 12-06-2014, 09:59 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
invalid command name "Agent/Antnet"
You are using the wrong executable 'ns',
.. or you have a failed build.

Making sure that the right 'ns' is used :
$ cd ns-allinone-2.34/ns-2.34/
$ cp ns ns-antnet
$ sudo cp ns-antnet /usr/local/bin/
... Then you can do all simulations with 'ns-antnet' :
$ ns-antnet antnet.tcl


I have a problem with my file drop-tail.cc for Antnet :
Could you please attach a copy of your file, as drop-tail.cc.txt ?
( All text must have suffix .txt to be attached.)
Attachments : The paper clip tool in the 'Advanced Editor'.

-

Last edited by knudfl; 12-06-2014 at 10:00 AM.
 
Old 12-11-2014, 06:27 AM   #3
mustf
LQ Newbie
 
Registered: Nov 2014
Location: Malaysia
Posts: 12

Original Poster
Rep: Reputation: Disabled
brother knudfl i did this steps

$ cd ns-allinone-2.34/ns-2.34/
$ cp ns ns-antnet
$ sudo cp ns-antnet /usr/local/bin/
... Then you can do all simulations with 'ns-antnet' :
$ ns-antnet antnet.tcl

but i also got the same error

invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o386 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/Antnet $i"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $sz} {incr i} {
set nn($i) [ new Agent/Antnet $i]
}"
(file "antnet.tcl" line 45)
 
Old 12-11-2014, 09:34 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Please attach drop-tail.cc

* See post #2.
 
Old 12-12-2014, 06:08 AM   #5
mustf
LQ Newbie
 
Registered: Nov 2014
Location: Malaysia
Posts: 12

Original Poster
Rep: Reputation: Disabled
this is the drop-tail.cc
Attached Files
File Type: txt drop-tail.txt (4.5 KB, 42 views)
 
Old 12-12-2014, 10:56 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Ref. https://github.com/richardsonlima/antnet

$ tar xvf ns-allinone-2.34.tar.gz
$ cd ns-allinone-2.34/
$ patch -p0 < otcl_ns234_gcc-4.4.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ patch -p0 < antnet_ns234.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ export CC=gcc-4.4 CXX=g++-4.4 && ./install
$ cd ns-2.34/
$ cp ns ns-antnet
$ sudo cp ns-antnet /usr/local/bin/
$ cd antnet/scripts/
$ ns-antnet antnet.tcl : Seems OK.

-
 
  


Reply

Tags
antnet, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with antnet instalation on ns-allinone-2.33 adventarinatal Linux - Networking 1 08-17-2014 05:19 PM
error while running tcl file on Antnet algorithm. R.Mosheca Linux - Software 0 07-31-2014 09:44 AM
problem in running leach algorithm in ns2 simulator on ubunto 12.04 sweetgrl07 Ubuntu 2 01-08-2014 03:26 AM
problem with implementing antnet in ns 2.33 Merin Varghese Linux - Newbie 0 02-10-2012 04:18 AM
antnet algorithm execution problem savita1811 Linux - Wireless Networking 13 06-11-2011 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration