Пример #1
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();
        }
Пример #2
0
        //构造使用CS业务的用户
        public static User CreateUser_CS()
        {
            Mobility mobility = new Mobility("mobility", 30);
            int Priority = 1;
            #region 业务参数
            UnionCsService unionCsService = new UnionCsService();
            Dictionary<NetWorkType, Service> CSServiceDic = new Dictionary<NetWorkType, Service>();
            UMTSCsService umtsCsService = new UMTSCsService();
            umtsCsService.UmtsR99Bearer = new UMTSR99Bearer();
            CSServiceDic.Add(NetWorkType.UMTS, umtsCsService);
            unionCsService.CSServiceDic = CSServiceDic;
            #endregion

            #region 终端参数
            Terminal terminal = new Terminal();
            List<NetworkTerminal> NetterminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            NetterminalList.Add(tempTerminal);
            terminal.NetTerminalList = NetterminalList;
            User user = new User(mobility, unionCsService, terminal, LinkType.Uplink, Priority);
            return user;
            #endregion
        }
Пример #3
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);
            
        }
Пример #4
0
 public bool CheckCServiceDataAndCommitData(UnionCsService unionCsService, string modServiceName, string change, ref string info)
 {
     if (!this.IsCsServicePropertyValid(unionCsService, modServiceName, change, ref info))
     {
         return false;
     }
     this.CommitCsData(unionCsService, change);
     return true;
 }
Пример #5
0
 public void CalculateDownLinkDetail_Test1()
 {
     Service csService = new UnionCsService();
     csService.CommonType = CommonServiceType.CSService;
     GSMService gsmService = new GSMService();
     ((UnionCsService)csService).CSServiceDic.Add(NetWorkType.GSM, gsmService);
     Mobility mobility = new Mobility();
     Terminal terminal = new Terminal();
     GSMTerminal gsmTerminal = new GSMTerminal();
     gsmTerminal.NetType = NetWorkType.GSM;
     terminal.NetTerminalList.Add(gsmTerminal);
     IDetail detail = m_GSMCellCalculator.CalculateDownLinkDetail(m_ModelList, m_Point, csService, mobility, terminal);
 }
Пример #6
0
 public void CommitCsData(UnionCsService unionCsService, string change)
 {
     if (change == this.ADDSTRING)
     {
         this.m_UnionCsManagement.AddUnionCsService(this, unionCsService);
         this.m_OldName = unionCsService.Name;
     }
     else
     {
         unionCsService.ID = this.m_UnionCsManagement.FindUnionCsServiceByName(this.m_OldName).ID;
         this.m_UnionCsManagement.ModifyUnionCsService(this, unionCsService);
         this.m_OldName = unionCsService.Name;
     }
 }
Пример #7
0
 [Test]  //测试clone
 public void Clonetest()
 {
     UMTSPredictionGroup group = InitialGroup();
     group.TrafficTerminal = new Terminal();
     UnionCsService csService = new UnionCsService();
     Service umtsCSService = new UMTSService();
     csService.CSServiceDic.Add(NetWorkType.UMTS, umtsCSService);
     group.CsService = csService;
     UnionPsService psService = new UnionPsService();
     Service umtsPSService = new UMTSService();
     psService.PSServiceDic.Add(NetWorkType.UMTS, umtsPSService);
     group.PsService = psService;
     group.TrafficMobility = new Mobility();
     Assert.AreEqual(group.GroupId, group.Clone().GroupId);
     Assert.AreEqual(group.HandoverAreaThreshold, group.Clone().HandoverAreaThreshold);
     Assert.AreEqual(group.InterferenceGate, group.Clone().InterferenceGate);
 }
