我尝试按照此链接中的步骤在ns2版本2.35中安装leach协议: http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
完成链接中的所有步骤后,我尝试执行leach_test,但它在leach.err文件中显示了一些错误:
invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.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 /Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/mit/rca/resources/ns-energy-resource.tcl"
(file "mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig mit/uAMPS/sims/uamps.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 mit/uAMPS/sims/uamps.tcl"
(file "/Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/tcl/mobility/leach.tcl" line 19)
invoked from within
"source.orig /Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/tcl/mobility/leach.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 /Users/houcine/Documents/ns2/ns-allinone-2.35/ns-2.35/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
我已就该问题的解决方案进行了大量研究,但我没有找到任何结果。
有关此问题的任何帮助吗?
非常感谢。
系统:MAC OS X 10.11 El Capitain
NS 2版本:ns 2.35
注意:MAC OSX中的安装几乎与Ubuntu上的安装相同。唯一的变化是家庭路径。
答案 0 :(得分:0)
重新http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
以上" pradeepkumar文件"在这里讨论,发布#11(和#7后)
......一个可用的awk脚本附加到#9。
答案 1 :(得分:0)
我想分享我的经验,安装ns-2.35并在Ubuntu 14.04中使用。
我试图首先安装ns-2.35,然后在Ubuntu 14.04中进行浏览。完成所有配置后,我尝试运行leach_test
,但显示错误。当我看到this教程时,我知道错误的一步。在本教程中,它显示在ns-2.35和leach完成配置之后运行./install
。
因此,我在终端./install
中再次尝试~/ns-allinone-2.35
。
当我在ns-2.35中再次尝试leach_test
时,模拟效果很好。