Esempio n. 1
0
        /// <summary>
        /// 初始化计算中需要的指标以及存储路径
        /// </summary>
        /// <param name="tfMatrix"></param>
        /// <param name="tdGroup"></param>
        private void InitMatrix(TrueFalseMatrix tfMatrix, TDPredictionGroup tdGroup)
        {
            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);

            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID);
            string relativePathID = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID);

            string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.PCCPCHRSCP);
            string relativePathRSCP = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.PCCPCHRSCP);

            string absolutePathInterf = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.PCCPCHInterf);
            string relativePathInterf = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.PCCPCHInterf);

            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            ShortResultStruct srsRSCP = ShortResultStruct.DefaultMin;
            ShortResultStruct srsInterf = ShortResultStruct.DefaultMin;

            m_BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathID, relativePathID, srsID);
            m_PCCPCHRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathRSCP, relativePathRSCP, srsRSCP);
            m_PCCPCHInterf = new ValueMatrixDouble(absolutePathInterf, relativePathInterf, tfMatrix.RowCount, tfMatrix.ColCount);
            m_PCCPCHInterf.SetValue(0, 0, double.NegativeInfinity);
        }
Esempio n. 2
0
 private void GenerateDLInterfMatrix()
 {
     string absolutePath = ResultFilePath.CreateFilePath(m_projectMgr.CurrentProjectLossPath,
          m_Group.Name, m_Group.Region.Name, ContextKeys.DLDCHInterf);
     string relativePath = ResultFilePath.CreateRelativePath(m_Group.Name,
         m_Group.Region.Name, ContextKeys.DLDCHInterf);
     m_DLInterfMatrix = new ValueMatrixDouble(absolutePath, relativePath,
        m_tfMatrix.RowCount, m_tfMatrix.ColCount);
     m_DLInterfMatrix.SetValue(0, 0, double.NegativeInfinity);
 }
Esempio n. 3
0
 private void AddOtherSystemInterfIntoContext(Context context)
 {
     string absolutePath = ResultFilePath.CreateFilePath(m_projectManager.CurrentProjectLossPath,
          m_tdPredicGroup.Name, m_tdPredicGroup.Region.Name, ContextKeys.OtherSystemInterf);
     string relativePath = ResultFilePath.CreateRelativePath(m_tdPredicGroup.Name,
         m_tdPredicGroup.Region.Name, ContextKeys.OtherSystemInterf);
     m_OtherSystemInterfMatrix = new ValueMatrixDouble(absolutePath, relativePath,
        m_TFMatrix.RowCount, m_TFMatrix.ColCount);
     m_OtherSystemInterfMatrix.SetValue(0, 0, double.NegativeInfinity);
     context.Add(ContextKeys.OtherSystemInterf, m_OtherSystemInterfMatrix);
 }
Esempio n. 4
0
 /// <summary>
 /// 初始化指标的存取矩阵
 /// </summary>
 /// <param name="group"></param>
 /// <param name="tFMatrix"></param>
 private void InitData(TDPredictionGroup pg, TrueFalseMatrix tFMatrix)
 {
     string absolutePath = ResultFilePath.CreateFilePath(m_projectManager.CurrentProjectLossPath,
         pg.Name, pg.Region.Name, ContextKeys.PCCPCHInterf);
     string relativePath = ResultFilePath.CreateRelativePath(pg.Name,
         pg.Region.Name, ContextKeys.PCCPCHInterf);
     m_PCCPCHInterfMatrix = new ValueMatrixDouble(absolutePath, relativePath,
         tFMatrix.RowCount, tFMatrix.ColCount);
     m_PCCPCHInterfMatrix.SetValue(0, 0, double.NegativeInfinity);
 }
Esempio n. 5
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "DLDPCHSINRCase";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new DLDPCHSINRCase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            #region group 业务 终端 参数
            UMTSPredictionGroup group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            group.UIParam.DLRakeEffiFactor = 0.6f;
            group.UIParam.DLDivGain = 1;
            UnionPsService psService = new UnionPsService();
            UMTSService umtsService = new UMTSService();
            umtsService.UmtsR99Bearer = new UMTSR99Bearer();
            umtsService.UmtsR99Bearer.PtchMax = 21;
            psService.PSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.PsService = psService;
            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;
            #endregion

            #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 absolutePathInterf = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsDLInterf);
            string relativePathInterf = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsDLInterf);
            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);
            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            ShortResultStruct srsInterf = ShortResultStruct.DefaultMin;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_umtsDLInterf = new ValueMatrixDouble(absolutePathInterf, relativePathInterf, matrix.RowCount, matrix.ColCount);
            m_BestServerRSCP = new ValueMatrixShort(absolutePathRSCP, relativePathRSCP, matrix.RowCount, matrix.ColCount);
            m_umtsDLInterf.SetValue(0, 0, double.NegativeInfinity);
            #endregion

            m_umtsDLInterf[0] = -100;
            m_BestServerRSCP[0] = -2000;

            #region 构建小区
            for (int i = 0; i < 2; i++)
            {
                IACell cell = new UMTSCell();
                cell.FreqBand.BandWidth = 3.84f;
                cellList.Add(cell);
            }
            double[] x = new double[2] { 50, 100 };
            double[] y = new double[2] { 50, 100 };
            MockCellList.CreateCellList(cellList, x, y);
            m_BinMapCellsDic = new Dictionary<int, List<short>>();

            #endregion

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

            m_Case.Name = m_Name;
            m_Case.InitialCase(m_Context);
            
        }