LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   antnet algorithm execution problem (https://www.linuxquestions.org/questions/linux-wireless-networking-41/antnet-algorithm-execution-problem-4175527454/)

mustf 12-05-2014 01:52 PM

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)

knudfl 12-06-2014 09:59 AM

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'.

-

mustf 12-11-2014 06:27 AM

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)

knudfl 12-11-2014 09:34 AM

Please attach drop-tail.cc

* See post #2.

mustf 12-12-2014 06:08 AM

1 Attachment(s)
this is the drop-tail.cc

knudfl 12-12-2014 10:56 AM

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.

-


All times are GMT -5. The time now is 06:28 AM.