Example #1
0
 /// <summary>
 /// 初始化BinSuite
 /// </summary>
 /// <param name="context"></param>
 public void InitialSuite(Context context)
 {
     m_Context = context;
     m_TFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];
     InitialCellList(context);
     InitialCases(context);
 }
Example #2
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "HSPDSCHRSCP";
            m_Case = new HSPDSCHRSCPCase();
            m_Context = new Context();

            tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            tdGroup = MockGroupAndCell.MockTDPredicGroup();
            cell = MockGroupAndCell.CreateTDCell();

            InitTerminal(tdGroup);

            LinkLossAssist.Init();
            IProjectManager projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string path = projectMgr.CurrentProjectLossPath;
            string absolutePath = ResultFilePath.CreateFilePath(path, tdGroup.Name, tdGroup.Region.Name, TDPredictionStudyType.Best_Server.ToString());
            string relativePath = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, TDPredictionStudyType.Best_Server.ToString());
            BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePath, relativePath, ShortResultStruct.DefaultMax);
            BestServerCellID[0] = cell.ID;

            m_Context.Add(ContextKeys.CurrentCalcCell, cell);
            m_Context.Add(ContextKeys.Group, tdGroup);
            m_Context.Add(ContextKeys.TDBestServerCellID, BestServerCellID);
            m_Context.Add(ContextKeys.TFMatrix, tfMatrix);
            m_Context.Add(ContextKeys.CellList, InitCellList(cell));
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
        }
Example #3
0
        public void MyTestInitialize()
        {
            m_Name = "DLDCHRSCP";
            m_Group = MockGroupAndCell.MockTDPredicGroup();
            m_Cell = MockGroupAndCell.CreateTDCell();
            m_transList = new List<Transceiver>();
            m_Transceiver = new Transceiver();
            m_tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            m_index = 0;
            LinkLossAssist.Init();
            m_Case = new DLDCHSINRCase();
            m_projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            GenerateMatrix();
            
            m_BestServerIDMatrix[m_index] = (short)(m_Cell.ID);
            m_Case.Name = m_Name;
            m_CellList = new List<IACell>();
            m_Context = new Context();
            m_CellList.Add(m_Cell);
            //GenerateCellList();
            m_Transceiver.Cells = m_CellList;
            m_transList.Add(m_Transceiver);
            AddToContext();

        }
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "CellToCellIntef";
            m_Context = new Context();
            m_Case = new CellToCellInterfCase();
            LinkLossAssist.Init();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
            IACell cell = MockGroupAndCell.CreateTDCell();
            List<IACell> celllist = new List<IACell>();
            double[] x = { 100, 150 };
            double[] y = { 100, 100 };
            celllist.Add(new TDSCDMACarrier());
            celllist.Add(new UMTSCell());
            celllist = MockCellList.CreateCellList(celllist, x, y);
           
            celllist.Add(cell);
            InitCelllist(cell, celllist);
           
            ValueMatrixShort BestServerCellID = InitMatrix(matrix, group);
            AddToContext(matrix, group, cell, celllist, BestServerCellID);
            BestServerCellID[0] = (short)(cell.ID - 2);
            group.tdUIParam.CurrentTimeSlot = 3;
            ((TDSCDMACarrier)cell).SwitchPoint = 2;
            ((TDSCDMACarrier)celllist[0]).SwitchPoint = 3;

           
        }
Example #5
0
        public void MyTestInitialize()
        {
            m_Context = new Context();
            m_Name = "CellToCellInterf";
            m_Case = new CellToCellInterfCase();
            LinkLossAssist.Init();
            //ValueMatrixShort BestServerMatrix = new ValueMatrixShort();
            TrueFalseMatrix tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
            IACell cell = MockGroupAndCell.CreateTDCell();
            ((TDSCDMACarrier)cell).SwitchPoint = 1;
            List<IACell> cellList = new List<IACell>();
            group.tdUIParam.CurrentTimeSlot = 2;
            double[] x = { 100, 150 };
            double[] y = { 100, 100 };
            cellList.Add(new TDSCDMACarrier());
            cellList.Add(new UMTSCell());
            cellList = MockCellList.CreateCellList(cellList, x, y);
            cellList.Add(cell);
            ValueMatrixShort BestServerMatrix = GenerateBestServerMatrix(tfMatrix, group);
            InitCellList(cell, cellList);
            BestServerMatrix[0] = (short)(cell.ID - 2);
            m_Context.Add(ContextKeys.Group,group);
            m_Context.Add(ContextKeys.TFMatrix,tfMatrix);
            m_Context.Add(ContextKeys.TDBestServerCellID,BestServerMatrix);
            m_Context.Add(ContextKeys.CellList,cellList);
            m_Context.Add(ContextKeys.CurrentCalcCell,cell);
            m_Context.Add(ContextKeys.ApplicationContext,ProjectSingleton.CurrentProject.AppContext);


        }
