我尝试按照以下链接中的步骤在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上的安装非常相似。唯一的变化是主路径。
发布于 2015-10-18 06:34:05
Re http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html
上面的"pradeepkumar文件“在这里讨论,帖子#11 (和帖子#7)
http://www.linuxquestions.org/questions/linux-software-2/issue-in-leach-protocol-installation-invalid-command-name-resource-energy-4175556129/#11
..。并且一个可用的awk脚本被附加到post #9。
ns2
发布于 2017-08-03 12:50:08
我想分享我在Ubuntu 14.04中安装ns-2.35和leach的经验。
我试图先安装ns-2.35,然后在Ubuntu 14.04中进行leach。在所有配置完成后,我尝试运行leach_test,但显示错误。当我看this教程时,我知道我走错了一步。在本教程中,演示了在ns-2.35和leach完成之间配置之后运行./install。
因此,我在终端~/ns-allinone-2.35中再次尝试使用./install。当我在ns-2.35中再次尝试leach_test时,模拟工作正常。
https://stackoverflow.com/questions/33128268
复制相似问题