如何运行 SUMO – Simulation of Urban MObility 生成的ns2mobility.tcl 文件?

How to run the ns2mobility.tcl file that generated by SUMO – Simulation of Urban MObility?

当我在 Ubuntu 18.04 上尝试 运行 ns ns2mobility.tcl 时,我收到了这条消息:

can't read "node_(0)": no such variable

while executing

"$node_(0) set X_ 1508.89"

(file "ns2mobility.tcl" line 1)

ns2mobility.tcl 包含以下内容:

$node_(0) set X_ 1508.89
$node_(0) set Y_ 767.16
$node_(0) set Z_ 0
$ns_ at 0.0 "$node_(0) setdest 1508.89 767.16 0.00"
$ns_ at 1.0 "$node_(0) setdest 1507.78 766.24 1.44"
$ns_ at 2.0 "$node_(0) setdest 1505.37 764.25 3.12"
$ns_ at 3.0 "$node_(0) setdest 1501.0 760.63 5.66"
$ns_ at 4.0 "$node_(0) setdest 1495.11 755.76 7.62"
$ns_ at 5.0 "$node_(0) setdest 1487.78 749.77 9.45"
$ns_ at 6.0 "$node_(0) setdest 1478.55 742.12 11.99"
$ns_ at 7.0 "$node_(0) setdest 1468.05 733.42 13.63"
$ns_ at 8.0 "$node_(0) setdest 1456.95 724.24 14.40"
$ns_ at 9.0 "$node_(0) setdest 1445.98 715.51 14.01"
$ns_ at 10.0 "$node_(0) setdest 1435.15 707.01 13.75"
$ns_ at 11.0 "$node_(0) setdest 1423.57 697.92 14.72"
$ns_ at 12.0 "$node_(0) setdest 1412.67 689.36 13.85"
$ns_ at 13.0 "$node_(0) setdest 1401.56 680.64 14.12" 

任何帮助将不胜感激。

SUMO 运动文件 (ns2mobility.tcl) 用于 ns2 "vanet simulation file.tcl" :

在模拟文件中创建节点后,用source ns2mobility.tcl调用相扑文件。 IE。 1) 文件 ns2mobility.tcl 不是模拟文件。只是运动设置而已。 2) "$node_(0) set X ..." 和 $ns_ at 0.0 "$node_(0) setdest ..." 在定义某些节点之前不起作用。

参见 Vanet 模拟示例:Vanet-examples-09。18.tar.gz https://drive.google.com/file/d/1wcDPDk68e6OPsUBaE_yC7whaAqUmTWf3/view?usp=sharing ... andhttp://neo.lcc.uma.es/staff/jamal/vanet/index.html%3Fq=node%252F11.html