Exemple #1
0
        public static UMTSSimCell CreatUMTSSimCell(double x,double y)
        {
            IACell cell = new UMTSCell();
            Transceiver trans = new Transceiver();
            Site site = new Site();
            List<UMTSSimUser> serverdUserList = new List<UMTSSimUser>();
            serverdUserList.Add(MockUser.CreatUMTSPSUser());
            site.X = x;
            site.Y = y;
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 3;
            cell.Parent = trans;
            trans.Parent = site;

            UMTSSimCell simCell = new UMTSSimCell(cell);
            simCell.NECell.PilotPower = 33f;
            simCell.NECell.FreqBand.BandWidth = 3f;
            simCell.DlFrequency = 2100f;
            simCell.UlFrequency = 2000f;
            simCell.GSMInterfCells = InitialGSMInterfCell();
            simCell.TDInterfCells = InitialTDInterfCell();
            simCell.ServerdHSUPAUser = serverdUserList;
            simCell.ULCENum = 15;
            simCell.TotalNoiserThreshold = 10;
            return simCell;
        }
 public void CalculateRxPower_Test2()
 {
     IACell cell = new UMTSCell();
     float linkLoss = 112;
     double result = m_GSMCellCalculator.CalculateRxPower(cell, m_Point, linkLoss);
     Assert.AreEqual(double.NegativeInfinity, result);
 }
Exemple #3
0
 private double CalcAdjecentCellInterf(UMTSCell umtsInterfCell, UMTSCell bestCell, float dlLinkLoss)
 {
     double interf = 0;
     FrequencyRelationType type = GetFrequencyRelation(bestCell, umtsInterfCell, bestCell.ChannelIndex, umtsInterfCell.ChannelIndex);
     if (type == FrequencyRelationType.SameFrequency)
     {
         interf = UnitTrans.dBmTomw(umtsInterfCell.TotalPower - dlLinkLoss);
     }
     else if (type == FrequencyRelationType.FirstNeighbour)
     {
         double ACIR1 = (double)m_IInterf.findACIR(umtsInterfCell.FreqBand.DLFrequency, umtsInterfCell.FreqBand.BandWidth);
         if (!double.IsNaN(ACIR1))
         {
             interf = UnitTrans.dBmTomw(umtsInterfCell.TotalPower - dlLinkLoss - ACIR1);
         }
     }
     else if (type == FrequencyRelationType.SecondNeighbour)
     {
         double ACIR2 = (double)m_IInterf.findACIR2(umtsInterfCell.FreqBand.DLFrequency, umtsInterfCell.FreqBand.BandWidth);
         if (!double.IsNaN(ACIR2))
         {
             interf = UnitTrans.dBmTomw(umtsInterfCell.TotalPower - dlLinkLoss - ACIR2);
         }
     }
     return interf;
 }
