LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   problem while executing an .tcl code on ns 2.35 (https://www.linuxquestions.org/questions/linux-software-2/problem-while-executing-an-tcl-code-on-ns-2-35-a-4175502054/)

mezyana 04-17-2014 08:14 AM

problem while executing an .tcl code on ns 2.35
 
Hi all,
I am new to linux environemnt and learning ns2 for my final project.
i'm using ns 2.35 on ubuntu 12.04.
i have a problem while executing an .tcl file it gives me the following errors.
Quote:

num_nodes is set 30warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl


(_o14 cmd line 1)
invoked from within
"_o14 cmd addr"
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 "_o14" line 2)
(SplitObject unknown line 2)
invoked from within
"_o14 addr"
("eval" body line 1)
invoked from within
"eval $node addr $args"
("default" arm line 2)
invoked from within
"switch -exact $routingAgent_ {
DSDV {
set ragent [$self create-dsdv-agent $node]
}
DSR {
$self at 0.0 "$node start-dsr"
}
AODV {
set ragent [$self cre..."
(procedure "_o3" line 14)
(Simulator create-wireless-node line 14)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
("for" body line 2)
invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;
}"

(file "scen30.tcl" line 61)

knudfl 04-17-2014 11:36 AM

Welcome to LQ.

Generic errors from an unknown file.tcl :
The errors you show in post #1 could be caused by a lot of faulty examples.tcl
There may be a solution if you attach "scen30.tcl" as : scen30.tcl.txt .
Attachments : That's the paper clip tool in the 'Advanced Editor'.

-

mezyana 04-17-2014 05:57 PM

1 Attachment(s)
thank you for your answer Mr knudfl

i have attached the .tcl file.

hope that you can help me.

knudfl 04-18-2014 01:15 AM

# 3 : The OLSR simulation file "scen30.tcl" : OK here.

The errors in post #1 : You are probable using a wrong executable 'ns'.

The 'ns' that you have built / will build with OLSR must be copied to e.g. ns-olsr.
And : $ sudo cp ns-olsr /usr/local/bin/
... Then all OLSR simulations will run OK with : $ ns-olsr <olsr-example>.tcl

OLSR info http://www.linuxquestions.org/questions/tags/olsr/
-

P.S. : Where did you get the file.tcl ? A link, please.

-

mezyana 04-22-2014 06:01 AM

hi,

i get it from my instructor, i have fix the problem with changing the routing protocol to AODV.

in my project i have to detect hidden nodes in differents scenario and topologys.

do you have an idea on how can i proceed ?.

thank you.

cordially.

---------- Post added 04-22-14 at 06:01 AM ----------

hi,

i get it from my instructor, i have fix the problem with changing the routing protocol to AODV.

in my project i have to detect hidden nodes in differents scenario and topologys.

do you have an idea on how can i proceed ?.

thank you.

cordially.

knudfl 04-22-2014 06:50 AM

# 5 .

Google : `ns2 detect hidden nodes´
https://www.google.com/webhp?hl=all#...t+hidden+nodes


All times are GMT -5. The time now is 04:26 PM.