Users with different Type of Traffic Model

Hello,
I’m trying to define users with different type of traffic model in the openStreetMap.m scenario.
Based on the code implemented in the script and listed below, it looks like all the users should have the same parameters. In the example below, is it possible to choose randomly one of the possible traffic models for each of the 100 users instead of giving CostantRate to all of them?
Many thanks in advance!

Users5G = parameters.user.Poisson2D;
Users5G.nElements = 100;
Users5G.nRX = 1;
Users5G.channelModel = parameters.setting.ChannelModel.PedB;
Users5G.trafficModel.type = parameters.setting.TrafficModelType.ConstantRate;
Users5G.trafficModel.size = 94*5;
Users5G.trafficModel.numSlots = 2;
Users5G.numerology = 1;
Users5G.technology = parameters.setting.NetworkElementTechnology.NRMN_5G;

Dear Alessandro,

currently, this is only possible by definining a separate user group for each traffic model, you could then randomly assign the number of users to each group so that the sum equals the desired number.
It would also be possible to do this in a more straightforward way, but this would require a few modifications to different parts of the simulator:
You could set Users5G.trafficModel to an array of trafficModels (adding those that you want to be in the selection of possible models) and then modify the setModel function of the users to accept that array and randomly select one of the models from the array for each user. I suspect that a few other minor modifications to things like parameter checks would be necessary for that to work properly (as indicated by the errors that might pop up when running the modified code), but it should work in the end.

Best regards,
Armand

1 Like