Пример #8
0
        public static GSMSimUser MockGsmSimUser()
        {
            User trafficUser = new User();
            trafficUser.Service = new MockService();
            trafficUser.Service.CommonType = CommonServiceType.CSService;
            GSMSimUser user = new GSMSimUser(trafficUser);

            GSMSimTRX trx1 = MockGsmSimTrx();           
            user.BestServer = trx1;
            user.BestServer.NeTRX.TRXType = TRXType.BCCH;
             
            user.BestServer.CellUsers = new List<GSMSimUser>();

            GSMService gsmCsService = new GSMService();
            UnionCsService csService = new UnionCsService();
            csService.CSServiceDic.Add(NetWorkType.GSM, gsmCsService);
            user.TrafficUser.Service = csService;

            GSMTerminal gsmTerminal = new GSMTerminal();
            gsmTerminal.NetType = NetWorkType.GSM;
            Terminal terminal = new Terminal();
            terminal.Technology = NetWorkType.GSM;
            terminal.NetTerminalList.Add(gsmTerminal);
            user.TrafficUser.Terminal =terminal;
                      

            Site site = MockSite();
            Transceiver tran = new Transceiver();
            user.BestServer.Parent = tran;
            user.BestServer.Parent.Parent = site;

            //Dictionary<GSMTimeSlot, float> dlInterf = new Dictionary<GSMTimeSlot, float>();     
            //Dictionary<GSMTimeSlot, float> dlcirs = new Dictionary<GSMTimeSlot, float>();
            ////Dictionary<GSMTimeSlot, float> preUlTxPower = new Dictionary<GSMTimeSlot, float>();
            //for (int i = 0; i < 8; i++)
            //{
            //    dlcirs.Add(TSes[i], 15 + i * 2);              
            //}
            //user.DlCirs = dlcirs;
            //user.PreULTxPower = preUlTxPower;


            return user;
        }
Пример #9
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);
            }
        }
Пример #10
0
 [Test]  //测试clone的studyList
 public void Clonetest_study()
 {
     UMTSPredictionGroup group = InitialGroup();
     group.TrafficTerminal = new Terminal();
     UnionCsService csService = new UnionCsService();
     Service umtsCSService = new UMTSService();
     csService.CSServiceDic.Add(NetWorkType.UMTS, umtsCSService);
     group.CsService = csService;
     UnionPsService psService = new UnionPsService();
     Service umtsPSService = new UMTSService();
     psService.PSServiceDic.Add(NetWorkType.UMTS, umtsPSService);
     group.PsService = psService;
     group.TrafficMobility = new Mobility();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Clone();
     study2.Clone();
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(group.StudyList[0].Clone().Name, group.Clone().StudyList[0].Clone().Name);
 }
Пример #11
0
   //构造使用CS业务的用户
 public static  User CreatUser_CS()
   {
       Mobility mobility = new Mobility("mobility",30);
     //构造业务参数
       UnionCsService unionCsService = new UnionCsService();
       Dictionary<NetWorkType, Service> CSServiceDic = new Dictionary<NetWorkType, Service>();
       TDCsService tdCsService = new TDCsService();
       tdCsService.TDR99Bearer = new TDR99Bearer();
       CSServiceDic.Add(NetWorkType.TDSCDMA, tdCsService);
       unionCsService.CSServiceDic = CSServiceDic;
     //构造终端参数
       Terminal terminal = new Terminal();
       List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
       TDTerminal tempTerminal = new TDTerminal();
       tempTerminal.NoiseFigure = 2;
       tempTerminal.NetType = NetWorkType.TDSCDMA;
       tempTerminal.MinTxPower = 24;
       tempTerminal.MaxTxPower = 36;
       terminalList.Add(tempTerminal);
       terminal.NetTerminalList = terminalList;
       User user = new User(mobility, unionCsService, terminal, LinkType.Downlink, 1);
       user.Id = 0;
       return user;
   }