Exemple #4
0
        public static void InitCellList(List<IACell> cellList)
        {
            UMTSCell bestCell = new UMTSCell();
            bestCell.FreqBand = new FrequencyBand();
            bestCell.FreqBand.BandWidth = 5f;
            bestCell.FreqBand.DLFrequency = 1900f;
            bestCell.FreqBand.StartChIndex = 0;
            bestCell.ChannelIndex = 0;
            bestCell.ID = 0;

            UMTSCell interfCell = new UMTSCell();
            interfCell.FreqBand = new FrequencyBand();
            interfCell.FreqBand.BandWidth = 5f;
            interfCell.FreqBand.DLFrequency = 1900f;
            interfCell.FreqBand.StartChIndex = 0;
            interfCell.ChannelIndex = 0;
            interfCell.ID = 1;

            IACell interfCell2 = new GSMTRX();
            interfCell2.FreqBand = new FrequencyBand();
            interfCell2.FreqBand.BandWidth = 0.2f;
            interfCell2.FreqBand.DLFrequency = 1905f;
            interfCell2.FreqBand.StartChIndex = 0;
            interfCell2.ChannelIndex = 0;
            interfCell2.ID = 2;

            cellList.Add(bestCell);
            cellList.Add(interfCell);
            cellList.Add(interfCell2);
        }
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "HandOverArea";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case =new HandOverAreaCase() ;
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            UMTSPredictionGroup group = new UMTSPredictionGroup();
            group.HandoverAreaThreshold = 3;
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            group.UIParam.HOGate = 5f;
            UnionCsService service = new UnionCsService();
            Service umtsService = new UMTSService();
            service.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.CsService = service;
            group.TrafficTerminal = new Terminal();
            group.TrafficTerminal.NetTerminalList.Add(new NetworkTerminal());

            #region 文件存储
            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerRSCP);
            string relativePathRSCP = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerRSCP);
            ShortResultStruct srsID = ShortResultStruct.DefaultMin;
            ShortResultStruct srsRSCP = ShortResultStruct.DefaultMax;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_BestServerRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathRSCP, relativePathRSCP, srsRSCP);
            #endregion

            m_BestServerID[0] = 0;
            
            for (int i = 0; i < 2; i++)
            {
                IACell cell = new UMTSCell();
                cellList.Add(cell);
            }
            double[] x = new double[2] { 50, 100 };
            double[] y = new double[2] { 50, 100 };
            MockCellList.CreateCellList(cellList, x, y);

            #region 把数据加入Context
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.UmtsBestServerCellID, m_BestServerID);
            m_Context.Add(ContextKeys.UmtsBestServerRSCP, m_BestServerRSCP);
            m_Context.Add(ContextKeys.CellList, cellList);
            #endregion

            m_Case.Name = m_Name;
            m_Case.InitialCase(m_Context);
            
        }
Exemple #6
0
 private double CalcIneerSystemInterf(UMTSCell umtsInterfCell, UMTSCell bestCell, float dlLinkLoss)
 {
     double interf = 0;
     if (!object.ReferenceEquals(umtsInterfCell, bestCell))
     {
         interf = CalcAdjecentCellInterf(umtsInterfCell, bestCell, dlLinkLoss);
     }
     return interf;
 }
Exemple #7
0
 public UMTSCellNeighborForm(UMTSCell umtsCell, CollectionsModel model)
 {
     this.InitializeComponent();
     this.m_curUMTSCell = umtsCell;
     this.m_UMTSColl = model.UMTSCellColl;
     manager = new ComponentResourceManager(typeof(UMTSCellNeighborForm));
     this.dgvInter.UncheckedColHeaderText = (List<string>)manager.GetObject("dgvNeighborsListDiff.UncheckedColHeaderText");
     this.dgvInterTechnology.UncheckedColHeaderText = (List<string>)manager.GetObject("dataGridViewBase1.UncheckedColHeaderText");
 }
Exemple #8
0
 //构造使用CS业务的UMTS用户
 public static UMTSSimUser CreateUMTSSimUser_CS()
 {
     IACell cell = new UMTSCell();
     User user = CreateUser_CS();
     UMTSSimUser umtsSimuser = new UMTSSimUser(user);
     umtsSimuser.MaxRSCPCell = new UMTSSimCell(cell);
     umtsSimuser.TrafficUser = new User();
     umtsSimuser.TrafficUser.Service = new UnionCsService();
     return umtsSimuser;
 }
Exemple #9
0
 /// <summary>
 /// 计算得到BestServer
 /// </summary>
 /// <param name="modelList"></param>
 private void GetBestServer(List<RxPowerAndLinkLossModel> modelList)
 {
     foreach (RxPowerAndLinkLossModel model in modelList)
     {
         if (model.RxPower > m_RxPower)
         {
             m_RxPower = model.RxPower;
             m_BestServer = (UMTSCell)model.Cell;
         }
     }
 }
Exemple #10
0
        public double CalcInterf(UMTSCell bestCell, IACell interfCell, float dlLinkLoss)
        {
            double interf = 0;
            UMTSCell umtsInterfCell = interfCell as UMTSCell;
            if (umtsInterfCell != null)
            {
                interf = CalcIneerSystemInterf(umtsInterfCell, bestCell, dlLinkLoss);

            }
            else
            {
                interf = CalcOtherSystemInterf(interfCell, bestCell, dlLinkLoss);
            }
            return interf;
        }
