Exemplo n.º 1
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;
     }
 }
Exemplo n.º 2
0
 private void CalIntraFreqInterference(SimulationUser user, CarrierTotalLoss InCarrierTL, float[] rbIn, ref float rxPower)
 {
     float ulTotalLoss = InCarrierTL.UlTotalLoss;
     rxPower = SimulationTools.ConvertdBToLine(user.UeTxPower) / ulTotalLoss;
     //每个Rb上的接收功率
     float num2 = rxPower / ((float) user.RbList.Count);
     //在user所对应的Rb上加上该干扰值
     foreach (byte num3 in user.RbList)
     {
         if ((num3) > 4)
             rbIn[0] += num2;
         else
             rbIn[num3] += num2;
     }
 }
Exemplo n.º 3
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;
     }
 }
Exemplo n.º 4
0
        public void MyTestInitialize()
        {
            m_DlHOService = new DlHandOverService(m_CurretTti,m_Sfth );
            m_ISourceCarrier = new SimulationCarrier();
            m_ITargetCarrier = new SimulationCarrier();
            m_NgbCaiirer = new SimulationCarrier();
            m_Carrier = new SimulationCarrier();
            m_User = new SimulationUser();
            m_User.LTEUser = new User();
            Service serv = new UnionPsService();
            m_User.LTEUser.Service = serv;
            m_NgbCarrierList = new List<ISimulationCarrier>();

            m_ISourceCarrier.AdmissionCarrierTag = new AdmissionCellTag();
            AdmissionCellTag adCellTag = m_ISourceCarrier.AdmissionCarrierTag as AdmissionCellTag;
            adCellTag.ULSourceOutThroughput = 100;
            m_Carrier.AdmissionCarrierTag = new AdmissionCellTag();


            m_NgbCaiirer.AdmissionCarrierTag = new AdmissionCellTag();
            AdmissionCellTag ngbCellTag = m_NgbCaiirer.AdmissionCarrierTag as AdmissionCellTag;
            ngbCellTag.ULTotalHOThroughput = 50;
            SimulationCarrier temp = m_NgbCaiirer as SimulationCarrier;
            temp.Carrier = new LTECell();

            m_LbUserList = new List<ISimulationUser>();
            SimulationUser user1 = new SimulationUser();
            SimulationUser user2 = new SimulationUser();

            m_LbUserList.Add(user1);
            m_LbUserList.Add(user2);
            m_NgbCarrierList.Add(m_NgbCaiirer);

            m_DlHOVoiceUserList = new List<ISimulationUser>();
            SimulationUser VUser1 = new SimulationUser();
            SimulationUser VUser2 = new SimulationUser();
            m_DlHOVoiceUserList.Add(VUser1);
            m_DlHOVoiceUserList.Add(VUser2);

            CarrierTotalLoss a=new CarrierTotalLoss ();
            
            SimulationCarrier carrier = new SimulationCarrier();
            carrier.IsLTECell = true;
            LTECell lteCell = new LTECell();
            lteCell.RSPower = 15f;
            carrier.Carrier = lteCell;
            CarrierTotalLoss b = new CarrierTotalLoss(carrier, 100f, 100f);
            //SimulationCarrier carrier1 = new SimulationCarrier();
            //b.Carrier = carrier1;
            List<CarrierTotalLoss> listCarrier = new List<CarrierTotalLoss>();
            listCarrier.Add(a);
            listCarrier.Add(b);
            a.Carrier = new SimulationCarrier();
            carrier.IsLTECell = false;
            RelayCell relayCell1 = new RelayCell();
            relayCell1.RSPower = 16f;
            a.Carrier.Carrier = relayCell1;
            b.Carrier = new SimulationCarrier();
            carrier.IsLTECell = false;
            RelayCell relayCell2 = new RelayCell();
            relayCell1.RSPower = 17f;
            b.Carrier.Carrier = relayCell2;
            m_User.BestServiceCellBeforeHandOver = a;
            m_User.StroNbrBeforeHandOver = b;
            user1.BestServiceCellBeforeHandOver = a;
            user1.StroNbrBeforeHandOver = b;
            user2.BestServiceCellBeforeHandOver = a;
            user2.StroNbrBeforeHandOver = b;

            

            user1.CarrierListInComputeArea = listCarrier.ToArray();
            user2.CarrierListInComputeArea = listCarrier.ToArray();
            m_User.CarrierListInComputeArea = listCarrier.ToArray();

            


            List<ISimulationUser> list = new List<ISimulationUser>();
            list.AddRange(m_LbUserList);

            RelayCell relaycarrier = new RelayCell();

            ((SimulationCarrier)m_NgbCaiirer).Carrier = relaycarrier;          
            ((SimulationCarrier)m_ISourceCarrier).Carrier = relaycarrier;
            ((SimulationCarrier)m_ITargetCarrier).Carrier = relaycarrier;
            
            user1.CarrierListInComputeArea[0].Carrier = carrier;
            user1.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            user2.CarrierListInComputeArea[0].Carrier = carrier;
            user2.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            m_User.CarrierListInComputeArea[0].Carrier = carrier;
            m_User.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            user1.CarrierListInComputeArea[1].Carrier = carrier;
            user1.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            user2.CarrierListInComputeArea[1].Carrier = carrier;
            user2.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            m_User.CarrierListInComputeArea[1].Carrier = carrier;
            m_User.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            //m_User.StroNbrBeforeHandOver.Carrier = carrier;
            relaycarrier.RSPower = 100;



            //m_User.StroNbrBeforeHandOver.Carrier = carrier;
            //m_User.BestServiceCellBeforeHandOver.Carrier = carrier;




            Huawei.UNet.Traffic.Map.Interface.User lteuser = new Huawei.UNet.Traffic.Map.Interface.User();
            user1.LTEUser = lteuser;
            user1.ID = 1;

            Huawei.UNet.Traffic.Interface.Terminal terminal = new Huawei.UNet.Traffic.Interface.Terminal();
            user1.LTEUser.Terminal = terminal;

            List<Huawei.UNet.Traffic.Interface.NetworkTerminal> netterminallist = new List<NetworkTerminal>();
            NetworkTerminal networkTerminal = new NetworkTerminal();
            LTETerminal lteterminal = new LTETerminal();
            netterminallist.Add(lteterminal);
            user1.LTEUser.Terminal.NetTerminalList = netterminallist;


            user1.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user1.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user1.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());


            user2.LTEUser = lteuser;
            user2.LTEUser.Terminal = terminal;
            user2.ID = 2;
            netterminallist.Add(lteterminal);
            user2.LTEUser.Terminal.NetTerminalList = netterminallist;
            user2.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user2.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user2.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());

            m_User.LTEUser = lteuser;
            m_User.ID = 0;
            m_User.LTEUser.Terminal = terminal;
            netterminallist.Add(lteterminal);
            m_User.LTEUser.Terminal.NetTerminalList = netterminallist;
            m_User.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());

            //Service service = new Service();
            //UnionPsService psservice = SimulationTools.GetUnionPsService(service);

            //psservice.DlOffset = 0;
            //psservice.DlTxEff = 1;
            //psservice.DlMinThroughputDemand = 0;
            //user1.LTEUser.Service = psservice;

        }
        public void MyTestInitialize()
        {
            m_NgbCarrierList = new List<ISimulationCarrier>();
            m_AdCarrier1 = new SimulationCarrier();
            m_AdCarrier2 = new SimulationCarrier();
            m_AdCarrier1.AdmissionCarrierTag = new AdmissionCellTag();
            m_AdCarrier2.AdmissionCarrierTag = new AdmissionCellTag();
            m_LbThresHoldParam = new LBThresholdParam();
                       
            m_SUser1 = new SimulationUser();
            m_SUser2 = new SimulationUser();
            m_SUser1.AdmissionUserTag = new SimulationUser();
            m_SUser2.AdmissionUserTag = new SimulationUser();
            
            m_AdmissionCarrier = new SimulationCarrier();
            LTECell ltecarrier = new LTECell();
            m_AdmissionCarrier.Carrier = ltecarrier;
            m_AdCarrier1.Carrier = ltecarrier;
            m_AdCarrier2.Carrier = ltecarrier;

            FrequencyBand freband = new FrequencyBand();
            freband.BandWidth = 100;
            ltecarrier.FreqBand = freband;
            m_AdmissionCarrier.AdmissionCarrierTag = new AdmissionCellTag();

            m_Lbth = new LBThresholdParam();
            m_DLLB = new DlLoadBalancingService(m_CurrentTTI, m_Lbth);

            m_LbUserList = new List<ISimulationUser>();
            m_User1 = new SimulationUser();
            m_User2 = new SimulationUser();
            m_LbUserList.Add(m_User1);
            m_LbUserList.Add(m_User2);

            m_DlDataWaitUserList = new List<ISimulationUser>();
            m_DlDataWaitUserList.Add(m_SUser1);
            m_DlDataWaitUserList.Add(m_SUser2);
            m_AdmissionCarrier.DlDataWaitUserList = m_DlDataWaitUserList;

            m_DlVoiceWaitUserList = new List<ISimulationUser>();
            m_DlVoiceWaitUserList.Add(m_SUser1);
            m_DlVoiceWaitUserList.Add(m_SUser2);
            m_AdmissionCarrier.DlVoiceWaitUserList = m_DlVoiceWaitUserList;
            
            m_NgbList = new List<ISimulationCarrier>();


            RelayCell relaycarrier = new RelayCell();
            LteAlgParam ltealgparam = new LteAlgParam();
            m_AdmissionCarrier.Carrier = relaycarrier;
            m_AdCarrier1.Carrier = relaycarrier;
            m_AdCarrier2.Carrier = relaycarrier;

            m_DlUserList = new List<ISimulationUser>();
            m_DlUserList.Add(m_SUser1);
            m_DlUserList.Add(m_SUser2);
            m_AdmissionCarrier.DlUserList = m_DlUserList;

            m_CarrierListInComputerArea = new CarrierTotalLoss();
            List<CarrierTotalLoss> listcarrier1 = new List<CarrierTotalLoss>();
            CarrierTotalLoss a = new CarrierTotalLoss();
            CarrierTotalLoss b = new CarrierTotalLoss();
            listcarrier1.Add(a);
            listcarrier1.Add(b);
            
            SimulationCarrier carrier = new SimulationCarrier();
            ((SimulationUser)m_SUser1).CarrierListInComputeArea = listcarrier1.ToArray();
            ((SimulationUser)m_SUser2).CarrierListInComputeArea = listcarrier1.ToArray();

            ((SimulationUser)m_SUser1).CarrierListInComputeArea[0].Carrier = carrier;
            ((SimulationUser)m_SUser2).CarrierListInComputeArea[0].Carrier = carrier;
            ((SimulationUser)m_SUser1).CarrierListInComputeArea[1].Carrier = carrier;
            ((SimulationUser)m_SUser2).CarrierListInComputeArea[1].Carrier = carrier;

            ((SimulationUser)m_SUser1).CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            ((SimulationUser)m_SUser2).CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            ((SimulationUser)m_SUser1).CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            ((SimulationUser)m_SUser2).CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;

            m_User1.CarrierListInComputeArea = listcarrier1.ToArray();
            m_User2.CarrierListInComputeArea = listcarrier1.ToArray();

            m_User1.CarrierListInComputeArea[0].Carrier = carrier;
            m_User2.CarrierListInComputeArea[0].Carrier = carrier;
            m_User1.CarrierListInComputeArea[1].Carrier = carrier;
            m_User2.CarrierListInComputeArea[1].Carrier = carrier;

            m_User1.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            m_User2.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            m_User1.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            m_User2.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;



            m_User1.BestServiceCellBeforeHandOver = a;
            m_User1.StroNbrBeforeHandOver = b;
            m_User2.BestServiceCellBeforeHandOver = a;
            m_User2.StroNbrBeforeHandOver = b;


            m_CarrierListInComputerArea.Carrier = carrier;
            relaycarrier.RSPower = 100;

            

        }
