0

OMNeT++/SUMO/Veins コミュニティの皆様

There is a correct way to disable/remove the NIC module for some vehicle in the Veins?

私のシナリオには多くの車両があり、たとえば 50% など、通信モジュールを 1 つのパーツだけに設定したいと考えています。このために、車両の半分を開始するように設定する 1 つのメソッドと、車両sendBeaconの半分 (開始 sendBeacon がないのと同じ半分) のビーコン/データをドロップする別のメソッドを作成しました。私はすでにこの質問を見ています。

私のコードでは、すべての車両に通信モジュールがあり、到着したパッケージを使用または無視しないため、これを行う正しい方法があると思います。

助けていただければ幸いです。

4

1 に答える 1

1

If you want only a certain fraction of vehicles to participate in the network simulation, you can set the penetration rate parameter in https://github.com/sommer/veins/blob/veins-4.4/src/veins/modules/mobility/traci/TraCIScenarioManagerLaunchd.ned#L58 to a value smaller than one.

For example, if you set the penetration rate to 0.5 only half of the cars will take part in the network simulation (but still in the road traffic simulation), thus modeling a network where half of the cars are not equipped with VANET technology.

于 2016-10-12T00:25:06.830 に答える