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) |
Quote:
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. |
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) |
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. |
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 |
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 |
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 ---------- |
Quote:
|
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.
|
code tags mean: use [code]here comes your code[/code] to keep formatting and make your post readable.
|
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] |
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 |
Quote:
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. |
Quote:
|
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. |
All times are GMT -5. The time now is 12:23 AM. |