Example #6
0
        public void Init()
        {           
            matrix = new TrueFalseMatrix(10, 10, 0.0, 10.0, 1, true);
            cell = new MockCell();
            termianl = new Terminal();
            //termianl.Gain = 3f;
            CsService = new UnionCsService();
            CsService.BodyLoss = 5f;
            PsService = new UnionPsService();
            PsService.BodyLoss = 5f;

            AntConfig1 = new AntConfig();
            AntConfig1.IsMainAnt = true;
            AntConfig1.DlTotalLoss = 6f;
            AntConfig1.IsUserInput = false;
            AntConfig1.Feeder = new FeederEquipment();

            tran = new Transceiver();
            site = new Site();
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 4f;
            site.X = 1;
            site.Y = 1;

            tran.Parent = site;
            tran.addAntConfig(AntConfig1);

            cell.Parent = tran;

            LinkLossAssist.Init();
        }
Example #7
0
        [TestInitialize]  //初始化测试用例
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "GSMCodingScheme";
            m_Context = new Context();
            m_Case = new CodingSchemeCase();

            IACell cell = Mock.CreatGsmCell();
            group = Mock.MockGSMPredicGroup();
            TrueFalseMatrix tFMatrix = new TrueFalseMatrix(4, 4, 0, 200, 50, true);

            LinkLossAssist.Init();

            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePath1 = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, GSMPredictionStudyType.BestServer.ToString());
            string relativePath1 = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, GSMPredictionStudyType.BestServer.ToString());
            ShortResultStruct srs1 = ShortResultStruct.DefaultMax;
            gsmBestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath1, relativePath1, srs1);
            gsmBestServerID[0] = cell.ID;

            string absolutePath2 = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, GSMPredictionStudyType.DLServiceCIR.ToString());
            string relativePath2 = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, GSMPredictionStudyType.DLServiceCIR.ToString());
            ShortResultStruct srs2 = ShortResultStruct.DefaultMin;
            ValueMatrixShort gsmDLServiceCIR = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath2, relativePath2, srs2);
            gsmDLServiceCIR[0] = 26 * 100;

                        
            //ITrafficForApplication trafficForApplication=new MockITrafficForApplication();

            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, tFMatrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.GSMBestServerID, gsmBestServerID);
            m_Context.Add(ContextKeys.GSMDLServiceCIR, gsmDLServiceCIR);
        }
Example #8
0
 public static ValueMatrixInt GenerateValueMatrixIntNoInitial(TrueFalseMatrix tfMatrix, string filepath, string relativePath)
 {
     ValueMatrixInt num = new ValueMatrixInt(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_IntMatrix = num;
     num.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     num.SetValue(-2147483648, -2147483648, -2147483648);
     return num;
 }
Example #9
0
 public static ValueMatrixShort GenerateValueMatrixShortNoInitial(TrueFalseMatrix tfMatrix, string filepath, string relativePath)
 {
     ValueMatrixShort shortMatrix = new ValueMatrixShort(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_ShortMatrix = shortMatrix;
     shortMatrix.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     shortMatrix.SetValue(-32768, -32768, -32768);
     return shortMatrix;
 }
Example #10
0
        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);
            
        }
