Esempio n. 1
0
 public static UlResAssignOutput NonFreqUserExpandRB(IUlScheduleUser user, ScheduleResource res, byte beginIndex, int userMaxRbNumM, int TTI, float mcsEff, float userAvgSinr)
 {
     float num = UlScheduleTools.CalcTBSAvailable(user, TTI);
     UlResAssignOutput output = new UlResAssignOutput();
     if ((userMaxRbNumM >= 1) && (mcsEff > 0f))
     {
         output.RbIndexs = AssignRBLocation(user, res, beginIndex, userMaxRbNumM);
     }
     float num2 = UlScheduleTools.calBETBS(user, mcsEff, (float) output.RbIndexs.Count, user.MIMOClutterGain);
     output.realTBS = Math.Min(num2, num);
     output.RBNum = output.RbIndexs.Count;
     if (user.IsSinrAdjusted)
     {
         output.FinalSinr = userAvgSinr;
     }
     else
     {
         output.FinalSinr = userAvgSinr + user.RandomSinr;
     }
     output.MeasureSinr = userAvgSinr;
     output.TBSAvailable = num;
     return output;
 }
Esempio n. 2
0
 public static UlResAssignOutput FreqUserExpandRB(IUlScheduleUser user, IUlSchuduleCarrier carrier, ScheduleResource res, byte beginRbIndex, int userMaxRbNum, int tti)
 {
     List<byte> rbs = new List<byte>();
     List<byte> centerRbs = new List<byte>();
     List<byte> edgeRbs = new List<byte>();
     res.RbLists[0].ForEach(delegate (RBData rb) {
         centerRbs.Add(rb.Index);
     });
     res.RbLists[1].ForEach(delegate (RBData rb) {
         edgeRbs.Add(rb.Index);
     });
     rbs.AddRange(centerRbs);
     rbs.AddRange(edgeRbs);
     rbs.Sort();
     List<byte> list2 = new List<byte>();
     list2.Add(beginRbIndex);
     res.RemoveRbRes(beginRbIndex);
     int idxLeft = rbs.FindIndex(delegate (byte rbIndex) {
         return rbIndex == beginRbIndex;
     });
     int idxRight = idxLeft;
     bool flag = list2.Count < userMaxRbNum;
     bool canLeftExpand = true;
     bool canRightExpand = true;
     while (flag)
     {
         float maxValue = float.MaxValue;
         float inRight = float.MaxValue;
         canLeftExpand = (canLeftExpand && (idxLeft >= 1)) && (Math.Abs((int) (rbs[idxLeft - 1] - rbs[idxLeft])) == 1);
         if (canLeftExpand)
         {
             maxValue = carrier.UlRbInterferenceNoiseList[rbs[idxLeft - 1]];
         }
         canRightExpand = (canRightExpand && (idxRight <= (rbs.Count - 2))) && (Math.Abs((int) (rbs[idxRight + 1] - rbs[idxRight])) == 1);
         if (canRightExpand)
         {
             inRight = carrier.UlRbInterferenceNoiseList[rbs[idxRight + 1]];
         }
         byte num5 = GetExpandRbIndex(canLeftExpand, canRightExpand, ref idxLeft, ref idxRight, maxValue, inRight, rbs);
         if (num5 == 0xff)
         {
             break;
         }
         res.RemoveRbRes(num5);
         list2.Add(num5);
         flag = list2.Count < userMaxRbNum;
     }
     UlResAssignOutput output = new UlResAssignOutput();
     output.RbIndexs = list2;
     return output;
 }
Esempio n. 3
0
 private void GenerateScheduleInfo(IUlScheduleUser user, ref int residualRb, ref int scheduledUserNum, UlResAssignOutput result)
 {
     if ((result != null) && (result.RBNum > 0))
     {
         user.UlRbNum = (byte) result.RBNum;
         residualRb -= result.RBNum;
         //保存本次调度用户的调度完的信息
         this.SaveScheduledUser(user, result.RbIndexs, result.MeasureSinr, result.FinalSinr, result.TBSAvailable, result.realTBS);
         base.UpdateUserRbInfo(user, result.RbIndexs);
         if (UlScheduleTools.IsDoVMIMO(base.SimulationCarrier))
         {
             this.m_UList.Add(user);
         }
         scheduledUserNum++;
     }
     else
     {
         this.UserPackageLoss(user);
     }
 }