We are studing the simulator to use it in a project , we worked with the schedulers. We find this:
That rand is in case of a tie in the best CQI in a particular RB. If you see the previous lines at line 43 the scheduler finds the maxCQI value for each RB, at lines 45-51 the scheduler finds the users with that value of CQI (the max value) in each RB,in case of more than one user with the value of max CQI in a RB the scheduler selects one of that users randomly.
I hope you find this helpful .
The max CQI value is for each RB, so the value is depending of the max value of CQI in that RB. In the basicScenario you will find different CQI values try to use that with BestCQI and use the debuguer to expore the variables into the scheduler program.
We are trying to develop the PF algorithm, if you have any question about the algorithm we can talk about.