Пример #12
0
 private void InitServiceProperty(Service service)
 {
     if (service.CommonType == CommonServiceType.PSService)
     {
         this.m_UnionPsService = service as UnionPsService;
         this.m_GsmService = this.m_UnionPsService.PSServiceDic[NetWorkType.GSM] as GSMService;
     }
     else
     {
         this.m_CommonServiceType = CommonServiceType.CSService;
         this.m_UnionCsService = service as UnionCsService;
         this.m_GsmService = this.m_UnionCsService.CSServiceDic[NetWorkType.GSM] as GSMService;
         this.m_GsmService.Name = this.m_UnionCsService.Name;
     }
 }
Пример #13
0
 private void InitServiceProperty(Service service)
 {
     if (service.CommonType == CommonServiceType.PSService)
     {
         m_UnionPsService = service as UnionPsService;
         m_UnionPsService.Technology = NetWorkType.TDSCDMA;
         m_TDService = m_UnionPsService.PSServiceDic[NetWorkType.TDSCDMA] as TDService;
     }
     else
     {
         m_CommonServiceType = CommonServiceType.CSService;
         m_UnionCsService = service as UnionCsService;
         m_UnionCsService.Technology = NetWorkType.TDSCDMA;
         m_TDService = m_UnionCsService.CSServiceDic[NetWorkType.TDSCDMA] as TDService;
     }
 }
Пример #14
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);
        }
Пример #15
0
 private UnionCsService GenerateCsService()
 {
     UnionCsService service = new UnionCsService();
     service.DlActivity = (float) this.tbDlActivity.Value;
     service.UlActivity = (float) this.tbUlActivity.Value;
     service.UlAveRate = float.Parse(this.cmbAmrUp.Text);
     service.DlAveRate = float.Parse(this.cmbAmrDown.Text);
     service.Name = this.GetServiceName();
     service.Technology = this.m_Type;
     service.Type = ServiceType.Voice;
     this.AddSingleServiceToUnionService(service.CSServiceDic, this.cmbGsm);
     this.AddSingleServiceToUnionService(service.CSServiceDic, this.cmbTd);
     this.AddSingleServiceToUnionService(service.CSServiceDic, this.cmbUmts);
     this.AddSingleServiceToUnionService(service.CSServiceDic, this.cmbLte);
     return service;
 }
Пример #16
0
 private Service GenAndInitCSService()
 {
     UnionCsService service = new UnionCsService();
     service.DlAveRate = 12.2f;
     service.UlAveRate = 12.2f;
     service.UlActivity = 1f;
     service.DlActivity = 1f;
     return service;
 }
Пример #17
0
 private UnionCsService GenerateCsService()
 {
     UnionCsService service = new UnionCsService();
     service.BodyLoss = (float) this.tbBodyLoss.Value;
     service.DlActivity = (float) this.tbDlActivity.Value;
     service.UlActivity = (float) this.tbUlActivity.Value;
     service.UlAveRate = (float) this.cmbUlAmrRate.SelectedValue;
     service.DlAveRate = (float) this.cmbDlAmrRate.SelectedValue;
     service.Name = this.GetServiceName();
     service.Technology = NetWorkType.UMTS;
     service.Type = ServiceType.Voice;
     service.CSServiceDic.Add(NetWorkType.UMTS, this.GenerateUmtsService());
     return service;
 }
Пример #18
0
 public bool CheckCsServiceDataAndCommitData(UnionCsService service, string modelServiceName, string change, ref string info)
 {
     if (!IsCsServicePropertyValid(service, modelServiceName, change, ref info))
     {
         return false;
     }
     CommitCsData(service ,change );
     return true;
 }
