Closed joshsmith1999 closed 1 year ago
There are some parameters controlling the packet generation interval:
You could check the following position in the code to see it logic. I think it should be understood easily. If not, please let me know:
Thank you for your reply! For param_2(variabilityGenerationInterval): Variability of beacon period per vehicle (s) (only 11p). Because it applies only to 11p nodes, I don't consider this parameter temporarily. However, as for C-V2X, it's generation interval: https://github.com/V2Xgithub/WiLabV2Xsim/blob/fb4eabcf5ab28c7854fd943d02499cfae00f35dc/MainFiles/mainV2X.m#L248 The first term on the right of the equation could be found in "mainInit.m" when variabilityGenerationInterval equals zero: https://github.com/V2Xgithub/WiLabV2Xsim/blob/fb4eabcf5ab28c7854fd943d02499cfae00f35dc/MainFiles/mainInit.m#L118 The second term on the right of the equation means that it's a variable part. Therfore I changed the param_3(example, '0'->'1') and didn't changed param_2 for C-V2X aperiodic traffic simulations, and the results index PRR don't decline. The first two groups are periodic traffic, the last group group is aperiodic traffic.
I just changed the param generationIntervalAverageRandomPart 。 According to my understanding, as for C-V2X aperiodic traffic, I just need to change generationIntervalAverageRandomPart. So I have a little trouble with it. Hope to get your reply! Thank you~/谢谢~
L118 overwrites L177 to set periodic traffic. So in your case, you could comment line 118, then line 117 could use the param_2 to set aperiodic traffic for LTE-V2X: https://github.com/V2Xgithub/WiLabV2Xsim/blob/fb4eabcf5ab28c7854fd943d02499cfae00f35dc/MainFiles/mainInit.m#L117-L118
I think the aperiodic traffic may not always decline the PRR. In your simulation, the random part equals exprnd(params_3) (you may want to change this function to fit your case), which is a non-negative value. That means the generationInterval would be larger than the one without a random part, which could decrease the traffic. If the channel is not busy enough, an increasing PRR is possible.
More details could be found in the Wiki page
Thank you for your contribution and update~
I wanna simulate aperiodic traffic in the simulator, and I set the "generationIntervalAverageRandomPart" parameter with non-zero in the command line. Then I run the 'Simulations.m' and after running and I look up 'MainOut.xls'. However I find that the result changed little. I wanna ask if I need to change other parameters for simulating aperiodic traffic. I would appreciate a lot if you would give me the reply as soon as possible.