0
votes

Dear OMNeT++/SUMO/Veins community,

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

I have lot of vehicles in my scenario and I want set only one part them with communication module, for example 50 %. For this I created one method that set half the vehicles to start the sendBeacon and other method to drop the beacon/data for half (same half that no start sendBeacon) the vehicles. I already see this question.

I think there is a correct way to do this, because in my code all the vehicle have the communication module and just not use or ignore the package that arrived.

I'd appreciate any help.

1

1 Answers

1
votes

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.