Пример #19
0
 private bool IsCsServicePropertyValid(UnionCsService unionCsService, string oldName, string change, ref string info)
 {
     if (!this.IsNameValid(oldName, unionCsService.Name, ref info))
     {
         return false;
     }
     if ((unionCsService.BodyLoss < this.MINVALUE) || (unionCsService.BodyLoss > this.MAXVALUE))
     {
         return false;
     }
     if ((unionCsService.DlActivity < this.MINVALUE) || (unionCsService.DlActivity > this.MAXONEVALUE))
     {
         info = string.Format(TrafficMapResource.TRAFFIC_MESSAGE_IMPROPERTY, TrafficModelResource.TRAFFICMODEL_SERVICE_ACTIVITY);
         return false;
     }
     if ((unionCsService.UlActivity < this.MINVALUE) || (unionCsService.UlActivity > this.MAXONEVALUE))
     {
         info = string.Format(TrafficMapResource.TRAFFIC_MESSAGE_IMPROPERTY, TrafficModelResource.TRAFFICMODEL_SERVICE_ACTIVITY);
         return false;
     }
     return true;
 }
Пример #20
0
        [Test]//CS 业务
        public void ULDPCHSinrCase_6()
        {
            UnionCsService csService = new UnionCsService();
            UMTSService umtsService = new UMTSService();
            umtsService.UmtsR99Bearer = new UMTSR99Bearer();
            umtsService.UmtsR99Bearer.ULNominalRate = 3.4f;
            umtsService.UseHandoff = false;
            umtsService.EnableHsupa = true;

            csService.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.CsService = csService;

            m_Context.Add(ContextKeys.Group, group);
            m_Case.InitialCase(m_Context);
            
            m_BestServerID[0] = 0;
            List<short> cellOfSHO = new List<short>();
            cellOfSHO.Add(cellList[0].ID);
            m_BinMapCellsDic.Add(0, cellOfSHO);
            for (int i = 0; i < 2; i++)
            {
                m_Context.Add(ContextKeys.CurrentCalcCell, cellList[i]);
                RunCase();
                m_Context.Remove(ContextKeys.CurrentCalcCell);
            }
            ValueMatrixShort EPDSCHSinr = m_Context[ContextKeys.UmtsEPDSCHEcNt] as ValueMatrixShort;
            Assert.AreEqual(3230, EPDSCHSinr[0]);
        }
Пример #21
0
 private void CommitCsData(UnionCsService service, string change)
 {
     if (change == ADDSTRING)
     {
         m_UnionCsServiceManagement.AddUnionCsService(this, service);
         m_OldName = service.Name;
     }
     else
     {
         service.ID = m_UnionCsServiceManagement.FindUnionCsServiceByName(service.Name).ID;
         m_UnionCsServiceManagement.ModifyUnionCsService(this, service);
         m_OldName = service.Name;
     }
 }
Пример #22
0
 public MockITrafficForApplication()
 {
     m_UnionCsService = CreatUnionCsService();
     m_UnionCsServiceList.Add(m_UnionCsService);
     //m_terminal1 = CreatGsmTerminal();
     //m_TerminalList.Add(m_terminal1);
 }
Пример #23
0
 private void ModifyServiceToCollection(object sender, string oldName, string newName)
 {
     Service serviceByName = this.GetServiceByName(oldName);
     if (serviceByName.CommonType == CommonServiceType.CSService)
     {
         UnionCsService modService = new UnionCsService();
         modService.CopyFrom(serviceByName as UnionCsService);
         modService.ID = serviceByName.ID;
         modService.Name = newName;
         this.m_TrafficColModel.UnionCsServiceManagement.ModifyUnionCsService(sender, modService);
     }
     else
     {
         UnionPsService service3 = new UnionPsService();
         service3.CopyFrom(serviceByName as UnionPsService);
         service3.ID = serviceByName.ID;
         service3.Name = newName;
         this.m_TrafficColModel.UnionPsServiceManagement.ModifyUnionPsService(sender, service3);
     }
 }
