set xx(0) 1.0
set yy(0) 1.0
$node_(0) set X_ $xx(0)
$node_(0) set Y_ $yy(0)
set g(1) $column
set g(2) [expr $g(1) + $column]
for {set i 3} {$i <= [expr $row -1]} { incr i } {
set g($i) [expr $g([expr $i - 1]) + $column]
}
set g(0) 0
set xx($g(1)) 1.0
set yy($g(1)) [expr $xx(0) + 100]
$node_($g(1)) set X_ $xx($g(1))
$node_($g(1)) set Y_ $yy($g(1))
for {set i 0} {$i <= [expr $row -1] } { incr i } {
set count($g($i)) 0
}有没有人能告诉我这段代码中的每一行都在做什么和使用...!!xx(0)和yy(0)的使用以及在g(0) g(1)和所有中发生的事情。
发布于 2015-04-15 03:59:26
xx可能表示x到x,但a表示行为: set某事
..。任何随机的单词实际上都可以使用。
解释所有行:不可能。只是一些设置(设置word )
缺少完整的文件。
我们有四个来自谷歌搜索的xx和yy的例子:
。http://mailman.isi.edu/pipermail/ns-users/2013-November/073436.html
。http://www.ijcnwc.org/papers/vol2no52012/1vol2no5.pdf
。http://kalkanotel.com/modification-needs-to-make-aodv-protocol-work-with-mobilenode-my-source-is-fixed-node-and-my-destination-is-mobilenode-i290320.htm
。http://ns-2sourcecode.blogspot.dk/2013/01/to-set-nodes-destination-and-color.html
ns2
https://stackoverflow.com/questions/29625012
复制相似问题