Exemple #11
0
 private List<ISimCellBase> InitialUmtsInterfCell()
 {
     List<ISimCellBase> umtsInterfCellList = new List<ISimCellBase>();
     Site site = new Site();
     BtsEquipment equipment = new BtsEquipment();
     equipment.NoiseFigure = 8f;
     site.Equipment = equipment;
     Transceiver tran = new Transceiver();
     tran.Parent = site;
     IACell aCell = new UMTSCell();
     aCell.Parent = tran;
     UMTSSimCell umtsInterfCell = new UMTSSimCell(aCell);
     umtsInterfCell.Cell.FreqBand.BandWidth = 5f;
     umtsInterfCell.DlFrequency = 1805.1f;
     umtsInterfCell.DlPower = 40;
     umtsInterfCellList.Add(umtsInterfCell);
     return umtsInterfCellList;
 }
Exemple #12
0
        public void MyTestInitialize()
        {
            m_Case = new BestServerCase();
            m_Context = new Context();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);

            m_cellList = new List<IACell>();
            for (int i = 0; i < 3; i++)
            {
                IACell cell = new UMTSCell();
                m_cellList.Add(cell);
            }
            double[] x = new double[3] { 50, 100, 150 };
            double[] y = new double[3] { 50, 100, 50 };
            MockCellList.CreateCellList(m_cellList, x, y);

            m_pg = new UMTSPredictionGroup();
            m_pg.Region = MockRegion.CreateRegion();
            m_pg.Region.Name = "region1";
            m_pg.Name = "UMTSPredictionGroup1";
            UnionCsService service = new UnionCsService();
            Service umtsService = new UMTSService();
            service.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            m_pg.CsService = service;
            m_pg.TrafficTerminal = new Terminal();
            m_pg.TrafficTerminal.NetTerminalList.Add(new NetworkTerminal());

            m_index = 0;
            LinkLossAssist.Init();

            m_Context.Add(ContextKeys.Group, m_pg);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Case.InitialCase(m_Context);

            for (int i = 0; i < 3; i++)
            {
                m_Context.Add(ContextKeys.CurrentCalcCell, m_cellList[i]);
                m_Case.Run(m_index, m_Context);
                m_Context.Remove(ContextKeys.CurrentCalcCell);
            }
        }
Exemple #13
0
 public void CopyForm(UMTSCell cell)
 {
     base.CopyFrom(cell);
     this.CellType = cell.CellType;
     this.PilotPower = cell.PilotPower;
     this.MaxHSDPAUser = cell.MaxHSDPAUser;
     this.MaxHSUPAUser = cell.MaxHSUPAUser;
     this.MaxCodeUnit = cell.MaxCodeUnit;
     this.SHOTHreshold = cell.SHOTHreshold;
     this.SHOReservedRatio = cell.SHOReservedRatio;
     this.MaxULLoad = cell.MaxULLoad;
     this.MaxNumberOfCellsNeighbours = cell.MaxNumberOfCellsNeighbours;
     this.MaxNoiseRise = cell.MaxNoiseRise;
     this.CCHPower = cell.CCHPower;
     this.DynHSDPAPower = cell.DynHSDPAPower;
     this.AvailableHSDPAPower = cell.AvailableHSDPAPower;
     this.NumberOfHSSCCHChannels = cell.NumberOfHSSCCHChannels;
     this.HSDPAMaxCodes = cell.HSDPAMaxCodes;
     this.HSDPAMinCodes = cell.HSDPAMinCodes;
     this.MaxDLLoad = cell.MaxDLLoad;
     this.ULRakeFactor = cell.ULRakeFactor;
     this.ULRb = cell.ULRb;
     this.DLRb = cell.DLRb;
     this.TotalPower = cell.TotalPower;
     this.HSSCCHPower = cell.HSSCCHPower;
     this.IsSupportHSPAAdvanced = cell.IsSupportHSPAAdvanced;
     this.PowerAllocationRatio = cell.PowerAllocationRatio;
     this.HSDPACodeAllocation = cell.HSDPACodeAllocation;
     this.CodeAllocationRatio = cell.CodeAllocationRatio;
     this.ULLoadFactor = cell.ULLoadFactor;
     this.ULLoadToUPA = cell.ULLoadToUPA;
     this.RNCID = cell.RNCID;
     this.LAC = cell.LAC;
     this.ScramblingCode = cell.ScramblingCode;
     this.ScramblingCodeReuseDistance = cell.ScramblingCodeReuseDistance;
     this.ScramblingCodeReuseTier = cell.ScramblingCodeReuseTier;
     this.ForbiddenScramblingCode = cell.ForbiddenScramblingCode;
     this.InterList = cell.InterList;
     this.IntraList = cell.IntraList;
     this.InterTechnology = cell.InterTechnology;
 }