Example #11
0
 public static ValueMatrixShort GenerateValueMatrixShort(TrueFalseMatrix tfMatrix, string filepath, string relativePath)
 {
     ValueMatrixShort vms = new ValueMatrixShort(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_ShortMatrix = vms;
     vms.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     vms.SetValue(-32768, -32768, -32768);
     InitialValueMatrix(tfMatrix, -32768, -32768, vms);
     return vms;
 }
Example #12
0
 private static void InitialValueMatrix(TrueFalseMatrix tfMatrix, short notCalcValue, short defaultValue, ValueMatrixShort vms)
 {
     bool flag = false;
     for (int i = 0; i < vms.TotalCount; i++)
     {
         flag = tfMatrix[i];
         vms[i] = notCalcValue;
     }
 }
Example #13
0
 private static void InitialValueMatrix(TrueFalseMatrix tfMatrix, int notCalcValue, int defaultValue, ValueMatrixInt vmi)
 {
     bool flag = false;
     for (int i = 0; i < vmi.TotalCount; i++)
     {
         flag = tfMatrix[i];
         vmi[i] = notCalcValue;
     }
 }
Example #14
0
 /// <summary>
 /// 构建TD用户
 /// </summary>
 /// <param name="index"></param>
 /// <param name="tfMatrix"></param>
 /// <param name="pg"></param>
 /// <returns></returns>
 public User ConstructUser(int index, TrueFalseMatrix tfMatrix)
 {
     User user = new User();
     user.X = tfMatrix.GetXYPoint(index).X;
     user.Y = tfMatrix.GetXYPoint(index).Y;
     user.Terminal = m_Terminal;
     user.Service = m_Service;
     return user;
 }
Example #15
0
 public static ValueMatrixInt GenerateValueMatrixInt(TrueFalseMatrix tfMatrix, string filepath, string relativePath)
 {
     ValueMatrixInt vmi = new ValueMatrixInt(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_IntMatrix = vmi;
     vmi.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     vmi.SetValue(-2147483648, -2147483648, -2147483648);
     InitialValueMatrix(tfMatrix, -2147483648, -2147483648, vmi);
     return vmi;
 }
Example #16
0
 /// <summary>
 /// 将构建的数据对象加到Context里面
 /// </summary>
 /// <param name="tfMatrix"></param>
 /// <param name="tdGroup"></param>
 private void AddToContext(TrueFalseMatrix tfMatrix, TDPredictionGroup tdGroup)
 {
     m_Context.Add(ContextKeys.CurrentCalcCell, m_cell);
     m_Context.Add(ContextKeys.Group, tdGroup);
     m_Context.Add(ContextKeys.TFMatrix, tfMatrix);
     m_Context.Add(ContextKeys.CellList, m_CellList);
     m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
     m_Context.Add(ContextKeys.TDBestServerCellID, m_BestServerCellID);
     m_Context.Add(ContextKeys.ULDCHRSCP, m_ULDCHRSCP);
    
 }
Example #17
0
 /// <summary>
 /// 从Context中获取本case所需的指标
 /// </summary>
 /// <param name="context"></param>
 private void GetDataFromContext(Context context)
 {
     m_appContext = (IBaseService)context[ContextKeys.ApplicationContext];
     m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext);
     m_tFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];
     m_predictionGroup = (TDPredictionGroup)context[ContextKeys.Group];
     m_procGain = TDPredictionCommonCalc.GetProcGain(m_predictionGroup);
     m_ULDCHRSCPMatrix = (ValueMatrixShort)context[ContextKeys.ULDCHRSCP];
     m_BestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID];
     m_cells = (List<IACell>)context[ContextKeys.CellList];  
 }
Example #18
0
 public GetPointsHelper(int startX, int startY, int endX, int endY, TrueFalseMatrix tfMatrix)
 {
     m_startX = startX;
     m_startY = startY;
     m_endX = endX;
     m_endY = endY;
     m_TFMatrix = tfMatrix;
     m_NorthWestX = tfMatrix.NorthWestX;
     m_NorthWestY = tfMatrix.NorthWestY;
     m_Resolution = tfMatrix.Resolution;
 }
