LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2017, 12:21 PM   #1
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Rep: Reputation: Disabled
Question invalid command name "Agent/Antnet"


invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o36 _o10"
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 $n0"
invoked from within
"set nn0 [new Agent/Antnet $n0]"
(file "simpleant.tcl" line 27)
 
Old 01-17-2017, 12:23 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,810

Rep: Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974
Quote:
Originally Posted by keerat View Post
invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o36 _o10"
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 $n0"
invoked from within
"set nn0 [new Agent/Antnet $n0]"
(file "simpleant.tcl" line 27)
Read the "Question Guidelines" link in my posting signature.

We can't (and won't) guess as to what you're talking about here. All you posted is an error dump, and told us NOTHING about your system, hardware, what you're trying to do, with what software, and when you get that message.

Post details and we can try to help.
 
Old 01-17-2017, 10:01 PM   #3
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Arrow invalid command name agent/antnet

hi,i am working in ns2.35 and ubuntu version 16.04

i am implementing antnet colony algorithm. i have patched antnet and ./configure and make command run successfully. but when i am trying to run tcl file simpleant.tcl it shows this error. plz help me

invalid command name "Agent/Antnet"
while executing
"Agent/Antnet create _o36 _o10"
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 $n0"
invoked from within
"set nn0 [new Agent/Antnet $n0]"
(file "simpleant.tcl" line 27)

Last edited by keerat; 01-17-2017 at 10:05 PM. Reason: wrong type nvalid instead of invalid
 
Old 01-18-2017, 06:36 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,316
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
You've done little more here by way of description.

Firstly, any code or outputs you post should be within [code][/code] tags to make it more readable.

Any source scripts which you are referencing or have created, you should post to enhance your question.

Those errors by the way cite line numbers in tcl scripts. Are you looking at those lines to see what they say? You should post the tcl scripts in question where the errors are being found.
 
Old 01-18-2017, 10:57 AM   #5
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Unhappy i am getting error on runnig this tcl script

# tcl script for AntNet algorithm on an arbitrary topology of 12 nodes

#number of nodes
set sz 2

#Create event Schedular
set ns [new Simulator]

#Open the Trace file
set tf [open simple.out w]
$ns trace-all $tf

# nam trace initialization
#set namtrace [open sooa-out.nam w] ; # for wireless traces
#$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
set nf [open simple.nam w]
$ns namtrace-all $nf

#Create 12 nodes
set n0 [$ns node]
set n1 [$ns node]
#Create links between the nodes
$ns duplex-link $n0 $n1 512Mb 155ms DropTail

#Create Antnet agents
set nn0 [new Agent/Antnet $n0]
set nn1 [new Agent/Antnet $n1]

#Attach each node with Antnet agent
$ns attach-agent $n0 $nn0
$ns attach-agent $n1 $nn1

#Create connection between the nodes
$ns connect $nn0 $nn1
#Add neighbors
$ns at now "$nn0 add-neighbor $n0 $n1"
# Set parameters and start time
$nn0 set num_nodes_ 10
$nn0 set timer_ant_ 0.03
$nn0 set r_factor_ 0.001
$ns at 1.0 "$nn0 start"
$nn1 set num_nodes_ 10
$nn1 set timer_ant_ 0.03
$nn1 set r_factor_ 0.001
$ns at 1.0 "$nn1 start"
#Set stop time for AntNet algorithm
$ns at 10.8 "$nn0 stop"
$ns at 10.8 "$nn1 stop"

#Print routing tables generated by AntNet
$ns at 10.9 "$nn0 print_rtable"
$ns at 10.9 "$nn1 print_rtable"
proc Finish {} {
global ns tf nf
$ns flush-trace
close $nf
#Close the Trace file
close $tf
exit 0
}
$ns at 14.0 "Finish"
# Start the simulator
$ns run
 
Old 01-18-2017, 11:31 AM   #6
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Dude.
1) As already mentioned: CODE TAGS
2) I doubt many people here are wanting to count out code lines here either.
3) You're not doing yourself any favors here by showing little to no effort
 
1 members found this post helpful.
Old 01-19-2017, 07:45 AM   #7
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Exclamation error:- no-slot{} default handler

i have solved my first error of invalid command agent/antnet. my tcl file is running but now when i am running another file ant1.tcl i am getting another error.