Exemple #14
0
 private FrequencyRelationType GetFrequencyRelation(UMTSCell bestCell, UMTSCell umtsInterfCell, int sourceChannelIndex, int targetChannelIndex)
 {
     bool isSameFrequency = JudgeFrequency(bestCell, umtsInterfCell, sourceChannelIndex, targetChannelIndex, FrequencyRelationType.SameFrequency);
     if (isSameFrequency)
     {
         return FrequencyRelationType.SameFrequency;
     }
     bool isFirstNeighbourFreq = JudgeFrequency(bestCell, umtsInterfCell, sourceChannelIndex, targetChannelIndex, FrequencyRelationType.FirstNeighbour);
     if (isFirstNeighbourFreq)
     {
         return FrequencyRelationType.FirstNeighbour;
     }
     bool isSecondNeighbourFreq = JudgeFrequency(bestCell, umtsInterfCell, sourceChannelIndex, targetChannelIndex, FrequencyRelationType.SecondNeighbour);
     if (isSecondNeighbourFreq)
     {
         return FrequencyRelationType.SecondNeighbour;
     }
     else
     {
         return FrequencyRelationType.Non;
     }
 }
Exemple #15
0
 private FrequencyRelationType JudgeFreqBandRelationship(IACell interfCell, UMTSCell bestCell, int interfChannelIndex)
 {
     double UMTSBandWith = 3.84f;
     double bestStartFreq = bestCell.FreqBand.DLFrequency + bestCell.FreqBand.BandWidth * (bestCell.ChannelIndex + 0.5) - UMTSBandWith * 0.5;
     double bestEndFreq = bestStartFreq + UMTSBandWith;
     double interfStartFreq = 0;
     double interfEndFreq = 0;
     if (interfCell.NetType == NetWorkType.GSM)
     {
         interfStartFreq = interfCell.FreqBand.DLFrequency + interfCell.FreqBand.BandWidth * (interfChannelIndex - 0.5);
         interfEndFreq = interfStartFreq + interfCell.FreqBand.BandWidth;
     }
     else
     {
         interfStartFreq = interfCell.FreqBand.DLFrequency + interfCell.FreqBand.BandWidth * interfChannelIndex;
         interfEndFreq = interfStartFreq + interfCell.FreqBand.BandWidth;
     }
     if (bestStartFreq >= interfStartFreq && bestEndFreq <= interfEndFreq)
     {
         return FrequencyRelationType.InnerOfInterfFreq;
     }
     else if (interfStartFreq >= bestStartFreq && interfEndFreq <= bestEndFreq)
     {
         return FrequencyRelationType.InnerOfBestFreq;
     }
     else if (bestEndFreq <= interfStartFreq || bestEndFreq >= interfEndFreq)
     {
         return FrequencyRelationType.OutOfInterfFreq;
     }
     else
     {
         return FrequencyRelationType.Non;
     }
 }
