Exemplo n.º 1
0
 private void SaveNoScheduledUser(IDlScheduleUser user, DLUserTag userTag, short tti)
 {
     SimulationUser user2 = (SimulationUser) user;
     if (user2.PreScheduleTime != -1)
     {
         user2.VoiceContinueLost = (short) (user2.VoiceContinueLost + 1);
         user2.TotalPackageLossCount = (short) (user2.TotalPackageLossCount + 1);
         user2.VoiceMaxContinueLost = Math.Max(user2.VoiceMaxContinueLost, user2.VoiceContinueLost);
     }
 }
Exemplo n.º 2
0
 private void AllotResourceForEdgeUser(IDlScheduleUser user, DLUserTag userTag, int rbNeed)
 {
     if (this.resource.RbEdgeList.Count >= rbNeed)
     {
         this.AllotRbList(user, this.resource.RbEdgeList, rbNeed, this.IsSfSbSsSsStriNbrCarrier((IDlScheduleCarrier) user.SfSbSsSsStroNbr));
     }
     else
     {
         this.AllotResourceWhileEdgeRbNotEnough(user, userTag, rbNeed);
     }
 }
Exemplo n.º 3
0
 private void AllotResourceForCenterUser(IDlScheduleUser user, DLUserTag userTag, int rbNeed)
 {
     int num = rbNeed - this.resource.RbCenterList.Count;
     this.AllotRbList(user, this.resource.RbCenterList, Math.Min(rbNeed, this.resource.RbCenterList.Count));
     //如果RbCenter不够的话,就会分一些RbEdge
     num = Math.Min(num, this.resource.RbEdgeList.Count);
     if (num > 0)
     {
         this.AllotRbList(user, this.resource.RbEdgeList, num);
     }
 }
Exemplo n.º 4
0
 private bool ScheduleOneDataUser(IDlScheduleUser user, DLUserTag userTag, short tti)
 {
     if ((((base.Tag.UsableRbNumPerTti <= 0) || (base.Tag.MaxSchedulableDataUserNum <= 0)) || (base.Tag.TypeARemaindPower <= 0f)) || (base.Tag.TypeBRemaindPower <= 0f))
     {
         return false;
     }
     float dLSinr = ResourceBudget.GetDLSinr(user, userTag);
     float mcsBySinr = DLScheduleCalaculateTool.GetMcsBySinr(user, dLSinr);
     if (mcsBySinr <= 0f)
     {
         return false;
     }
     float minSinr = 0f;
     float mimoClutterGain = 0f;
     SimulationTools.GetMinSinrAndMimoClutterGain(user, ref minSinr, ref mimoClutterGain, dLSinr);
     if (dLSinr < minSinr)
     {
         return false;
     }
     float tbs = DLScheduleCalaculateTool.CalculateTbsNeed(user, tti);
     int num6 = DLScheduleCalaculateTool.CalculateRBCountByTbs(user, mcsBySinr, tbs, mimoClutterGain);
     int num7 = DLScheduleCalaculateTool.CalaCountRBByRemaindPower(user, base.CurrentCarrier, base.Tag);
     int minRbNum = Math.Min(Math.Min(num6, base.Tag.UsableRbNumPerTti), SimulationConstant.DL_MAX_USER_SCHEDULE_RB_NUM);
     minRbNum = Math.Min(num7, minRbNum);
     if (minRbNum < num6)
     {
         tbs = DLScheduleCalaculateTool.CalculateTBSByMcs(user, minRbNum, mcsBySinr, mimoClutterGain);
     }
     if (tbs <= 0f)
     {
         return false;
     }
     user.MacTBS = tbs;
     user.DlMcsEff = mcsBySinr;
     user.MeasureSinr = dLSinr;
     user.FinalSinr = dLSinr;
     user.ServiceCount = (short) (user.ServiceCount + 1);
     user.State = State.Service;
     this.UpdateUserProrityGeneWithPF(user, userTag, true);
     base.IAllotMethod.AllotResource(user, minRbNum);
     base.CurrentCarrier.DlDataServiceUserList.Add(user);
     base.CurrentCarrier.DlDataWaitUserList.Remove(user);
     user.PreScheduleTime = tti;
     DLCarrierTag tag = base.Tag;
     tag.MaxSchedulableDataUserNum--;
     DLCarrierTag tag2 = base.Tag;
     tag2.UsableRbNumPerTti = (byte) (tag2.UsableRbNumPerTti - Convert.ToByte(minRbNum));
     DLCarrierTag tag3 = base.Tag;
     tag3.TBS += tbs;
     return true;
 }
