ms-van3t-devs / ms-van3t

A multi-stack, ETSI compliant, V2X framework for ns-3.
GNU General Public License v2.0
108 stars 34 forks source link

Can I get rtt,throughput and losepackets rate of v2v and v2i easily? #5

Closed zcker closed 2 years ago

zcker commented 2 years ago

I'm trying to simulate v2x environment to get rtt,throughput and losepackets rate ,I don't know whether the project can do or not ,so I want to make a inquiry,thank you

francescoraves483 commented 2 years ago

Dear @zcker, Thank you for using ms-van3t and for contacting us.

You should be able to easily retrieve the average latency and average Packet Reception Ratio (PRR, i.e., the percentage of received packets with respect to the transmitted amount, according to the 3GPP TR 36.885 specifications - it is basically computed as the ratio between the number of cars/nodes that received each transmitted message within a given baseline in meters and the total number of vehicles/nodes located within the same baseline). The latter is directly linked to the packet loss. These metrics can be transparently computed as average values (over all the vehicles and over the whole simulation time) at the end of each simulation, and optionally saved to a CSV file, thanks to the PRRSupervisor module.

If you look at the sample V2V application (v2v-emergencyVehicleAlert-80211p.cc), you can see an example of the usage of the PRRSupervisor module:

The PRRSupervisor fully supports any simulation with SUMO as mobility manager, while it still does not support the combined usage with the gps-tc module, i.e., the usage when real, pre-recorded, GNSS traces are being leveraged.

Concerning instead throughput, this may be a bit more tricky, as it is still not supported, as a metric, in the PRRSupervisor module.

You can however, code your own way of computing throughput starting from the latest version of ms-van3t. For instance, if you want to compute the amount of received data in Mbit/s when exchanging standard compliant messages, you can start from the V2V example, and compute, for each received CAM and/or DENM, the amount of received bytes in the unit time. Instead, if you want to compute the maximum reachable throughput for a given technology, you could write your own application which does not leverage neither the CA Basic Service, nor the DEN Basic Service, but which sends a large amount of packets over a socket (which can be created following the socket creation example available here, in lines 170-204, and then used directly, instead of passing it to a DEN Service or CA Service object). Then, on the reception side, you could compute the number of received bytes over the unit time.

Hope this helps. Thank you very much, Francesco

zcker commented 2 years ago

thank you for your answer