Ejemplo n.º 1
0
 /// <summary>
 /// 初始化, 得到每个carrier的用户
 /// </summary>
 private List<ISimulationUser> InitUsers(SimulationCarrier carrier)
 {
     List<ISimulationUser> userList = new List<ISimulationUser>();
     if (carrier.LinkType == LinkType.Downlink)
     {
         userList.AddRange(carrier.DlDataServiceUserList);
         userList.AddRange(carrier.DlVoiceServiceUserList);
         if ((m_CurrentTTI % SimulationConstant.WAIT_USER_MEASURE_PERIOD) == 0) //是否需要统计waituser
         {
             userList.AddRange(carrier.DlDataWaitUserList);
             userList.AddRange(carrier.DlVoiceWaitUserList);
         }
         if (carrier.IsLTECell)
         {
             userList = SimulationTools.AddSimulationUserToISimulationUserList(userList, carrier.DlRelayUserList);
         }
     }
     else
     {
         userList.AddRange(carrier.UlDataServiceUserList);
         userList.AddRange(carrier.UlVoiceServiceUserList);
         if (SimulationConstant.IS_NEW_PowerControl || ((m_CurrentTTI % SimulationConstant.WAIT_USER_MEASURE_PERIOD) == 0))
         {
             userList.Clear(); //上行清空--why?
             userList.AddRange(carrier.UlDataWaitUserList);
             userList.AddRange(carrier.UlVoiceWaitUserList);
         }
         if (carrier.IsLTECell)
         {
             userList = SimulationTools.AddSimulationUserToISimulationUserList(userList, carrier.UlRelayUserList);
         }
     }
     m_CarrierAndUserDic.Add(carrier, userList);
     return userList;
 }
Ejemplo n.º 2
0
        public void MyTestInitialize()
        {
            User lteuser = new User();
            m_User = new SimulationUser();
            m_Carrier = new SimulationCarrier();
            m_Carrier.AdmissionCarrierTag = new AdmissionCellTag();
            m_DlAdmission = new DlAdmissionControl();
            m_ISimulationCarrierList = new List<ISimulationCarrier>();
            

            SimulationCarrier carrier1 = new SimulationCarrier();
            m_ISimulationCarrierList.Add(carrier1);
            carrier1.DlUserList.Add(m_User);
            carrier1.DLHandOverDataUserList.Add(m_User);
            carrier1.DLHandOverVoiceUserList.Add(m_User);
            m_User.LTEUser = lteuser;

            m_GBRUserList = new List<ISimulationUser>();
            m_NonGBRUserList = new List<ISimulationUser>();
            
            SimulationUser user1 = new SimulationUser();
            m_GBRUserList.Add(user1);
            m_NonGBRUserList.Add(user1);
            //m_Carrier.DlVoiceWaitUserList.Add(m_User);

            

        }
Ejemplo n.º 3
0
 public void MyTestInitialize()
 {
     carrier = new SimulationCarrier();
     carrier.AdmissionCarrierTag = new AdmissionCellTag();
     ulAdmission = new UlAdmissionControl();
     currentTTI = 0;
 }
Ejemplo n.º 4
0
 public void DoSchedule(SimulationCarrier simulationCarrier, ref int ulTargetLoadRb, ref float temp)
 {
     List<SimulationUser> uers = new List<SimulationUser>();
     uers = simulationCarrier.UlRelayUserList;             //relays为LTECell下的relay,在这作为用户被LTECell调度
     UpdateRelayUser(uers);            //调度前将relay作为carrier下的数据与作为user的数据同步
     ScheduleRelayNode(uers, ref ulTargetLoadRb);          //relay作为user被调度
     UpdateRelayBuffer(uers);          //调度后将relay作为user调度的数据存与carrier时同步
 }
Ejemplo n.º 5
0
 public void InitScheduleMethod(SimulationCarrier carrier, DLCarrierTag tag, SchedulePolicy policy)
 {
     this.m_currentCarrier = carrier;
     this.tag = tag;
     this.policy = policy;
     this.method = AllotMethodFactory.CreateAllotMethod(carrier.IsDlIcicOn);
     this.method.InitAllotMethod(carrier, tag);
 }
