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 #2
0
        public IPredictionGroup Clone()
        {
            UMTSPredictionGroup pg = new UMTSPredictionGroup();
            pg.m_GroupId = this.m_GroupId;
            pg.m_HandoverAreaThreshold = this.m_HandoverAreaThreshold;
            pg.m_InterferenceGate = this.m_InterferenceGate;
            pg.IsCoGroup = this.IsCoGroup;
            pg.m_Locked = this.m_Locked;
            pg.m_MaxSensitivity = this.m_MaxSensitivity;
            pg.m_Name = this.m_Name;
            pg.m_NumPointInPolygon = this.m_NumPointInPolygon;
            pg.m_PredictionType = this.m_PredictionType;
            pg.m_Resolution = this.m_Resolution;
            pg.m_RxSensitivity = this.m_RxSensitivity;
            pg.IsShadow = this.IsShadow;
            pg.IsIndoorCoverage = this.IsIndoorCoverage;
            pg.CoverageProb = this.CoverageProb;
            pg.m_State = this.m_State;//enum类型

            pg.m_serviceList = this.m_serviceList;
            pg.m_terminalList = this.m_terminalList;
            pg.m_TranceiverInfoList = this.m_TranceiverInfoList;            
            pg.m_ploygonList = this.m_ploygonList;

            pg.StudyList = new List<IStudy>();
            foreach (IStudy sd in this.StudyList)
            {
                pg.StudyList.Add(sd.Clone());
            }           
            pg.m_Region = this.m_Region;
            pg.m_CsService = this.m_CsService;
            pg.m_PsService = this.m_PsService;            
            pg.m_Mobility = this.m_Mobility;
            pg.m_Terminal = this.m_Terminal;           

            return pg;
        }
Exemple #3
0
 private void GetDataFromContext(Context context)
 {
     appContext = (IBaseService)context[ContextKeys.ApplicationContext];
     IProjectManager pm = ServiceHelper.Lookup<IProjectManager>(appContext);
     m_PredictionGroup = (UMTSPredictionGroup)context[ContextKeys.Group];
     m_TFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];
     m_CellList = (List<IACell>)context[ContextKeys.CellList];
     m_BestCellIDMatrix = (ValueMatrixShort)context[ContextKeys.UmtsBestServerCellID];
     m_BestServerRSCPMatrix = (ValueMatrixShort)context[ContextKeys.UmtsBestServerRSCP];
     m_DLDCHInterfMatrix = (ValueMatrixDouble)context[ContextKeys.UmtsDLInterf];            
     m_BinMapCellsDic = (Dictionary<int, List<short>>)context[ContextKeys.UmtsBinMapCellDic];
     m_ProjectPath = pm.CurrentProjectLossPath;
     m_UmtsTerminal = (UMTSTerminal)m_PredictionGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.UMTS);
     linkLossCalc = new CoLinkLossCalc(m_PredictionGroup.RxSensitivity, m_PredictionGroup.TrafficTerminal, m_PredictionGroup.TrafficService, m_PredictionGroup.IsShadow, m_PredictionGroup.IsIndoorCoverage, m_PredictionGroup.CoverageProb);
     m_TchDLRate = UMTSPredicCommonCalc.GetDlBitRate(m_PredictionGroup);
     m_TchTxPower = UMTSPredicCommonCalc.GetTchPower(m_PredictionGroup);          
 }
Exemple #4
0
 private bool IsServiceSupportHSDPA(UMTSPredictionGroup predictionGroup)
 {
     bool isServiceSuit = false;
     if ((predictionGroup.CsService as UnionCsService) != null)
     {
         UnionCsService csService = predictionGroup.CsService as UnionCsService;
         UMTSService service = csService.CSServiceDic[NetWorkType.UMTS] as UMTSService;
         isServiceSuit = service.EnableHsdpa;
     }
     else if ((predictionGroup.PsService as UnionPsService) != null)
     {
         UnionPsService psService = predictionGroup.PsService as UnionPsService;
         UMTSService service = psService.PSServiceDic[NetWorkType.UMTS] as UMTSService;
         isServiceSuit = service.EnableHsdpa;
     }
     return isServiceSuit;
 }
Exemple #5
0
 /// <summary>
 /// 从Context中获取本case所需的指标
 /// </summary>
 /// <param name="context"></param>
 private void GetDataFromContext(Context context)
 {
     tfMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];
     m_BestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.UmtsBestServerCellID];
     m_PilotCHInterfMatrix = (ValueMatrixDouble)context[ContextKeys.UmtsDLInterf];
     m_BestServerRSCPMatrix = (ValueMatrixShort)context[ContextKeys.UmtsBestServerRSCP];
     m_cells = (List<IACell>)context[ContextKeys.CellList];
     m_predictionGroup = (UMTSPredictionGroup)context[ContextKeys.Group];
     appContext = (IBaseService)context[ContextKeys.ApplicationContext];
     IProjectManager projectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
     m_ProjectPath = projectManager.CurrentProjectLossPath;
     linkLossCalc = new CoLinkLossCalc(m_predictionGroup.RxSensitivity, m_predictionGroup.TrafficTerminal, m_predictionGroup.TrafficService, m_predictionGroup.IsShadow, m_predictionGroup.IsIndoorCoverage, m_predictionGroup.CoverageProb);
     m_UMTSTerminal = (UMTSTerminal)m_predictionGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.UMTS);
 }
Exemple #6
0
        private void GetDataFromContext(Context context)
        {
            m_bestServerRSCP = (ValueMatrixShort)context[ContextKeys.UmtsBestServerRSCP];
            m_bestServerCellID = (ValueMatrixShort)context[ContextKeys.UmtsBestServerCellID];
            m_pg = (UMTSPredictionGroup)context[ContextKeys.Group];
            m_cells = (List<IACell>)context[ContextKeys.CellList];
            tfMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix];

            IBaseService appContext = (IBaseService)context[ContextKeys.ApplicationContext];
            IProjectManager projectManager = ServiceHelper.Lookup<IProjectManager>(appContext);
            m_ProjectPath = projectManager.CurrentProjectLossPath;
            linkLossCalc = new CoLinkLossCalc(m_pg.RxSensitivity, m_pg.TrafficTerminal, m_pg.TrafficService, m_pg.IsShadow, m_pg.IsIndoorCoverage, m_pg.CoverageProb);
        }
Exemple #7
0
 /// <summary>
 /// 根据业务类型得到是否支持软切换
 /// </summary>
 /// <returns></returns>
 private bool IsSupportHandover(UMTSPredictionGroup predictionGroup)
 {
     bool isHandover = false;
     if ((predictionGroup.CsService as UnionCsService) != null)
     {
         UnionCsService csService = predictionGroup.CsService as UnionCsService;
         UMTSService service = csService.CSServiceDic[NetWorkType.UMTS] as UMTSService;
         isHandover = service.UseHandoff;
     }
     else if ((predictionGroup.PsService as UnionPsService) != null)
     {
         UnionPsService psService = predictionGroup.PsService as UnionPsService;
         UMTSService service = psService.PSServiceDic[NetWorkType.UMTS] as UMTSService;
         isHandover = service.UseHandoff;
     }               
     return isHandover;
 }