Exemple #16
0
 private bool IsNeedCalc(int index)
 {
     if (m_BestCellIDMatrix[index] == m_BestCellIDMatrix.InvalidValue)
         return false; 
     IACell bestCell = SearchAssist.GetCellbyID(m_BestCellIDMatrix[index], m_CellList);
     m_BestCell = bestCell as UMTSCell;
     bool isCellSuit = (m_BestCell.CellType == CarrierTypeOfUMTS.HSDPA || m_BestCell.CellType == CarrierTypeOfUMTS.R99AndHSDPA);
     bool isTerminalSuit = m_UMTSTerminal.EnableHsdpa;
     bool isServiceSuit = IsServiceSupportHSDPA(m_PredictionGroup);
     return m_BestCell != null && isCellSuit && isTerminalSuit && isServiceSuit;
 }
Exemple #17
0
 /// <summary>
 /// 计算主服务小区对该点的接收功率
 /// </summary>
 /// <param name="currentCalcCell"></param>
 /// <returns></returns>
 private static float GetSourceRxPower(UMTSCell currentCalcCell)
 {
     float orthogonalPower = 0;
     double pilotPower = UnitTrans.dBmTomw(currentCalcCell.PilotPower);
     double cchPower = UnitTrans.dBmTomw(currentCalcCell.CCHPower);
     if (currentCalcCell.CellType == CarrierTypeOfUMTS.HSDPA)
     {
         return (float)UnitTrans.mwTodBm(AddPowerTomw(currentCalcCell.PilotPower,currentCalcCell.CCHPower,currentCalcCell.HSSCCHPower));
     }
     else
     {
         orthogonalPower = (float)(UnitTrans.dBmTomw(currentCalcCell.MaxPower) * currentCalcCell.MaxDLLoad - pilotPower - cchPower) * (1 - m_OrthoFactor);
         return (float)UnitTrans.mwTodBm(pilotPower + cchPower + orthogonalPower);
     }
 }
Exemple #18
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "CPICHSINR";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new CPICHSINRCase();
            cellList = new List<IACell>();

            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            UMTSPredictionGroup group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            UnionCsService service = new UnionCsService();
            Service umtsService = new UMTSService();
            service.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.CsService = service;
            group.TrafficTerminal = new Terminal();
            List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            terminalList.Add(tempTerminal);
            group.TrafficTerminal.NetTerminalList = terminalList;

            for (int i = 0; i < 3; i++)
            {
                IACell cell = new UMTSCell();
                cellList.Add(cell);
            }
            double[] x = new double[3] { 50, 100, 150 };
            double[] y = new double[3] { 50, 100, 50 };
            MockCellList.CreateCellList(cellList, x, y);

            IACell m_cell = cellList[1];
            m_cell.FreqBand.BandWidth = 3.84f;

            LinkLossAssist.Init();
            string absolutePathID = ResultFilePath.CreateFilePath(@"..\bin\debug\", group.Name,
                group.Region.Name, UMTSStudyName.Best_Server);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name,
                group.Region.Name, UMTSStudyName.Best_Server);
            string absolutePathRSCP = ResultFilePath.CreateFilePath(@"..\bin\debug\", group.Name,
                group.Region.Name, UMTSStudyName.CPICH_RSCP);
            string relativePathRSCP = ResultFilePath.CreateRelativePath(group.Name,
                group.Region.Name, UMTSStudyName.CPICH_RSCP);
            string absolutePathdlInterf = ResultFilePath.CreateFilePath(@"..\bin\debug\", group.Name,
                group.Region.Name, ContextKeys.UmtsDLInterf);
            string relativePathdlInterf = ResultFilePath.CreateRelativePath(group.Name,
                group.Region.Name, ContextKeys.UmtsDLInterf);
            string absolutePathUERSSI = ResultFilePath.CreateFilePath(@"..\bin\debug\", group.Name,
                group.Region.Name, UMTSStudyName.UE_RSSI);
            string relativePathUERSSI = ResultFilePath.CreateRelativePath(group.Name,
                group.Region.Name, UMTSStudyName.UE_RSSI);
            bestServerID = new ValueMatrixShort(absolutePathID, relativePathID, 4, 4);
            bestServerRSCP = new ValueMatrixShort(absolutePathRSCP, relativePathRSCP, 4, 4);
            dlInterf = new ValueMatrixDouble(absolutePathdlInterf, relativePathdlInterf, 4, 4);
            ueRSSI = new ValueMatrixShort(absolutePathUERSSI, relativePathUERSSI, 4, 4);
            
            bestServerRSCP[0] = 4200;
            dlInterf[0] = -100;

            m_Context.Add(ContextKeys.CellList, cellList);
            m_Context.Add(ContextKeys.CurrentCalcCell, m_cell);
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.UmtsBestServerCellID, bestServerID);
            m_Context.Add(ContextKeys.UmtsBestServerRSCP, bestServerRSCP);  
            m_Context.Add(ContextKeys.UmtsDLInterf, dlInterf);
            m_Context.Add(ContextKeys.UmtsUERSSI, ueRSSI);
        }