Пример #24
0
 private bool IsCsServicePropertyValid(UnionCsService service, string modelServiceName, string change, ref string info)
 {
     if(!IsNameValid(modelServiceName ,service.Name ,ref info ))
     {
         return false;
     }
     if(service .BodyLoss <MINVALUE||service.BodyLoss>MAXVALUE)
     {
         return false;
     }
     if (service.DlActivity < MINVALUE || service.DlActivity > MAXONEVALUE)
     {
         info = string.Format(TrafficMapResource.TRAFFIC_MESSAGE_IMPROPERTY, TrafficModelResource.TRAFFICMODEL_SERVICE_ACTIVITY);
         return false;
     }
     if (service.UlActivity < MINVALUE || service.UlActivity > MAXONEVALUE)
     {
         info = string.Format(TrafficMapResource.TRAFFIC_MESSAGE_IMPROPERTY, TrafficModelResource.TRAFFICMODEL_SERVICE_ACTIVITY);
         return false;
     }
     return true;
 }
Пример #25
0
        private UnionCsService CreatUnionCsService()
        {
            UnionCsService m_UnionCsService = new UnionCsService();
            m_UnionCsService.Technology = NetWorkType.GSM;
            m_UnionCsService.Type = ServiceType.Voice;
            GSMService gsmService = new GSMService();
            gsmService.ReqCIR = 9;
            m_UnionCsService.CSServiceDic[NetWorkType.GSM] = gsmService;

            return m_UnionCsService;
        }
Пример #26
0
 public bool ValidateDr(DataRow dr, List<Service> excludeService, int validateId)
 {
     this.m_ValidateId = validateId;
     UnionPsService service = new UnionPsService();
     UnionCsService service2 = new UnionCsService();
     IExtractor ex = new DataRowExtractor(dr);
     if ((this.m_CsServiceManagement.FindUnionCsServiceById(validateId) != null) || (dr.ItemArray[1].ToString() == CommonServiceType.CSService.ToString()))
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service2);
     }
     else if ((this.m_PsServiceManagement.FindUnionPsServiceById(validateId) != null) || (dr.ItemArray[1].ToString() == CommonServiceType.PSService.ToString()))
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service);
     }
     else if (this.m_PsServiceManagement.FindUnionPsServiceById(validateId) == null)
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service);
     }
     return this.Validate(ref this.m_Info, this.m_ServiceDesc, ex, validateId);
 }
Пример #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);

        }
Пример #28
0
        [Test]//CS业务
        public void HSUPAPeakThroughCase_4()
        {
            UnionCsService csService = new UnionCsService();
            UMTSService umtsService = new UMTSService();
            umtsService.UmtsR99Bearer = new UMTSR99Bearer();
            umtsService.UmtsR99Bearer.ULNominalRate = 3.4f;
            umtsService.UseHandoff = false;
            umtsService.EnableHsupa = true;

            csService.CSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.CsService = csService;
            
            m_Context.Add(ContextKeys.Group, group);
            m_Case.InitialCase(m_Context);
            
            m_BestServerID[0] = 1;
            IACell cell1 = new UMTSCell();
            IACell cell2 = new UMTSCell();
            ((UMTSCell)cell1).CellType = CarrierTypeOfUMTS.HSDPA;
            ((UMTSCell)cell1).FreqBand.BandWidth = 3.84f;
            ((UMTSCell)cell2).CellType = CarrierTypeOfUMTS.HSDPA;
            ((UMTSCell)cell2).FreqBand.BandWidth = 3.84f;
            cellList.Add(cell1);
            cellList.Add(cell2);
            double[] x = new double[2] { 50, 100 };
            double[] y = new double[2] { 50, 100 };
            MockCellList.CreateCellList(cellList, x, y);
            UMTSCell bestCell = (UMTSCell)SearchAssist.GetCellbyID(0, cellList);
            bestCell.CellType = CarrierTypeOfUMTS.R99;
            for (int i = 0; i < 2; i++)
            {
                m_Context.Add(ContextKeys.CurrentCalcCell, cellList[i]);
                RunCase();
                m_Context.Remove(ContextKeys.CurrentCalcCell);
            }
            ValueMatrixInt HSUPAPeakThrough = m_Context[ContextKeys.UmtsHSUPAPeakThrough] as ValueMatrixInt;
            Assert.AreEqual(0, HSUPAPeakThrough[0]);
        }