How to fix this error

45 views
Skip to first unread message

Burke Geceyatmaz

unread,
Sep 26, 2023, 9:16:18 AM9/26/23
to Network Simulator 2 (NS2)
ns aodvolr.tcl
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
create lookup failed

    (_o12 cmd line 1)
    invoked from within
"_o12 cmd create _o16"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o12" line 2)
    (SplitObject unknown line 2)
    invoked from within
"_o12 create _o16 "
    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 $channelType_"
    (procedure "_o3" line 44)
    (Simulator node-config line 44)
    invoked from within
"$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $..."
    (file "aodvolr.tcl" line 39)

knudfl

unread,
Sep 26, 2023, 9:30:00 AM9/26/23
to Network Simulator 2 (NS2)
aodvolr.tcl :  Unknown file.  Please upload the file to https://www.google.com/drive/
...... and show a shared link.

knudfl

unread,
Sep 27, 2023, 4:56:32 AM9/27/23
to Network Simulator 2 (NS2)
Line 44 is the ns node-config line ... and what follows. I.e. these lines separated with a  \  is one command.

$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \

The most common error is an invisible <space> after a  \
So please check for one or more <space> after \ in all the ns node-config line, and delete these.

$ns node-config -adhocRouting $val(rp) \<space>
-llType $val(ll) \<space>
-macType $val(mac) \<space>
-ifqType $val(ifq) \<space>
-ifqLen $val(ifqlen) \<space>

Burke Geceyatmaz

unread,
Sep 28, 2023, 11:07:52 AM9/28/23
to Network Simulator 2 (NS2)
https://docs.google.com/document/d/1OrFyViRmQtx4AT7_7dJkBLtPwk-Yw7Ea22598ks62_s/edit

27 Eylül 2023 Çarşamba tarihinde saat 11:56:32 UTC+3 itibarıyla knudfl şunları yazdı:

knudfl

unread,
Sep 28, 2023, 11:52:36 AM9/28/23
to Network Simulator 2 (NS2)
Not a shared link !

Burke Geceyatmaz

unread,
Sep 28, 2023, 4:54:43 PM9/28/23
to ns-u...@googlegroups.com
How to share it ?

--
You received this message because you are subscribed to the Google Groups "Network Simulator 2 (NS2)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-users/36e900e9-bbf5-4eb9-b8f8-76ec534e3e93n%40googlegroups.com.

knudfl

unread,
Sep 28, 2023, 6:22:24 PM9/28/23
to Network Simulator 2 (NS2)
........ Then Google will reply to you with an email : how to share / provide access to the file.

knudfl

unread,
Sep 29, 2023, 7:20:53 AM9/29/23
to Network Simulator 2 (NS2)
Your file : ns is defined as ns_ , not ns.  I.e. edit all ns to ns_

......... Search the error lines
$ cat -n orig__burkege-aodvolsr-1.tcl | grep "\ns\ "
.
  130  set node0 [$ns node]
  131  set node1 [$ns node]
  134  $ns duplex-link $node0 $node1 10Mb 10ms DropTail
  147  $ns at $start_time "$cbr0 start"
  148  $ns at $end_time "$cbr0 stop"
  200  $ns attach-agent $node0 $tcp_agent0
  .
  206  $ns at 0.0 "$node0 set adhocRouting AODV"
  207  $ns at 0.0 "$node1 set adhocRouting AODV"
  211  $ns at 5.0 "switch_to_olsr $node0 $node1"
  216      puts "Switching from AODV to OLSR at [format %.2f $ns now]"
  225  $ns at 100.0 "$ns halt"
  228  $ns run
-----------------------------------------------

To run an OLSR simulation, an ns patched for olsr is required ..... my example executable
$ ns235-olsr-64 burkege-aodvolsr-1.tcl  
num_nodes is set 2
INITIALIZE THE LIST xListHead
INITIALIZE THE LIST xListHead
formal parameter "node_(0)" is an array element
   (creating proc "switch_to_olsr")
   invoked from within
"proc switch_to_olsr {node_(0) node_(1)} {
   global ns_
   puts "Switching from AODV to OLSR at [format %.2f $ns_ now]"

   # Change the routing pr..."
   (file "burkege-aodvolsr-1.tcl" line 214)
---------------
OK until line 214 with the "never seen before" switch from AODV to OLSR
.... Please explain where you got this idea for "switch from AODV to OLSR"

proc switch_to_olsr {node_(0) node_(1)} {
    global ns_
    puts "Switching from AODV to OLSR at [format %.2f $ns_ now]"
   # Change the routing protocol of the nodes to OLSR
   "$node0 set adhocRouting OLSR"
   "$node1 set adhocRouting OLSR"
}

Edited burkege-aodvolsr-1.tcl https://drive.google.com/file/d/1QavJ__Q-7G7okvJjo1ZgW1pDpTuAFBKk/view?usp=drive_link

knudfl

unread,
Sep 30, 2023, 1:33:43 PM9/30/23
to Network Simulator 2 (NS2)
2 x RSU, muti-node-config  olsr and aodv
...... see e.g. 11-aodv+olsr__47-vanet-rsu-19.tcl, 135-aodv+olsr__nn100-vanet-rsu-19.tcl, 1047-vanet-rsu-aodv-olsr19.tcl

Burke Geceyatmaz

unread,
Oct 1, 2023, 4:56:54 AM10/1/23
to Network Simulator 2 (NS2)
 I want to run for ex half of the nodes aodv and the other half of the nodes olsr to reduce for example overhead 

29 Eylül 2023 Cuma tarihinde saat 14:20:53 UTC+3 itibarıyla knudfl şunları yazdı:
Reply all
Reply to author
Forward
0 new messages