简体   繁体   English

修复omnet ++和sumo中的速度

[英]Fix speed in omnet++ and sumo

I have question. 我有问题。 If I have road with three lane each lane has own speed like ( 80 , 100 , 120 )Km/h ... Then need to test the performance of any protocol like the AODV for VANET when the vehicle speed is 90 Km/h.. and the number of vehicle is 100 how can do this,mean to set fix speed for these cars. 如果我有三车道的道路,那么每条车道都有自己的速度,例如(80、100、120)Km / h ...那么,当车速为90 Km / h时,需要测试诸如AONET的AODV等协议的性能。且车辆数量为100,该如何设置这些车辆的固定速度。 Thanks in advance. 提前致谢。

To fix the speed of a vehicle you can simply give it the aspired speed as maximum speed and prevent it from dawdling (which it does with the default model). 要固定车辆的速度,您可以简单地将其期望速度设为最大速度,并防止其晃动(默认模式下也是如此)。 An input route file could look like this: 输入路由文件可能如下所示:

<routes>
    <vType sigma="0" id="t1" maxSpeed="90"/>
    <vehicle id="v1" type="t1" depart="0" route="r1" departSpeed="max"/>
</routes>

Please note that this will set the maximum speed to 90m/s (as requested in the question) which means 324 km/h. 请注意,这会将最大速度设置为90m / s(按问题要求),即324 km / h。 Also the definition of the route r1 is excluded here. 同样,此处不包括路线r1的定义。

If you have multiple interacting vehicles however you cannot at the same time guarantee collision free simulation and constant speed and sumo will favor the first. 但是,如果有多个交互车辆,则不能同时保证无碰撞仿真和恒定速度,而相扑将优先。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM