ns: source Routing.tcl: can't read "n()": no such element in array while executing "$ns at 4 "$n() label CH_1"" (file "Routing.tcl" line 1) invoked from within "source.orig Routing.tcl" ("uplevel" body line 1) invoked from within "uplevel source.orig [list $fileName]" invoked from within "if [$instance_ is_http_url $fileName] { set buffer [$instance_ read_url $fileName] uplevel eval $buffer } else { uplevel source.orig [list $fileName] ..." (procedure "source" line 8) invoked from within "source Routing.tcl"
can u plz rectify this problem i had declared nodes as dynamicaly that's why i didn't declare nodes particularly for ch-1, so can u plz rectify this problem by today eveng plz.
Download ns-allinone-2.34 and Install I downloaded from https://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/ns-allinone-2.34.tar.gz/download Cut the downloaded file from the Downloads folder and paste it to your desired folder for installation $ tar -xzvf ns-allinone-2.32.tar.gz $ cd ns-allinone-2.32 (before install ns-2 you will need the packages that are shown below ) $ sudo apt-get install build-essential autoconf automake libxmu-dev $ sudo apt-get install libx11-dev libxmu-dev libxmu-headers libxt-dev libtool $ sudo apt-get install dpkg-dev g++ libc6-dev make $ sudo apt-get install tcl8.4 tk8.4 $ sudo apt-get install build-essential These packages might be dependent on each other so I remember installing the packages in reverse order. Install the development files for X Windows plus the g++ compiler: sudo apt-get install xorg-dev g++ xgraph Fix the error in the linking of otcl by editing line 6304 of otcl-1.13/configure so that it reads ...
This was given in the written test for Goldman Sach and I have solved this question in O(n) time complexity, as per my knowledge. If any one could do better or would require my code. Contact me at pushpita1988@gmail.com . I cannot attach the c code here.
Comments
while executing
"$ns at 4 "$n() label CH_1""
(file "Routing.tcl" line 1)
invoked from within
"source.orig Routing.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig [list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig [list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source Routing.tcl"
can u plz rectify this problem i had declared nodes as dynamicaly that's why i didn't declare nodes particularly for ch-1, so can u plz rectify this problem by today eveng plz.