Using a subset of a SUMO scenario for OMNeT++ network simulation (with VEINS)

守給你的承諾、 提交于 2019-12-03 08:34:11
floxyz

There are two things you can do here for reducing the number of sent messages in Veins:

  1. Use the OMNeT++ Warm-Up Period as described here in the manual. Basically it means to set warmup-period in your .ini file and make sure your code checks this with if (simTime() >= simulation.getWarmupPeriod()). The OMNeT++ signals for result collection are aware of this.

  2. The TraCIScenarioManager offers a variable double firstStepAt @unit("s") which you can use to delay the start of it. Again this can be set in the .ini file.

  3. As the VEINS FAQ states, the TraCIScenarioManagerLaunchd offers two variables to configure the region of interest, based on rectangles or roads (string roiRoads and string roiRects). To reduce the simulated area, you can restrict simulation to a specific rectangle; for example, *.manager.rioRects="1000,1000-3000,3000" simulates a 2x2km area between the two supplied coordinates.

With both solutions (best used in combination) you still have to run SUMO - but Veins barely consums any of the time.

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