Ejemplo n.º 6
0
 public void CalculateUlRbInterference(SimulationCarrier curCarrier, Dictionary<int, float[]> inDic, Dictionary<ISimulationCarrier, Dictionary<ISimulationCarrier, float>> carrierInDic, bool isICICPeriod)
 {
     List<ISimulationUser> list = new List<ISimulationUser>();
     list.AddRange(curCarrier.UlDataServiceUserList);
     list.AddRange(curCarrier.UlVoiceServiceUserList);
     foreach (SimulationUser user in list)
     {
         this.CalaculateRbInOneUser(curCarrier, user, inDic, carrierInDic, isICICPeriod);
     }
 }
Ejemplo n.º 7
0
 private void CalNbrFreInterference(SimulationCarrier curCarrier, SimulationUser user, CarrierTotalLoss InCarrierTL, float[] rbIn, ref float rxPower)
 {
     float ulTotalLoss = InCarrierTL.UlTotalLoss;
     float num2 = SimulationTools.CalculateFactor(InCarrierTL.Carrier, curCarrier);
     rxPower = (num2 * SimulationTools.ConvertdBToLine(user.UeTxPower)) / ulTotalLoss;
     float num3 = rxPower / ((float) curCarrier.BandWidthRbNum);
     for (int i = 0; i < curCarrier.BandWidthRbNum; i++)
     {
         rbIn[i] += num3/2f;
     }
 }
Ejemplo n.º 8
0
 private bool IsUpLinkSubframe(int curTTI, SimulationCarrier carrier)
 {
         int[,] subFrameMatrix = carrier.TDDSubFrameMatrix;
         int subFrameCongig = carrier.TDDSubFrameAllocation;
         int subFrameIndex = curTTI % 10;
         if (subFrameMatrix[subFrameCongig, subFrameIndex] == 1)
         {
             return true;
         }
         return false;
 }
Ejemplo n.º 9
0
 private void CalaculateRbInOneUser(SimulationCarrier curCarrier, SimulationUser user, Dictionary<int, float[]> inDic, Dictionary<ISimulationCarrier, Dictionary<ISimulationCarrier, float>> carrierInDic, bool isICICPeriod)
 {
     for (int i = 0; i < user.CarrierListInComputeArea.Length; i++)
     {
         CarrierTotalLoss inCarrierTL = user.CarrierListInComputeArea[i];
         if (inCarrierTL.Carrier != user.BestServiceCarrier)
         {//计算用户受到的非主服务小区的干扰情况
             this.CalaculateRbInOneCarrier(curCarrier, user, inCarrierTL, inDic, carrierInDic, isICICPeriod);
         }
     }
 }
Ejemplo n.º 10
0
 public void InitCarrierTag(SimulationCarrier carrier, SchedulePolicy policy)
 {
     this.m_Carrier = carrier.Carrier;
     this.m_maxPower = SimulationTools.ConvertdBToLine(this.m_Carrier.MaxPower);
     this.m_bchPower = SimulationTools.ConvertdBToLine(carrier.BCHPower);
     this.m_schPower = SimulationTools.ConvertdBToLine(carrier.SCHPower);
     this.m_rsPower = SimulationTools.ConvertdBToLine(carrier.RSPower);
     this.m_bchRePower = this.m_bchPower / 20f;
     this.m_schRePower = this.m_schPower / 10f;
     this.m_voiceScheduler.InitScheduleMethod(carrier, this, policy);
     this.m_dataScheduler.InitScheduleMethod(carrier, this, policy);
     this.m_DataFrequencySelectMethod.InitScheduleMethod(carrier, this, carrier.SchedulePolicy);
 }
Ejemplo n.º 11
0
 private void CalcCarrierPeakThr(SimulationCarrier theCarrier)
 {
     if (theCarrier.UlActualTh > theCarrier.CarrierPeakThr.UlMacThroughput)
     {
         theCarrier.CarrierPeakThr.UlMacThroughput = theCarrier.UlActualTh;
         theCarrier.CarrierPeakThr.UlAppThroughput = theCarrier.UlActualAppTh;
     }
     if (theCarrier.DlActualTh > theCarrier.CarrierPeakThr.DlMacThroughput)
     {
         theCarrier.CarrierPeakThr.DlMacThroughput = theCarrier.DlActualTh;
         theCarrier.CarrierPeakThr.DlAppThroughput = theCarrier.DlActualAppTh;
     }
 }