Exemplo n.º 5
0
 private bool ScheduleVoiceUser(IDlScheduleUser user, DLUserTag userTag, short ttiNum)
 {
     if (((base.Tag.UsableRbNumPerTti > 0) && (base.Tag.TypeARemaindPower > 0f)) && (base.Tag.TypeBRemaindPower > 0f))
     {
         float pdschSinr = user.PdschSinr;
         float mcsBySinr = DLScheduleCalaculateTool.GetMcsBySinr(user, pdschSinr);
         if (mcsBySinr <= 0f)
         {
             return false;
         }
         float minSinr = 0f;
         float mimoClutterGain = 0f;
         SimulationTools.GetMinSinrAndMimoClutterGain(user, ref minSinr, ref mimoClutterGain, pdschSinr);
         if (pdschSinr < minSinr)
         {
             return false;
         }
         float voicePacketSize = (user as SimulationUser).VoicePacketSize;
         //¸ù¾Ýtbs¼ÆËãRBÊý
         int rbNeed = DLScheduleCalaculateTool.CalculateRBCountByTbs(user, mcsBySinr, voicePacketSize, mimoClutterGain);
         int rbNumByPower = DLScheduleCalaculateTool.CalaCountRBByRemaindPower(user, base.CurrentCarrier, base.Tag);
         if (this.IsCanScheduleUser(user, rbNeed, rbNumByPower))
         {
             user.MacTBS = voicePacketSize;
             SimulationUser user2 = (SimulationUser) user;
             user2.PreScheduleTime = ttiNum;
             user.ServiceCount = (short) (user.ServiceCount + 1);
             user.MeasureSinr = pdschSinr;
             user.FinalSinr = pdschSinr;
             user.DlMcsEff = mcsBySinr;
             user2.VoiceContinueLost = 0;
             user.PreScheduleTime = ttiNum;
             userTag.RbNeed = rbNeed;
             user.State = State.Service;
             base.CurrentCarrier.DlVoiceServiceUserList.Add(user);
             base.CurrentCarrier.DlVoiceWaitUserList.Remove(user);
             DLCarrierTag tag = base.Tag;
             tag.UsableRbNumPerTti = (byte) (tag.UsableRbNumPerTti - Convert.ToByte(rbNeed));
             return true;
         }
     }
     return false;
 }
Exemplo n.º 6
0
 private void AssortScheduledUser(IDlScheduleUser user, DLUserTag userTag, short tti, BaseUserList lessAveRateGBRUserList, BaseUserList lessMinRateNGBRUserList, BaseUserList satisfiedGBRUserList, BaseUserList satisfiedNGBRUserList)
 {
     LTEService service2 = SimulationTools.GetUnionPsService(user.LTEUser.Service).PSServiceDic[NetWorkType.LTE] as LTEService;
     if (service2.IsGBR)
     {
         float num = this.ReduceRate(user, tti);
         if (base.GetActualBusinessBitRate(user, tti) < num)
         {
             lessAveRateGBRUserList.AddUser(user, userTag);
         }
         else
         {
             satisfiedGBRUserList.AddUser(user, userTag);
         }
     }
     else if (base.GetActualBusinessBitRate(user, tti) < user.DlMacMinThroughputDemand)
     {
         lessMinRateNGBRUserList.AddUser(user, userTag);
     }
     else
     {
         satisfiedNGBRUserList.AddUser(user, userTag);
     }
 }
Exemplo n.º 7
0
 public override float GetPriority(IDlScheduleUser user, DLUserTag usertag)
 {
     int servicePriority = SimulationTools.GetServicePriority(user.LTEUser.Service);
     return (((user.LTEUser.Priority * servicePriority) * (user.PdschSinr - user.BestServiceCarrier.DLRsSinrAccessThreshold)) * (user.VoiceContinueLost + 1));
 }
Exemplo n.º 8
0
 private void AllotResourceWhileEdgeRbNotEnough(IDlScheduleUser user, DLUserTag userTag, int rbNeed)
 {
     int allotCount = rbNeed - this.resource.RbEdgeList.Count;
     this.AllotRbList(user, this.resource.RbEdgeList, this.resource.RbEdgeList.Count);
     if (user.SfSbStroNbr == null)
     {
         this.AllotRbList(user, this.resource.RbCenterList, allotCount, true);
     }
     else
     {
         this.AllotResourceWhileSfSbStroNbrNotNull(user, userTag, allotCount);
     }
 }
Exemplo n.º 9
0
 private void AllotResourceWhileSfSbStroNbrNotNull(IDlScheduleUser user, DLUserTag userTag, int centerNeedRbCount)
 {
     if (user.SfSbSsSsStroNbr == null)
     {
         this.RobCenterRbNotEqualNbrEdgeRb(user, this.resource.RbCenterList, centerNeedRbCount);
     }
     else
     {
         this.AllotRbList(user, this.resource.RbCenterList, centerNeedRbCount, this.isHighCarrier((IDlScheduleCarrier) user.SfSbStroNbr));
     }
 }
Exemplo n.º 10
0
 public abstract void AddUser(IDlScheduleUser user, DLUserTag usertag);
Exemplo n.º 11
0
 private void UpdateUserProrityGeneWithPF(IDlScheduleUser user, DLUserTag userTag, bool scheduled)
 {
     if (base.Policy == SchedulePolicy.PF)
     {
         if (scheduled)
         {
             userTag.PriorityGene = (0.999f * userTag.PriorityGene) + ((0.001f * user.MacTBS) * 1000f);
         }
         else
         {
             userTag.PriorityGene = 0.999f * userTag.PriorityGene;
         }
     }
 }
Exemplo n.º 12
0
 private void SaveNoScheduleUser(IDlScheduleUser user, DLUserTag usertag, short tti)
 {
     this.UpdateUserProrityGeneWithPF(user, usertag, false);
 }
Exemplo n.º 13
0
 public abstract float GetPriority(IDlScheduleUser user, DLUserTag usertag);