speed of vechile in veins increases slowly

戏子无情 提交于 2019-12-08 12:45:29

问题


I'm using veins 4.4, OMNeT++ 5.0 and SuMO 0.25. I have set vehicle speed to 0 to stop them by traciVehicle->setSpeed(0) then after certain case i set them to 20 by traciVehicle->setSpeed(20) to cross the intersection but for no reason it increases slowly till its time finish , so can i make it faster ???


回答1:


A vehicle in SuMO has the speedMode parameter which determines how it should behave for instance in terms of acceleration and deceleration.

By default this parameters is set to consider all checks like keeping a safe gap to other vehicles and the maximum acceleration. When set to 0 the vehicle ignores all checks like the maximum acceleration.

Try setting different values for the speedMode in Veins to achieve the expected vehicle behavior. You can do so by using the TraCICommandInterface and the TraciVehicle. Have a look at the TraCITestApp for an example. Also you could play around with the maximumSpeed parameter.




回答2:


i solved the problem by regenerating my map and after that vehicles crossed in its expected speed.i think unknown error occurred in my (.net or .rou ) files while i was debugging my code.



来源:https://stackoverflow.com/questions/43057528/speed-of-vechile-in-veins-increases-slowly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!