Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc

戏子无情 提交于 2019-12-01 10:03:39

问题


I use Veins-4a2 and I have modified the scenario of the demo example. When I executed the simulation, I had this error:

Error in module (Veins::ObstacleControl) RSUExampleScenario.obstacles (id=2) at event #22, t=0.037209: Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc line 127.

Why this error was happened? Can you please help me to


回答1:


There is a known bug in Veins versions up to 4.4, where sometimes a corner case is triggered that results in the number of walls between sender and receiver being off by one. To guarantee that either correct results or no results are returned, the simulation is aborted if such a case is detected.

If this happens only a few times during a large simulation, you might simply want to remove this ASSERT statement.

If this happens a lot, your obstacle definitions are likely wrong (e.g., a building with only two walls)



来源:https://stackoverflow.com/questions/39896494/model-error-assert-condition-intersectat-size-2-0-false-in-function-c

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