问题
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