Example #19
0
 public static ValueMatrixShort GenerateValueMatrixShortNoInitial(TrueFalseMatrix tfMatrix, string filepath, PredictionStudyType st, string relativePath)
 {
     short num;
     short num2;
     short num3;
     DefaultValueDefine.GetShortResult(st, out num3, out num2, out num);
     ValueMatrixShort @short = new ValueMatrixShort(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_ShortMatrix = @short;
     @short.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     @short.SetValue(num, num2, num3);
     return @short;
 }
Example #20
0
        /// <summary>
        /// 计算TD链路损耗
        /// </summary>
        /// <param name="index"></param>
        /// <param name="tfMatrix"></param>
        /// <param name="cell"></param>
        /// <param name="pg"></param>
        /// <returns></returns>
        public float[] GetTDLinkLoss(int index,TrueFalseMatrix tfMatrix, IACell cell)
        {
            User user = ConstructUser(index, tfMatrix);
            AntConfig mainAnt = FindMainAnt(cell.Parent.AntConfiguration);
            double pathLossGate = GetPathLossGate(cell.MaxPower, m_RxSensitivity, mainAnt);
            float[] result = GetLink(user, pathLossGate, cell);
            float antGain = GetBCHGain(cell, user);//返回的是linkloss-天线增益,但是天线增益是零
            result[0] -= antGain;
            result[1] -= antGain;

            return result;//返回的是linkloss,外面用的话分信道看加的是智能天线的增益还是普通天线的增益
        }
Example #21
0
 public void CreateTrueFalseMatrix(TrueFalseMatrix tfMatrixModel)
 {
     float resolution = tfMatrixModel.Resolution;
     double northWestX = tfMatrixModel.NorthWestX;
     double northwestY = tfMatrixModel.NorthWestY - (tfMatrixModel.Resolution * this.m_StartRowIndex);
     this.m_TFMatrix = new TrueFalseMatrix(this.m_RowsCount, this.m_ColsCount, northWestX, northwestY, resolution, true);
     int num4 = this.m_RowsCount * this.m_ColsCount;
     for (int i = 0; i < num4; i++)
     {
         this.m_TFMatrix[i] = tfMatrixModel[this.m_StartIndex + i];
     }
 }
Example #22
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "DLInterf";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new DLInterfCase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            GSMPredicGroup group = new GSMPredicGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "GSMPredicGroup";
            group.CsService = new Huawei.UNet.Traffic.Interface.UnionCsService();
            group.TrafficTerminal = new Huawei.UNet.Traffic.Interface.Terminal();

            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.GSMBestServerID);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.GSMBestServerID);
            string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.GSMBCCHRP);
            string relativePathRSCP = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.GSMBCCHRP);
            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            ShortResultStruct srsRSCP = ShortResultStruct.DefaultMin;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_BestServerRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathRSCP, relativePathRSCP, srsRSCP);
            m_BestServerID[0] = 0;
            m_BestServerRSCP[0] = -9000;
       
            //InitCellList();

            //double[] x = new double[3] { 50, 100, 150 };
            //double[] y = new double[3] { 50, 100, 50 };
            //MockCellList.CreateCellList(cellList, x, y);
            TrafficAdaptorMgr trafficMgr = TrafficAdaptorMgr.Instance;
            m_InterfTable = trafficMgr.TableDIC;

            m_Context.Add(ContextKeys.InterfTable, m_InterfTable);
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.GSMBestServerID, m_BestServerID);
            m_Context.Add(ContextKeys.GSMBCCHRP, m_BestServerRSCP);
            m_Case.Name = m_Name;
            m_Context.Add(ContextKeys.CellList, cellList);
            m_Case.InitialCase(m_Context);
            //for (int i = 0; i < 3;i++ )
            //{
            //    m_Context.Add(ContextKeys.CurrentCalcCell, cellList[i]);
            //    RunCase();
            //    m_Context.Remove(ContextKeys.CurrentCalcCell);
            //}
        }
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "HSUPAPeakThroughCase";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new HSUPAPeakThroughCase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            #region group 业务 终端
            group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            group.UIParam.SpatialDivFactor = 0;
            group.UIParam.MaxSpatialDivFactor = 0;
            UnionPsService psService = new UnionPsService();
            UMTSService umtsService = new UMTSService();
            psService.PSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.PsService = psService;
            umtsService.EnableHsupa = true;

            group.TrafficTerminal = new Terminal();
            List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            tempTerminal.EnableHsupa = true;
            terminalList.Add(tempTerminal);
            group.TrafficTerminal.NetTerminalList = terminalList;
            #endregion

            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 absolutePathEPDSCHEcNt = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsEPDSCHEcNt);
            string relativePathEPDSCHEcNt = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsEPDSCHEcNt);
            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            ShortResultStruct srsCir = ShortResultStruct.DefaultMin;
            ShortResultStruct srsEPDSCH = ShortResultStruct.DefaultMin;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_EPDSCHEcNt = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathEPDSCHEcNt, relativePathEPDSCHEcNt, srsEPDSCH);
            m_BestServerID[0] = 0;

            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.CellList, cellList);
            m_Context.Add(ContextKeys.UmtsEPDSCHEcNt, m_EPDSCHEcNt);
            m_Case.Name = m_Name;

        }
