2015-10-14 79 views
0

我試圖安裝LEACH協議在NS2版本2.35按照此鏈接中的步驟: http://www.nsnam.com/2015/05/leach-p...in-ns2-ns.html問題在LEACH協議安裝:無效的命令名稱「資源/能源」

在完成鏈接的所有步驟後,我試圖執行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埃爾Capitain

NS 2版本:納秒2.35

NB:在MAC OSX安裝幾乎是像在Ubuntu的一個。主要路徑是唯一的變化。

回答

0

,我想分享我的經驗,安裝NS-2.35和浸在Ubuntu 14.04。

我想先安裝ns-2.35,然後在Ubuntu 14.04中進行浸洗。完成所有配置後,我嘗試運行leach_test,但顯示錯誤。當我看到this教程時,我知道我的錯誤步驟。在本教程中,它顯示./install在ns-2.35之間配置之後運行,並且完成了過濾。

因此,我再次嘗試./install在終端~/ns-allinone-2.35。 當我在ns-2.35中再次嘗試leach_test時,仿真效果很好。