kiran@kiran-HP-Pavilion-dv6-Notebook-PC:~/ns-allinone-2.35/ns-2.35$ ns235-antnet new1.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o21: no target for slot -1
_o21 type: Classifier/Hash/Dest
content dump:
classifier _o21
0 offset
0 shift
1073741823 mask
1 slots
slot 3: _o401 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------
 
Old 01-19-2017, 01:47 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,810

Rep: Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974
Quote:
Originally Posted by keerat View Post
i have solved my first error of invalid command agent/antnet. my tcl file is running but now when i am running another file ant1.tcl i am getting another error.

kiran@kiran-HP-Pavilion-dv6-Notebook-PC:~/ns-allinone-2.35/ns-2.35$ ns235-antnet new1.tcl
--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
_o21: no target for slot -1
_o21 type: Classifier/Hash/Dest
content dump:
classifier _o21
0 offset
0 shift
1073741823 mask
1 slots
slot 3: _o401 (Classifier/Port)
-1 default
---------- Finished standard no-slot{} default handler ----------
Thank you for AGAIN ignoring what you're told. We've asked you several times now to use CODE tags, and post a follow up/clear question. You have done neither. Unless you're going to participate in the conversation, answer questions when asked, and use CODE tags, there's not much point in posting.
 
Old 01-23-2017, 07:58 AM   #9
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Question which code tags am missing

sir, m not getting u which code tags are u talking about? i am implementing antnet colony optimization and i have run several tcl files. but in some tcl file i am getting error. i have posted this error here. can u provide one example. what kind of tags am missing.
 
Old 01-23-2017, 08:07 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
code tags mean: use [code]here comes your code[/code] to keep formatting and make your post readable.
 
Old 01-23-2017, 08:23 AM   #11
keerat
LQ Newbie
 
Registered: Jan 2017
Posts: 12

Original Poster
Rep: Reputation: Disabled
Question like this ??

[]--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- [/]
[] _o27: no target for slot -1 [/]
[] _o27 type: Classifier/Hash/Dest [/]
[] content dump: [/]
[] classifier _o27 [/]
[] 0 offset [/]
[] 0 shift [/]
[] 1073741823 mask [/]
[] 1 slots [/]
[] slot 5: _o403 (Classifier/Port) [/]
[] -1 default [/]
[] ---------- Finished standard no-slot{} default handler ---------- /code]
 
Old 01-23-2017, 08:28 AM   #12
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,490

Rep: Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532Reputation: 5532
no, insert [code] before your text and [/code] after that. Without modification, only once.
please try to edit to last post to see the result
 
Old 01-23-2017, 08:28 AM   #13
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,316
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
Quote:
Originally Posted by keerat View Post
[]--- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- [/]
[] _o27: no target for slot -1 [/]
[] _o27 type: Classifier/Hash/Dest [/]
[] content dump: [/]
[] classifier _o27 [/]
[] 0 offset [/]
[] 0 shift [/]
[] 1073741823 mask [/]
[] 1 slots [/]
[] slot 5: _o403 (Classifier/Port) [/]
[] -1 default [/]
[] ---------- Finished standard no-slot{} default handler ---------- /code]
Recommend you use the Advanced Edit mode.

There is a # symbol in the tools for that mode. Select your code, and then click the # symbol in the menu to convert the selection to be tagged as code.
 
Old 01-23-2017, 08:30 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,810

Rep: Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974Reputation: 6974
Quote:
Originally Posted by keerat View Post
sir, m not getting u which code tags are u talking about? i am implementing antnet colony optimization and i have run several tcl files. but in some tcl file i am getting error. i have posted this error here. can u provide one example. what kind of tags am missing.
Again, read the LQ Rules; pay attention to the parts about text-speak and NOT using it. The CODE tags are, as you post, available by selecting a block of text with your mouse, and clicking the "#" just above the box you're typing in.
 
Old 01-23-2017, 08:35 AM   #15
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,316
Blog Entries: 13

Rep: Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372Reputation: 4372
Note that what you really need to do is post the script: ns235-antnet new1.tcl

You've posted the error, however this is only part of the information.
 
  


Reply

Tags
antnet, ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
invalid command name "Agent/Antnet" while executing avinash20 Linux - Newbie 1 09-12-2012 07:46 AM
invalid command name "Agent/Antnet" while executing avinash20 Linux - Newbie 0 09-11-2012 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:23 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