Exemple #19
0
 private bool JudgeFrequency(UMTSCell bestCell, UMTSCell umtsInterfCell, int sourceChannelIndex, int targetChannelIndex, FrequencyRelationType type)
 {
     float sourceBandWith = bestCell.FreqBand.BandWidth;
     float targetBandWith = umtsInterfCell.FreqBand.BandWidth;
     float sourceDLFrequency = bestCell.FreqBand.DLFrequency;
     float targetDLFrequency = umtsInterfCell.FreqBand.DLFrequency;
     int multiple = Convert.ToInt32(type);
     bool isSameBandWith = (sourceBandWith == targetBandWith);
     bool isIntegetExcursion = (Math.Abs((sourceDLFrequency + sourceBandWith * sourceChannelIndex) - (targetDLFrequency + targetBandWith * targetChannelIndex)) == sourceBandWith * multiple);
     return isSameBandWith && isIntegetExcursion;
 }
Exemple #20
0
 private double CalcGSMInterfWithHopping(IACell interfCell, UMTSCell bestCell, double linkLoss)
 {
     double interf = 0;
     GSMTRX gsminterfCell = interfCell as GSMTRX;
     List<int> soureMal = m_HoppingMALDic[gsminterfCell.ID];
     foreach (int channelIndex in soureMal)
     {
         interf += CalcOneCellInterf(gsminterfCell, bestCell, channelIndex, linkLoss);
     }
     return (interf / soureMal.Count);
 }
Exemple #21
0
 private double CalcGSMInterfWithoutHopping(IACell interfCell, UMTSCell bestCell, double linkLoss)
 {
     double interf = 0;
     interf = CalcOneCellInterf(interfCell, bestCell, interfCell.ChannelIndex, linkLoss);
     return interf;
 }
Exemple #22
0
 private double CalcAcir(IACell interfCell, UMTSCell bestCell, double deltaFreq)
 {
     double acir = double.NaN;
     Signal usefulSignal = new Signal();
     usefulSignal.FreqBand = bestCell.FreqBand.BandWidth;
     usefulSignal.Frequency = COPredicCommonCalc.GetFrequency((IACell)bestCell);
     usefulSignal.NetType = NetWorkType.UMTS;
     Signal source = new Signal();
     source.FreqBand = interfCell.FreqBand.BandWidth;
     if (interfCell.NetType == NetWorkType.GSM)
     {
         source.Frequency = interfCell.FreqBand.DLFrequency + interfCell.FreqBand.BandWidth * (interfCell.ChannelIndex - bestCell.FreqBand.StartChIndex);
     }
     else
     {
         source.Frequency = COPredicCommonCalc.GetFrequency(interfCell);
     }
     acir = m_IInterf.findACIR(source, usefulSignal);
     return acir;
 }
Exemple #23
0
 private double CalcInterfFormLTE(IACell interfCell, UMTSCell bestCell, double linkLoss)
 {
     double interf = 0;
     interf = CalcOneCellInterf(interfCell, bestCell, interfCell.ChannelIndex, linkLoss);
     return interf;
 }
