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.
I suppose that ns-2.34 is installed with the compiler gcc-4.3. The home directory of ns-2.34 is "/opt/ns-allinone-2.34" 1- download the package "ns-234-leach.tar.gz" into the directory "/opt/ns-allinone-2.34/ns-2.34". https://docs.google.com/uc?id=0BzLWx...CNWG1NQK&hl=en 2- download the bash file "leach-setup.sh" into the directory "/opt/ns-allinone-2.34/ns-2.34". https://docs.google.com/uc?id=0BzLWx...CJSU5ZYG&hl=en 3- If the home directory of your "ns-2.34" is other than "/opt/...", then you need to find "/opt/ns-allinone-2.34" and replace with "yourpath/ns-allinone-2.34" for the file "leach-setup.sh". 4- move to the directory "/opt/ns-allinone-2.34/ns-2.34" and patch the file "leach-setup.sh" wsn@ubuntu:~$ cd /opt/ns-allinone-2.34/ns-2.34/ wsn@ubuntu:/opt/ns-allinone-2.34/ns-2.34$ bash leach-setup.sh 5- If the home directory of your "ns-2.34...
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 ...
Even numbers could be ugly!!!! I suddenly find number systems and C to be greatly interesting :) :) Recently going through the net I found a question... Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ... shows the first 11 ugly numbers. By convention, 1 is included. We need to find 1500'th ugly number. ---------------------------------------------Best solution according to me-------------------------------------------------- if x is ugly, then so are 2x, 3x and 5x. So we can use a min-heap. Start with 1 in the heap. Now if we do the following in a loop: x = Heap.PopCurrentMin(); Heap.Insert(2x); Heap.Insert(3x); Heap.Insert(5x) I believe this will work. Not sure what the time complexity will be, but my guess is that this is reasonably efficient. :) If any one finds a better solution....Please do post!!!!
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.