Example #24
0
        /// <summary>
        /// 计算DCH信道的链路损耗
        /// </summary>
        /// <param name="index"></param>
        /// <param name="tfMatrix"></param>
        /// <param name="?"></param>
        /// <param name="pg"></param>
        /// <returns></returns>
        public static float[] GetLinkLossWithMainSAGain(int index, 
            TrueFalseMatrix tfMatrix, IACell cell, TDPredictionGroup pg)
        {
            User user = ConstructionUser(index, tfMatrix, pg);
            AntConfig mainAnt = FindMainAnt(cell.Parent.AntConfiguration);
            double pathLossGate = GetPathLossGate(cell.MaxPower, pg.RxSensitivity, mainAnt);
            float[] result = GetLinkLoss(user, pathLossGate, cell, pg);
            float antGain = GetSAMainGain(cell, user);
            result[0] -= antGain;
            result[1] -= antGain;

            return result;
        }
Example #25
0
        public void MyTestInitialize()
        {
            TrueFalseMatrix tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            TDPredictionGroup tdGroup = MockGroupAndCell.MockTDPredicGroup();
            m_Cell = MockGroupAndCell.CreateTDCell();
            LinkLossAssist.Init();

            InitMatrix(tfMatrix, tdGroup);

            InitCellList();

            AddToContext(tfMatrix, tdGroup);
        }
Example #26
0
 public static ValueMatrixInt GenerateValueMatrixInt(TrueFalseMatrix tfMatrix, string filepath, PredictionStudyType st, string relativePath)
 {
     short num;
     short num2;
     short num3;
     DefaultValueDefine.GetShortResult(st, out num3, out num2, out num);
     ValueMatrixInt vmi = new ValueMatrixInt(filepath, relativePath, tfMatrix.RowCount, tfMatrix.ColCount);
     m_IntMatrix = vmi;
     vmi.SetParam(tfMatrix.NorthWestX, tfMatrix.NorthWestY, tfMatrix.Resolution);
     vmi.SetValue(num, num2, num3);
     InitialValueMatrix(tfMatrix, num2, num3, vmi);
     return vmi;
 }
Example #27
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "ULDCHRSCP";
            m_Context = new Context();
            m_Case = new ULDCHRSCPCase();

            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
            IACell cell = MockGroupAndCell.CreateTDCell();
            m_Teminal = new Terminal();
            group.TrafficTerminal =m_Teminal;
            
             List<NetworkTerminal> netTerminalList=new List<NetworkTerminal>();
             m_Teminal.NetTerminalList = netTerminalList;
             TDTerminal tdTeminal = new TDTerminal();
             tdTeminal.Attenuation = 45f;
             tdTeminal.MaxTxPower = 21;
             tdTeminal.NetType = NetWorkType.TDSCDMA;
             netTerminalList.Add(tdTeminal);

            List<IACell> celllist = new List<IACell>();

            celllist.Add(new TDSCDMACarrier());
            celllist.Add(new TDSCDMACarrier());
            double[] x = { 100, 150 };
            double[] y = { 100, 100 };

            celllist = MockCellList.CreateCellList(celllist, x, y);
            celllist.Add(cell);


            LinkLossAssist.Init();
            IProjectManager projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string path = projectMgr.CurrentProjectLossPath;
            string absolutePath2 = ResultFilePath.CreateFilePath(path,
                group.Name, group.Region.Name, TDPredictionStudyType.Best_Server.ToString());
            string relativePath2 = ResultFilePath.CreateRelativePath(group.Name,
                group.Region.Name, TDPredictionStudyType.Best_Server.ToString());
            ShortResultStruct srs2 = ShortResultStruct.DefaultMax;
            ValueMatrixShort BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePath2, relativePath2, srs2);
            BestServerCellID[0] = cell.ID;

            m_Context.Add(ContextKeys.CurrentCalcCell, cell);
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TDBestServerCellID, BestServerCellID);
            m_Context.Add(ContextKeys.CellList, celllist);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);

        }