Exemple #24
0
 /// <summary>
 /// 遍历激活集计算EbNo
 /// </summary>
 /// <param name="index"></param>
 /// <param name="context"></param>
 /// <returns></returns>
 private double CalcTerminalDLSinr(int index)
 {
     double tempDLSinr = 0;
     clutterparam = UMTSPredicCommonCalc.ConfingClutter(m_BestCell.Parent, appContext);
     m_ModelShadowMargin = UMTSPredicCommonCalc.GetModelShadowMargin(clutterparam, m_PredictionGroup.IsShadow, m_PredictionGroup.CoverageProb);
     m_CIShadowMargin = UMTSPredicCommonCalc.GetCIShadowMargin(clutterparam, m_PredictionGroup.IsShadow, m_PredictionGroup.CoverageProb);
     double interf = CalcBinInterf(index);
     int count = activeSetCellList.Count;
     for (int i = 0; i < count; i++)
     {
         m_CurrentCell = (UMTSCell)SearchAssist.GetCellbyID(activeSetCellList[i], m_CellList);
         float[] linkLoss = linkLossCalc.GetLinkLoss(index, m_TFMatrix, m_CurrentCell);
         double sinr = UMTSPredicCommonCalc.Calc_SINR(m_TchTxPower, linkLoss[1] - m_ModelShadowMargin, interf) + m_PredictionGroup.UIParam.DLDivGain + UnitTrans.todB(m_PredictionGroup.UIParam.ChipsRate / m_TchDLRate) - m_CIShadowMargin;
         tempDLSinr += UnitTrans.dBmTomw(sinr);
     }
     if (count > 1)
     {
         tempDLSinr *= m_PredictionGroup.UIParam.DLRakeEffiFactor;
     }
     return tempDLSinr;
 }
Exemple #25
0
 private void addNewUmtsCarrier(string carrierName, ReceptionEquipment reception)
 {
     UMTSCell cell = new UMTSCell();
     this.SetIACellProperty(carrierName, reception, cell);
     this.AddIACellToCarriers(cell);
 }
Exemple #26
0
 private double CalcOneCellInterf(IACell interfCell, UMTSCell bestCell, int interfChannelIndex, double linkLoss)
 {
     double interf = 0;
     double interfFreqBandWith = interfCell.FreqBand.BandWidth;
     double bestCellFreqBandWith = bestCell.FreqBand.BandWidth;
     double deltaFreq = CalcFrequencyExcursion(interfCell, bestCell, interfChannelIndex);
     double rxpower = 0;
     if (interfCell.NetType == NetWorkType.GSM)
     {
         rxpower = ((GSMTRX)interfCell).TRXPower - linkLoss;
     }
     else if (interfCell.NetType == NetWorkType.TDSCDMA)
     {
         rxpower = ((TDSCDMACarrier)interfCell).PCCPCHPower - linkLoss;
     }
     else if (interfCell.NetType == NetWorkType.LTE)
     {
         rxpower = ((LTECell)interfCell).DlActualTxPower - linkLoss;
     }
     FrequencyRelationType type = JudgeFreqBandRelationship(interfCell, bestCell, interfChannelIndex);
     interf = CalcInterfByFreqRelation(interfCell, bestCell, type, interfFreqBandWith, bestCellFreqBandWith, deltaFreq, rxpower);
     return interf;
 }