Ejemplo n.º 12
0
 private void CalculatePuschSinr(SimulationCarrier carrier, int currentTti)
 {
     List<ISimulationUser> allUserList = new List<ISimulationUser>();
     allUserList.AddRange(carrier.UlDataServiceUserList);
     allUserList.AddRange(carrier.UlVoiceServiceUserList);
     this.CalcUserListPuschSinr(carrier, allUserList);
     if (SimulationConstant.IS_NEW_PowerControl || ((currentTti % SimulationConstant.WAIT_USER_MEASURE_PERIOD) == 0))
     {
         allUserList.Clear();
         allUserList.AddRange(carrier.UlDataWaitUserList);
         allUserList.AddRange(carrier.UlVoiceWaitUserList);
         this.CalcUserListPuschSinr(carrier, allUserList);
     }
 }
Ejemplo n.º 13
0
 public override void DoSlowDownRate(SimulationCarrier simulationCarrier)
 {
     if (simulationCarrier.DlGBRUserPriorityDic.Count > 0)
     {
         foreach (int num in simulationCarrier.DlGBRUserPriorityList)
         {
             float num2 = 1f;
             if ((((double) simulationCarrier.DlGBRUserPriorityDic[num]) + 0.0001) > num2)
             {
                 simulationCarrier.DlGBRUserPriorityDic[num] = SimulationConstant.SERVICE_SLOWDOWN_RATE;
                 this.SetUserDegrateTime(simulationCarrier.DlDataServiceUserList, simulationCarrier.DlDataWaitUserList, num);
             }
         }
     }
 }
Ejemplo n.º 14
0
 //by hxl 用于通过rc拿到包它的simulationcarrier
 public static SimulationCarrier GetSimulationCarrierByRelay(List<SimulationCarrier> allSimulationCarrier, RelayCell rc)
 {
     foreach (SimulationCarrier carrier in allSimulationCarrier)
     {
         if (!carrier.IsLTECell)
         {
             if ((RelayCell)(carrier.Carrier) == rc)
             {
                 return carrier;
             }
         }
     }
     SimulationCarrier targetCarrier = new SimulationCarrier();
     targetCarrier.Carrier = rc;
     return targetCarrier;
 }
Ejemplo n.º 15
0
 private void CalculateUserBandwidthSINR(SimulationCarrier carrier)
 {
     foreach (SimulationUser user in carrier.UlDataServiceUserList)
     {
         if (!user.IsUlFreqSel && !user.IsVMIMOUser)
         {
             float totalNoise = 0f;
             foreach (byte RBIndex in user.RbList)
             {//ue的全部rb上受到的干扰
                 totalNoise += carrier.UlRbInterferenceNoiseList[RBIndex];
             }
             user.UserSinr = user.UeTxPower - SimulationTools.ConvertLineTodB(user.UlPathLoss * totalNoise);
             //上行接收端的接收功率/总的干扰加噪声
         }
     }
 }