Example #28
0
 private void GetValueFromContext(Context context)
 {
     m_tdPreGroup = (TDPredictionGroup)context[ContextKeys.Group];
     m_tFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];
     m_AppContext = (IBaseService)context[ContextKeys.ApplicationContext];
     m_Name = m_tdPreGroup.Name;
     TrafficAdaptorAssist trafficAdaptor = TrafficAdaptorAssist.Instance;
     m_BearerList = trafficAdaptor.TDHSUPABearerList;
     m_BestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID];
     m_cells = (List<IACell>)context[ContextKeys.CellList];
     m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_AppContext);
     m_tdTerminal = (TDTerminal)m_tdPreGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA);
     m_HSUPACIMatrix = (ValueMatrixShort)context[ContextKeys.ULDCHCIR];
 }
Example #29
0
        [TestInitialize]  //初始化测试用例
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "CoverageArea";

            m_Context = new Context();
            m_Case = new CoverageAreaCase();

            group = Mock.MockGSMPredicGroup();
            TrueFalseMatrix tFMatrix = new TrueFalseMatrix(4, 4, 0, 200, 50, true);
            IACell cell = Mock.CreatGsmCell();
            cellList = new List<IACell>();
            double[] x = new double[1] { 100 };
            double[] y = new double[1] { 100 };
            cellList.Add(cell);
            cellList = MockCellList.CreateCellList(cellList, x, y);
            cellList[0].Parent.ID = 1;
            LinkLossAssist.Init();
            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);

            string absolutePath2 = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, GSMPredictionStudyType.BestServer.ToString());
            string relativePath2 = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, GSMPredictionStudyType.BestServer.ToString());
            ShortResultStruct srs2 = ShortResultStruct.DefaultMax;
            m_GSMBestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath2, relativePath2, srs2);
            m_GSMBestServerID[m_Index] = cellList[0].ID;

            string absolutePath = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, GSMPredictionStudyType.DLServiceCIR.ToString());
            string relativePath = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, GSMPredictionStudyType.DLServiceCIR.ToString());
            ShortResultStruct srs = ShortResultStruct.DefaultMin;
            m_GSMDLServiceCIR = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath, relativePath, srs);
            m_GSMDLServiceCIR[m_Index] = 18 * 100;

            string absolutePath1 = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, GSMPredictionStudyType.CodingScheme.ToString());
            string relativePath1 = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, GSMPredictionStudyType.CodingScheme.ToString());
            ShortResultStruct srs1 = ShortResultStruct.DefaultMin;
            m_CodingScheme = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath1, relativePath1, srs1);
            m_CodingScheme[0] = 4;
            m_CodingScheme[11] = 11;
            m_Context.Add(ContextKeys.CellList, cellList);
            m_Context.Add(ContextKeys.CurrentCalcCell, cellList[0]);
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, tFMatrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.GSMBestServerID, m_GSMBestServerID);
            m_Context.Add(ContextKeys.GSMDLServiceCIR, m_GSMDLServiceCIR);
            m_Context.Add(ContextKeys.CodingScheme, m_CodingScheme);

        }
Example #30
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "BestServer";
            m_Context = new Context();
            m_Case = new BestServerCase();

            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
            IACell cell = MockGroupAndCell.CreateTDCell();
            LinkLossAssist.Init();
            m_Context.Add(ContextKeys.CurrentCalcCell, cell);
            m_Context.Add(ContextKeys.Group, group);
            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);

        }