Exemple #27
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "UERSSI";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new UERSSICase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            UMTSPredictionGroup group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            UnionCsService csService = new UnionCsService();
            UMTSService umtsService = new UMTSService();
            umtsService.UmtsR99Bearer = new UMTSR99Bearer();
            umtsService.UmtsR99Bearer.PtchMax = 21;
            umtsService.UmtsR99Bearer.ULNominalRate = 3.4f;
            csService.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.CsService = csService;
            group.TrafficTerminal = new Terminal();
            List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            terminalList.Add(tempTerminal);
            group.TrafficTerminal.NetTerminalList = terminalList;

            //terminal  = (UMTSTerminal)group.TrafficTerminal.GetNetWorkTerminal(NetWorkType.UMTS);
            //terminal.NoiseFigure = 1;

            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerRSCP);
            string relativePathRSCP = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerRSCP);
            string absolutePathDLInterf = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsDLInterf);
            string relativePathDLInterf = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsDLInterf);
            ShortResultStruct srsID = ShortResultStruct.DefaultMin;
            ShortResultStruct srsRSCP = ShortResultStruct.DefaultMax;
            ShortResultStruct srsDLInterf = ShortResultStruct.DefaultMax;

            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_BestServerRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathRSCP, relativePathRSCP, srsRSCP);
            m_umtsDLInterf = new ValueMatrixDouble(absolutePathDLInterf, relativePathDLInterf, matrix.RowCount, matrix.ColCount);

            for (int i = 0; i < 3; i++)
            {
                IACell cell = new UMTSCell();
                cellList.Add(cell);
            }
            double[] x = new double[3] { 50, 100, 150 };
            double[] y = new double[3] { 50, 100, 50 };
            MockCellList.CreateCellList(cellList, x, y);

            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.UmtsBestServerCellID, m_BestServerID);
            m_Context.Add(ContextKeys.UmtsBestServerRSCP, m_BestServerRSCP);
            m_Context.Add(ContextKeys.UmtsDLInterf, m_umtsDLInterf);

            m_Context.Add(ContextKeys.CellList, cellList);
            m_Case.Name = m_Name;
            m_Case.InitialCase(m_Context);

        }
Exemple #28
0
 private double CalcFrequencyExcursion(IACell interfCell, UMTSCell bestCell, int interfChannelIndex)
 {
     double interfFreqBandWith = interfCell.FreqBand.BandWidth;
     double bestFreqBandWith = bestCell.FreqBand.BandWidth;
     double interfDLCenterFreq = 0;
     if (interfCell.NetType == NetWorkType.GSM)
     {
         interfDLCenterFreq = interfCell.FreqBand.DLFrequency + interfFreqBandWith * interfChannelIndex;
     }
     else
     {
         interfDLCenterFreq = interfCell.FreqBand.DLFrequency + interfFreqBandWith * (interfChannelIndex + 0.5);
     }
     double bestDLCenterFreq = bestCell.FreqBand.DLFrequency + bestFreqBandWith * (bestCell.ChannelIndex + 0.5);
     return Math.Abs(interfDLCenterFreq - bestDLCenterFreq);
 }
Exemple #29
0
 private bool IsNeedCalc(int index)
 {
     if (m_BestCellIDMatrix[index] == m_BestCellIDMatrix.InvalidValue)
         return false;
     if (!m_BinMapCellsDic.TryGetValue(index, out activeSetCellList))
         return false;
     IACell bestCell = SearchAssist.GetCellbyID(m_BestCellIDMatrix[index], m_CellList);
     m_BestCell = bestCell as UMTSCell;
     if (m_BestCell.CellType == CarrierTypeOfUMTS.HSDPA || m_BestCell.CellType == CarrierTypeOfUMTS.HSUPA)
         return false;
     return m_BestCell != null;
 }
Exemple #30
0
 private double CalcInterfByFreqRelation(IACell interfCell, UMTSCell bestCell, FrequencyRelationType type, double interfFreqBandWith, double bestCellFreqBandWith, double deltaFreq, double rxpower)
 {
     double interf = 0;
     double freqBandRatio = 0;
     double acir = 0;
     if (type == FrequencyRelationType.OutOfInterfFreq)
     {
         acir = CalcAcir(interfCell, bestCell, deltaFreq);
         if (!double.IsNaN(acir))
         {
             interf = UnitTrans.dBto(rxpower - acir);
         }
     }
     else if (type == FrequencyRelationType.InnerOfInterfFreq)
     {
         freqBandRatio = UnitTrans.todB(interfFreqBandWith / bestCellFreqBandWith);
         interf = UnitTrans.dBto(rxpower - freqBandRatio);
     }
     else if (type == FrequencyRelationType.InnerOfBestFreq)
     {
         interf = UnitTrans.dBto(rxpower);
     }
     return interf;
 }