Ejemplo n.º 16
0
 private void CalculateUserBandwidthSINR(SimulationCarrier carrier)
 {
     foreach (SimulationUser user in carrier.UlDataServiceUserList)
     {
         if (!user.IsUlFreqSel && !user.IsVMIMOUser)
         {
             float num = 0f;
             foreach (byte num2 in user.RbList)
             {
                 if(num2>3)
                     num += carrier.UlRbInterferenceNoiseList[0];
                 else
                     num += carrier.UlRbInterferenceNoiseList[num2];
             }
             user.UserSinr = user.UeTxPower - SimulationTools.ConvertLineTodB(user.UlPathLoss * num);
         }
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 把voip用户加入到相应的UlVoiceNewAccessUserList或DlVoiceNewAccessUserList中
 /// </summary>
 /// <param name="carrier"></param>
 /// <param name="user"></param>
 /// <param name="ulNum">当前TTI下已接入的上行语音用户</param>
 /// <param name="dlNum">当前TTI下已接入的下行语音用户</param>
 /// <param name="ulNumTarget">当前TTI下最多能接入的上行语音用户</param>
 /// <param name="dlNumTarget">当前TTI下最多能接入的下行语音用户</param>
 /// <returns>是否能成功的把voice用户加入到DlVoiceNewAccessUserList或UlVoiceNewAccessUserList</returns>
 private bool AddVoipUserToList(SimulationCarrier carrier, ISimulationUser user, ref int ulNum,
     ref int dlNum, int ulNumTarget, int dlNumTarget)
 {
     bool flag = false;
     if ((user.LTEUser.LinkType == LinkType.Uplink) && (ulNum < ulNumTarget))
     {
         carrier.UlVoiceNewAccessUserList.Add(user);
         ulNum++;
         return true;
     }
     if ((user.LTEUser.LinkType == LinkType.Downlink) && (dlNum < dlNumTarget))
     {
         carrier.DlVoiceNewAccessUserList.Add(user);
         dlNum++;
         flag = true;
     }
     return flag;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 降低用户的优先级
 /// </summary>
 /// <param name="simulationCarrier"></param>
 public override void DoSlowDownRate(SimulationCarrier simulationCarrier)
 {
     if (simulationCarrier.UlGBRUserPriorityDic.Count > 0)
     {
         foreach (int priority in simulationCarrier.UlGBRUserPriorityList)
         {
             float num2 = 1f;
             if ((((double) simulationCarrier.UlGBRUserPriorityDic[priority]) + 0.0001) > num2)
             {
                 //TODO:SimulationConstant.SERVICE_SLOWDOWN_RATE 是0.9.下面的dictionary的value值的意思是优先级对应的速率?
                 simulationCarrier.UlGBRUserPriorityDic[priority] = SimulationConstant.SERVICE_SLOWDOWN_RATE;
                 this.SetUserDegrateTime(simulationCarrier.UlDataServiceUserList, simulationCarrier.UlDataWaitUserList, priority);
             }
             else
             {
                 continue;
             }
         }
     }
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 为每个载波分配VOIP用户
 /// </summary>
 /// <param name="carrier"></param>
 private void DispatchVoipUserInCarrier(SimulationCarrier carrier)
 {
     VoipNumber number;
     int ulNumTarget;
     int dlNumTarget;
     this.m_CarrierVoipSteps.TryGetValue(carrier, out number);
     int ulNumCurrent = 0;
     int dlNumCurrent = 0;
     this.GetUserNumTarget(number, out ulNumTarget, out dlNumTarget);
     number.stepIndex++;
     for (int i = carrier.VoiceNewUserList.Count - 1; i >= 0; i--)
     {
         //如果上行和下行都满额了,那就不用再继续遍历下去了。VoiceNewUserList里面的用户只能等待下一个TTI再接入
         if ((ulNumCurrent >= ulNumTarget) && (dlNumCurrent >= dlNumTarget))
         {
             break;
         }
         ISimulationUser user = carrier.VoiceNewUserList[i];
         this.MoveVoipUserToList(carrier, user, ref ulNumCurrent, ref dlNumCurrent, ulNumTarget, dlNumTarget, i);
     }
 }
Ejemplo n.º 20
0
        //private Logger logger = new Logger(typeof(DlInterferenceModuling));
        //private NoisePowerCalculation noisePowerObj = new NoisePowerCalculation();

        //private void CalculateDlFirstNbrFreqIN(SimulationCarrier curCarrier, SimulationCarrier inCarrier, float dlTotalLoss, List<byte> rbList, List<float> userIN)
        //{
        //    float num;
        //    num = this.CalculatorUserCount(inCarrier) ? (num = inCarrier.RsRbPower * inCarrier.BandWidthRbNum) : inCarrier.TxPower;
        //    float num3 = (SimulationTools.CalculateFactor(inCarrier, curCarrier) * num) / dlTotalLoss;
        //    float num4 = num3 / ((float) inCarrier.BandWidthRbNum);
        //    for (int i = 0; i < rbList.Count; i++)
        //    {
        //        List<float> list;
        //        int num6;
        //        (list = userIN)[num6 = i] = list[num6] + num4;
        //    }
        //}

        //public List<float> CalculateDlFsIN(SimulationUser user, List<byte> rbList)
        //{
        //    List<float> userIN = new List<float>();
        //    float dlRBNoisePower = user.DlRBNoisePower;
        //    foreach (byte num2 in rbList)
        //    {
        //        userIN.Add(dlRBNoisePower);
        //    }
        //    SimulationCarrier bestServiceCarrier = user.BestServiceCarrier;
        //    for (int i = 1; i < user.CarrierListInComputeArea.Length; i++)
        //    {
        //        CarrierTotalLoss loss = user.CarrierListInComputeArea[i];
        //        SimulationCarrier carrier = loss.Carrier;
        //        float dlTotalLoss = loss.DlTotalLoss;
        //        this.CalculateDlINOneCarrier(bestServiceCarrier, carrier, dlTotalLoss, rbList, userIN);
        //    }
        //    return userIN;
        //}

        //private void CalculateDlINOneCarrier(SimulationCarrier curCarrier, SimulationCarrier inCarrier, float dlTotalLoss, List<byte> rbList, List<float> userIN)
        //{
        //    if (SimulationTools.isTheSameFreCell(inCarrier, curCarrier))
        //    {
        //        this.CalculateDlSameFreqIN(inCarrier, dlTotalLoss, rbList, userIN);
        //    }
        //    else if (SimulationTools.isTheFirstNbrFreCell(inCarrier, curCarrier))
        //    {
        //        this.CalculateDlFirstNbrFreqIN(curCarrier, inCarrier, dlTotalLoss, rbList, userIN);
        //    }
        //}

        //public float CalculateDlInterference(SimulationUser user)
        //{
        //    float totalLoss = 0f;
        //    float num2 = 0f;
        //    float num3 = 0f;
        //    float num4 = 0f;
        //    CarrierTotalLoss[] carrierListInComputeArea = user.CarrierListInComputeArea;
        //    for (int i = 1; i < carrierListInComputeArea.Length; i++)
        //    {
        //        CarrierTotalLoss loss = carrierListInComputeArea[i];
        //        SimulationCarrier otherCarrier = loss.Carrier;
        //        otherCarrier.TxPower = (otherCarrier.DlUserList.Count == 0) ? (otherCarrier.RsRbPower * otherCarrier.BandWidthRbNum) : otherCarrier.TxPower;
        //        totalLoss = loss.DlTotalLoss;
        //        if (SimulationTools.isTheSameFreCell(otherCarrier, user.BestServiceCarrier))
        //        {
        //            num2 += this.CalculateRxPower(otherCarrier.TxPower, totalLoss);
        //        }
        //        else if (SimulationTools.isTheFirstNbrFreCell(otherCarrier, user.BestServiceCarrier))
        //        {
        //            num4 = SimulationTools.CalculateFactor(otherCarrier, user.BestServiceCarrier);
        //            num2 += (otherCarrier.TxPower * num4) / totalLoss;
        //        }
        //    }
        //    num3 = user.CarrierListInComputeArea[0].Carrier.BandWidthRbNum * user.DlRBNoisePower;
        //    return (num2 + num3);
        //}

        public void CalculateDlInterference(SimulationCarrier simulationCarrier, SimulationUser simulationUser, float dlTotalLoss, ref float dlInterferenceBw, ref float dlInterferenceRe)
        {
            float num = 0f;
            float num2 = 0f;
            int num3 = 0;
            num3 = simulationUser.BestServiceCarrier.BandWidthRbNum * 12;
            num = SimulationTools.ConvertdBToLine(simulationCarrier.Carrier.MaxPower);
            if (SimulationTools.isTheSameFreCell(simulationCarrier, simulationUser.BestServiceCarrier))
            {
                /*干扰小区对目标小区在下行整个带宽上的干扰功率为干扰小区的最大发射功率发射减去
                 * 该干扰小区到被干扰用户的下行链路损耗*/
                dlInterferenceBw = num / dlTotalLoss;
                /*干扰小区对目标小区RE带宽级上的干扰功率为干扰小区对目标小区整个带宽上的干扰功
                 * 率乘以干扰小区的目标负载,再除以目标小区里的RE数目*/
                dlInterferenceRe = (dlInterferenceBw * simulationCarrier.Carrier.DlTargetLoad) / ((float) num3);
            }
            else if (SimulationTools.isTheFirstNbrFreCell(simulationCarrier, simulationUser.BestServiceCarrier))
            {
                num2 = SimulationTools.CalculateFactor(simulationCarrier, simulationUser.BestServiceCarrier);
                dlInterferenceBw = (num * num2) / dlTotalLoss;
                dlInterferenceRe = (dlInterferenceBw * simulationCarrier.Carrier.DlTargetLoad) / ((float) num3);
            }
        }
Ejemplo n.º 21
0
 private void CalaculateRbInOneCarrier(SimulationCarrier curCarrier, SimulationUser user, CarrierTotalLoss InCarrierTL, Dictionary<int, float[]> inDic, Dictionary<ISimulationCarrier, Dictionary<ISimulationCarrier, float>> carrierInDic, bool isICICPeriod)
 {
     
     float[] numArray;
     if (!inDic.TryGetValue(InCarrierTL.Carrier.ID, out numArray))
     {
         numArray = new float[InCarrierTL.Carrier.BandWidthRbNum];
         inDic.Add(InCarrierTL.Carrier.ID, numArray);
     }
     float rxPower = -1f;
     if (SimulationTools.isTheSameFreCell(InCarrierTL.Carrier, curCarrier))
     {
         this.CalIntraFreqInterference(user, InCarrierTL, numArray, ref rxPower);
     }
     else if (SimulationTools.isTheFirstNbrFreCell(InCarrierTL.Carrier, curCarrier))
     {
         this.CalNbrFreInterference(curCarrier, user, InCarrierTL, numArray, ref rxPower);
     }
     if (isICICPeriod && (rxPower > 0f))
     {
         float num2;
         Dictionary<ISimulationCarrier, float> dictionary;
         if (!carrierInDic.TryGetValue(InCarrierTL.Carrier, out dictionary))
         {
             dictionary = new Dictionary<ISimulationCarrier, float>();
             carrierInDic.Add(InCarrierTL.Carrier, dictionary);
         }
         if (!dictionary.TryGetValue(curCarrier, out num2))
         {
             num2 = 0f;
             dictionary.Add(curCarrier, num2);
         }
         num2 += rxPower;
         dictionary[curCarrier] = num2;
     }
 }
Ejemplo n.º 22
0
 public void CalcUserListPuschSinr(SimulationCarrier carrier, List<ISimulationUser> allUserList)
 {
     float num3 = 0f;
     float num4 = 0f;
     foreach (SimulationUser user in allUserList)
     {
         float num2 = SimulationTools.ConvertLineTodB(user.UlPathLoss);
         if (SimulationConstant.IS_NEW_PowerControl)//不懂
         {
             num4 = (user.OpenLoopPower + (SimulationConstant.ALPHA_PL * num2)) + user.CloseLoopPower;
         }
         else
         {
             num4 = (user.OpenLoopPower + num2) + user.CloseLoopPower;
         }
         num4 = Math.Min(num4, user.LTEUser.Terminal.NetTerminalList[0].MaxTxPower) - num2;
         int num = 1;
         num3 = SimulationTools.ConvertLineTodB(((float) num) / ((float) carrier.PuschRbNum)) + carrier.UlBwInMeasure;
         user.PuschSinr = num4 - num3;
         if (user.PuschSinr > 100f)
         {
         }
     }
 }
Ejemplo n.º 23
0
 public static bool isTheFirstNbrFreCell(SimulationCarrier otherCarrier, SimulationCarrier bestCarrier)
 {
     bool flag;
     if (!bestCarrier.FirstNbFreqCellDic.TryGetValue(otherCarrier.ID, out flag))
     {
         flag = (otherCarrier.Carrier.FreqBand.BandWidth == bestCarrier.Carrier.FreqBand.BandWidth) && (Math.Abs((float) (Math.Abs((float) (otherCarrier.BestStartFrequency - bestCarrier.BestStartFrequency)) - bestCarrier.Carrier.FreqBand.BandWidth)) < 0.0001);
         bestCarrier.FirstNbFreqCellDic.Add(otherCarrier.ID, flag);
     }
     return flag;
 }
Ejemplo n.º 24
0
 public void UpdateInterferenceCarrierList(SimulationCarrier carrier, Dictionary<ISimulationCarrier, float> inDic)
 {
     int num;
     List<int> list = new List<int>();
     for (num = 0; num < carrier.CarrierListInComputeArea.Count; num++)
     {
         float num2;
         SimulationCarrier key = carrier.CarrierListInComputeArea[num] as SimulationCarrier;
         inDic.TryGetValue(key, out num2);
         if (float.IsNaN(carrier.FilterInfInAreaCarrier[num]))
         {
             carrier.FilterInfInAreaCarrier[num] = num2;
         }
         else
         {
             carrier.FilterInfInAreaCarrier[num] = (SimulationConstant.ALPHA_CELL_INTERFERENCE * carrier.FilterInfInAreaCarrier[num]) + ((1f - SimulationConstant.ALPHA_CELL_INTERFERENCE) * num2);
         }
         list.Add(num);
     }
     list.Sort(delegate (int x, int y) {
         float num2 = carrier.FilterInfInAreaCarrier[y];
         return num2.CompareTo(carrier.FilterInfInAreaCarrier[x]);
     });
     /*把干扰某个Carrier的前N强干扰小区选出来,然后把这个Carrier加入这N强干扰小区的干扰链表中*/
     /*???*/
     for (num = 0; (num < SimulationConstant.UL_CELL_NBR_MAX) && (num < list.Count); num++)
     {
       
         (carrier.CarrierListInComputeArea[list[num]] as SimulationCarrier).InterferenceCarrierList.Add(carrier);
     }
 }
Ejemplo n.º 25
0
 /// <summary>
 /// 判断两个小区是否同频
 /// </summary>
 /// <param name="otherCarrier"></param>
 /// <param name="bestCarrier"></param>
 /// <returns></returns>
 public static bool isTheSameFreCell(SimulationCarrier otherCarrier, SimulationCarrier bestCarrier)
 {
     bool flag;
     if (!bestCarrier.SameFreqCellDic.TryGetValue(otherCarrier.ID, out flag))
     {
         flag = (otherCarrier.BestStartFrequency == bestCarrier.BestStartFrequency) && (otherCarrier.Carrier.FreqBand.BandWidth == bestCarrier.Carrier.FreqBand.BandWidth);
         bestCarrier.SameFreqCellDic.Add(otherCarrier.ID, flag);
     }
     return flag;
 }
Ejemplo n.º 26
0
 public static int GetRxNum(SimulationCarrier simuCarrier)
 {
     IACell carrier = simuCarrier.Carrier;
     if (simuCarrier.IsLTECell)
     {
         LTECell lteCarrier = carrier as LTECell;
         return lteCarrier.Parent.RxNumber;
     }
     else
     {
         RelayCell relayCarrier = carrier as RelayCell;
         return relayCarrier.ParentRN.RxNumber;
     }
 }
Ejemplo n.º 27
0
 //by hxl ,判断一个simulationcarrier是否为relayinbh
 public static bool IsRelayInBackhaul(SimulationCarrier simulationCarrier)
 {
     if (!simulationCarrier.IsLTECell && ((RelayCell)simulationCarrier.Carrier).IsInBackhaul)
     {
         return true;
     }
     return false;
 }
Ejemplo n.º 28
0
 public static string GetTransName(SimulationCarrier carrier)
 {
     if (carrier.IsLTECell)
     {
         LTECell lteCarrier = carrier.Carrier as LTECell;
         return lteCarrier.Parent.Name;
     }
     else
     {
         RelayCell relayCarrier = carrier.Carrier as RelayCell;
         return relayCarrier.ParentRN.Name;
     }
 }
Ejemplo n.º 29
0
 public static int GetTxNum(SimulationCarrier carrier)
 {
     if (carrier.IsLTECell)
     {
         LTECell lteCarrier = carrier.Carrier as LTECell;
         return lteCarrier.Parent.TxNumber;
     }
     else
     {
         RelayCell relayCarrier = carrier.Carrier as RelayCell;
         return relayCarrier.ParentRN.TxNumber;
     }
 }
Ejemplo n.º 30
0
 public static short GetSiteID(SimulationCarrier carrier)
 {
     if (carrier.IsLTECell)
     {
         LTECell lteCarrier = carrier.Carrier as LTECell;
         return lteCarrier.Parent.Parent.ID;
     }
     else
     {
         RelayCell relayCarrier = carrier.Carrier as RelayCell;
         return relayCarrier.ParentRN.ID;
     }
 }