Exemplo n.º 6
0
 /// <summary>
 /// 邻频干扰
 /// </summary>
 private void CalNbrFreInterference(SimulationCarrier carrier, SimulationUser user, CarrierTotalLoss CarrierBeInterf, float[] interfToOneCell, ref float rxPower)
 {
     float ulTotalLoss = CarrierBeInterf.UlTotalLoss;
     float ACIR = SimulationTools.CalculateFactor(CarrierBeInterf.Carrier, carrier);
     rxPower = (ACIR * SimulationTools.ConvertdBToLine(user.UeTxPower)) / ulTotalLoss;
     float Interf = rxPower / ((float)carrier.BandWidthRbNum);
     for (int i = 0; i < carrier.BandWidthRbNum; i++)
     {
         interfToOneCell[i] += Interf;
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// 返回计算区域内的小区中参考信号接收功率的最大值
 /// </summary>
 /// <param name="carrierListInComputeArea"></param>
 /// <returns></returns>
 public float GetStrongNgbRSRP(CarrierTotalLoss[] carrierListInComputeArea)
 {
     float maxRSRP = carrierListInComputeArea[1].Carrier.RSPower - SimulationTools.ConvertLineTodB(carrierListInComputeArea[1].DlTotalLoss);
     for (int i = 1; i < carrierListInComputeArea.Length; i++)
     {
         float tempRSRP = carrierListInComputeArea[i].Carrier.RSPower - SimulationTools.ConvertLineTodB(carrierListInComputeArea[i].DlTotalLoss);
         if (maxRSRP < tempRSRP)
         {
             maxRSRP = tempRSRP;
         }
     }
     return maxRSRP;
 }
Exemplo n.º 8
0
 /// <summary>
 /// 同频干扰
 /// </summary>
 private void CalIntraFreqInterference(SimulationUser user, CarrierTotalLoss CarrierBeInterf, float[] interfToOneCell, ref float rxPower)
 {
     float ulTotalLoss = CarrierBeInterf.UlTotalLoss;
     rxPower = SimulationTools.ConvertdBToLine(user.UeTxPower) / ulTotalLoss;
     //每个RB上的接收功率
     float interf = rxPower / ((float)user.RbList.Count);
     //在user所对应的RB上加上该干扰值
     foreach (byte rb in user.RbList)
     {
         interfToOneCell[rb] += interf;
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// 计算一个上行用户对一个上行simulationcarrier的主动干扰
 /// </summary>
 /// <param name="carrier">产生干扰的用户的bestserver</param>
 /// <param name="CarrierBeInterf">被干扰小区</param>
 /// <param name="user">产生干扰的小区</param>
 /// <param name="inDic">干扰字典,key为小区的ID,value为当前rb上的干扰</param>
 /// <param name="carrierInDic">key为被干扰小区,value为一个dictionary,是每一个carrier对其产生的干扰</param>
 /// <param name="isICICPeriod"></param>
 private void CalculateInterfOfOneUserToOneCell(SimulationCarrier carrier, CarrierTotalLoss CarrierBeInterf, SimulationUser user, Dictionary<int, float[]> inDic, Dictionary<ISimulationCarrier, Dictionary<ISimulationCarrier, float>> carrierInDic, bool isICICPeriod)
 {//用户主动去干扰
     float[] interfArrayToOneCell;
     if (!inDic.TryGetValue(CarrierBeInterf.Carrier.ID, out interfArrayToOneCell)) //因为有很多user所以要先看看是不是已经存在了
     {//inDic存放的为对应的被干扰小区在每个RB上受到的干扰
         interfArrayToOneCell = new float[CarrierBeInterf.Carrier.BandWidthRbNum];
         //此处待商议:是否应该用puschrbnum?
         inDic.Add(CarrierBeInterf.Carrier.ID, interfArrayToOneCell);
     }
     float rxPower = -1f;
     if (SimulationTools.isTheSameFreCell(CarrierBeInterf.Carrier, carrier))
     {
         //CarrierBeInterf:被干扰小区,numArray:用户在其使用的每个RB上对被干扰小区的干扰
         //user:产生干扰的用户
         this.CalIntraFreqInterference(user, CarrierBeInterf, interfArrayToOneCell, ref rxPower);
     }
     else if (SimulationTools.isTheFirstNbrFreCell(CarrierBeInterf.Carrier, carrier))
     {
         this.CalNbrFreInterference(carrier, user, CarrierBeInterf, interfArrayToOneCell, ref rxPower);
     }
     if (isICICPeriod && (rxPower > 0f)) //?
     {
         float interf;
         Dictionary<ISimulationCarrier, float> dictionary;
         if (!carrierInDic.TryGetValue(CarrierBeInterf.Carrier, out dictionary))
         {
             dictionary = new Dictionary<ISimulationCarrier, float>();
             carrierInDic.Add(CarrierBeInterf.Carrier, dictionary);
         }//carrierInDic第一个carrier存放的为被干扰小区,第二个dictionary存的是每个干扰小区对它产生的干扰
         if (!dictionary.TryGetValue(carrier, out interf))
         {
             interf = 0f;
             dictionary.Add(carrier, interf);
         }
         interf += rxPower;
         dictionary[carrier] = interf;
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// 整个带宽上:"下行单用户"受到"上行小区"的干扰(系统不计Relay!)
        /// </summary>
        /// <param name="userBeInterf">被干扰的下行用户</param>
        /// <param name="loss">产生干扰的上行小区</param>
        /// <returns>interf</returns>
        private float CalculateDLBandwithInterfOfOneUser(SimulationUser userBeInterf, CarrierTotalLoss loss)
        {
            //line-429
            SimulationCarrier otherCarrier = loss.Carrier;
            List<ISimulationUser> interfUserlist = m_CarrierAndUserDic[otherCarrier];
            float totalInterf = 0f;
            //--------------2014/10/13----------------------//
            //"foreach"新改动应不计Relay,此处暂且先用原来的,待修改(去掉Relay)...
            //foreach (SimulationUser interfUser in interfUserlist)
            //{
            //    float pathloss = float.MaxValue;
            //    if (interfUser.IsRelayUser && !userBeInterf.IsRelayUser) //上行relay对下行lteuser的干扰,路损取下行
            //    {
            //        foreach (CarrierTotalLoss lossBeInterf in userBeInterf.CarrierListInComputeArea)
            //        {
            //            if ((lossBeInterf.Carrier.Carrier as RelayCell) == interfUser.RelayUser)
            //            {
            //                pathloss = lossBeInterf.DlTotalLoss;
            //            }
            //        }
            //    }
            //    else if (!interfUser.IsRelayUser && userBeInterf.IsRelayUser)//上行user对下行relay的干扰,路损取上行
            //    {
            //        foreach (CarrierTotalLoss Interfloss in interfUser.CarrierListInComputeArea)
            //        {
            //            if ((Interfloss.Carrier.Carrier as RelayCell) == userBeInterf.RelayUser)
            //            {
            //                pathloss = Interfloss.UlTotalLoss;
            //            }
            //        }
            //    }
            //    foreach (byte RB in userBeInterf.RbList)
            //    {
            //        if (interfUser.RbList.Contains(RB))
            //        {
            //            totalInterf += interfUser.UeTxPower / interfUser.RbList.Count / pathloss;
            //        }
            //    }
            //}

            //-----------------2011/04/27-------------------------//
            //foreach (byte RB in user.RbList)
            //{
            //    foreach (SimulationUser interfUser in interfUserlist)
            //    {
            //        if (interfUser.RbList.Contains(RB))
            //        {
            //            totalInterf += interfUser.UeTxPower / interfUser.RbList.Count; //待细化,区分各种ue及路损
            //        }
            //    }
            //}            
            //-----------------2011/05/06-------------------------//
            foreach (SimulationUser interfUser in interfUserlist)
            {
                if (interfUser.IsRelayUser && userBeInterf.IsRelayUser)
                {
                    totalInterf += 0f; //relay对relay的干扰不计算
                }
                else if (!interfUser.IsRelayUser && !userBeInterf.IsRelayUser)
                {
                    totalInterf += 0f;
                }
                else if (interfUser.IsRelayUser && !userBeInterf.IsRelayUser) //上行relay对下行lteuser的干扰,路损取下行
                {
                    float txPower = interfUser.UeTxPower;
                    float dlLoss = float.MaxValue;
                    foreach (CarrierTotalLoss lossBeInterf in userBeInterf.CarrierListInComputeArea)
                    {
                        if ((lossBeInterf.Carrier.Carrier as RelayCell) == interfUser.RelayUser)
                        {
                            dlLoss = lossBeInterf.DlTotalLoss;
                        }
                    }
                    totalInterf += GetRBInterf(interfUser, userBeInterf, dlLoss);
                }
                else //上行user对下行relay的干扰,路损取上行
                {
                    float txPower = interfUser.UeTxPower;
                    float ulLoss = float.MaxValue;
                    foreach (CarrierTotalLoss Interfloss in interfUser.CarrierListInComputeArea)
                    {
                        if ((Interfloss.Carrier.Carrier as RelayCell) == userBeInterf.RelayUser)
                        {
                            ulLoss = Interfloss.UlTotalLoss;
                        }
                    }
                    totalInterf += GetRBInterf(interfUser, userBeInterf, ulLoss); //此处不应该除以User.RbList.Count
                }
            }
            return totalInterf;
        }
Exemplo n.º 11
0
 /// <summary>
 /// 计算TDD下行用户受到的其他上行小区的干扰--(此处系统不计Relay!)
 /// </summary>
 /// <param name="user">被干扰的用户</param>
 /// <param name="loss">产生干扰的小区,这个loss是user到产生干扰的小区(loss.carrier)的路损,但是取的
 ///                    时候由于是上行干扰,因此要找到该loss.carrier下面的user的路损</param>
 /// <returns>产生的干扰</returns>
 private float GetULInterfForTDD(SimulationUser user, CarrierTotalLoss loss)
 {
     SimulationCarrier interfCarrier = loss.Carrier;
     float interf = 0f;
     //(系统不计Relay)默认普通下行LTEuser
     if (interfCarrier.IsLTECell)
     {
         interf = CalculateInterfFromULLTECellToLTEUser(user, interfCarrier); //计算一个处于上行的LTECell对一个下行的LTEUser产生的干扰,不考虑ue对ue的干扰
     }
     return interf;
 }
Exemplo n.º 12
0
 /// <summary>
 /// 计算TDD下行用户受到的其他下行小区的干扰
 /// </summary>
 private float GetDLInterfForTDD(CarrierTotalLoss loss, SimulationUser user, Dictionary<ISimulationCarrier, float[]> rbTxPowerDic)
 {
     float dlTotalLoss = loss.DlTotalLoss;
     SimulationCarrier otherCarrier = loss.Carrier;
     float PDSCHTxPowerOfInterfCell = 0f;
     float rBRSPower;
     PDSCHTxPowerOfInterfCell = rbTxPowerDic[otherCarrier][otherCarrier.BandWidthRbNum];
     //计算的是整个带宽上的干扰,因此取干扰小区的全部发射功率
     if (SimulationTools.isTheSameFreCell(otherCarrier, user.BestServiceCarrier))
     {// 1.如果是同频邻小区
         PDSCHTxPowerOfInterfCell /= (float)otherCarrier.BandWidthRbNum;
         rBRSPower = this.GetRBRSPower(otherCarrier); //在文档末尾自定义函数GetRBRSPower
         return (PDSCHTxPowerOfInterfCell + rBRSPower) / dlTotalLoss;
     }
     else if (SimulationTools.isTheFirstNbrFreCell(otherCarrier, user.BestServiceCarrier))
     {// 2.如果是第一邻频小区,多乘一个ACIR
         float ACIR = SimulationTools.CalculateFactor(otherCarrier, user.BestServiceCarrier);
         PDSCHTxPowerOfInterfCell /= (float)otherCarrier.BandWidthRbNum;
         rBRSPower = this.GetRBRSPower(otherCarrier);
         return (ACIR * (PDSCHTxPowerOfInterfCell + rBRSPower)) / dlTotalLoss;
     }
     return 0f;
 }