2015-04-08 42 views
-2

谁能告诉我如何在ns2中实现antnet?我在使用NS2的antnet路由算法中遇到这种类型的错误。有可能实现吗? 请帮我解决。如何解决这类问题?如何在使用ns2的adhoc网络中实现antnet

[email protected]:~$ cd /home/admin123/Desktop/NS/ns-allinone-2.35/ns-2.35/tcl/ex 
[email protected]:~/Desktop/NS/ns-allinone-2.35/ns-2.35/tcl/ex$ ns antnet.tcl 
num_nodes is set 12 

    (_o3 cmd line 1) 
    invoked from within 
"_o3 cmd node-config-adhocRouting AODV -llType LL -macType Mac/802_11 -ifqType Queue/DropTail/PriQueue -ifqLen 1000 -antType Antenna/OmniAntenna -propT..." 
    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 "_o3" line 2) 
    (SplitObject unknown line 2) 
    invoked from within 
"$ns node-config-adhocRouting AODV\ 
         -llType $val(ll) \ 
         -macType $val(mac) \ 
         -if..." 
    (file "antnet.tcl" line 33) 
[email protected]:~/Desktop/NS/ns-allinone-2.35/ns-2.35/tcl/ex$ 
+1

![标签:TCL] = [标签:外壳]但除此之外,我真不”不知道你在问什么。 –

回答

0

看起来您使用的可执行文件'ns'没有AntNet。

HOWTO antnet,NS-2.35:

焦油xvf命令NS-ALLINONE-2.35_gcc482.tar.gz

https://drive.google.com/file/d/0B7S255p3kFXNSGJCZ2YzUGJDVk0/view?usp=sharing

CD NS-ALLINONE-2.35/

补丁-p0 < antnet_ns235.patch

https://drive.google.com/file/d/0B7S255p3kFXNY29xLTUwd213ZUE/view?usp=sharing

./INSTALL

CD NS-2.35/& &须藤使安装

CP NS NS-antnet & &须藤CP NS-antnet在/ usr/local/bin目录/

模拟:NS- antnet antnet.tcl

注意:“AntNet”不能很好地工作。该建议是使用 “anthocnet

→见http://www.linuxquestions.org/questions/showthread.php?p=5345798#post5345798

-