public void UMTSDetailCalcTest() { ModelList = UMTSPointAnalysisMock.MockModelList(); bearer = new UMTSR99Bearer(); csService = new UnionCsService(); UMTSService umtsService = new UMTSService(); umtsService.R99Bearer = "ADPCH-UL64"; umtsService.UmtsR99Bearer = new UMTSR99Bearer(); umtsService.UmtsR99Bearer.DLNominalRate = 100f; ((UnionCsService)csService).CSServiceDic.Add(NetWorkType.UMTS, umtsService); psService = new UnionPsService(); ((UnionPsService)psService).PSServiceDic.Add(NetWorkType.UMTS, umtsService); Terminal terminal = new Terminal(); UMTSTerminal umtsTerminal = new UMTSTerminal(); terminal.NetTerminalList.Add(umtsTerminal); UMTSGetActiveSet detailCac = new UMTSGetActiveSet(ModelList, umtsService, umtsService, umtsTerminal); Assert.AreEqual(20, detailCac.RxPower); Assert.AreEqual(2, detailCac.BestServer.ID); Assert.AreEqual(3, detailCac.ActiveSet.Count); UMTSGetActiveSet detailCac2 = new UMTSGetActiveSet(ModelList, null, umtsService, umtsTerminal); }
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); }
/// <summary> /// 构造函数 /// </summary> /// <param name="modelList"></param> /// <param name="csService"></param> /// <param name="psService"></param> /// <param name="terminal"></param> public UMTSGetActiveSet(List<RxPowerAndLinkLossModel> modelList,UMTSService csService,UMTSService psService,UMTSTerminal terminal) { m_ModelList = modelList; m_CsService = csService; m_PsService = psService; m_Terminal = terminal; m_RxPower = double.MinValue; GetBestServer(modelList); m_EcIo = this.GetEcIo(m_BestServer); this.GetActiveSet(); }
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; }
[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); }
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); } }
[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); }
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); }
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); }
private Service GenerateUmtsService() { UMTSService service = new UMTSService(); service.Name = this.GetServiceName(); service.BodyLoss = (float) this.tbBodyLoss.Value; service.UseHandoff = this.chbSoft.Checked; service.OverHSPA = this.chbOverHspa.Checked; service.EnableHsdpa = this.chbHsdpa.Checked; service.EnableHsupa = this.chbHsupa.Checked; service.OverHSPA = this.chbOverHspa.Checked; if (this.chbOverHspa.Checked) { service.OverHSPA = true; service.TSBoundary = (float) this.tbTsBoundary.Value; service.TSGain = (float) this.tbTsGain.Value; } else { service.TSBoundary = 0f; service.TSGain = 0f; service.OverHSPA = false; } service.Priority = (int) this.tbPriority.Value; service.Technology = NetWorkType.UMTS; service.FreqBand = this.cmbFrequency.SelectedValue.ToString(); service.ChannelIndex = int.Parse(this.cmbChannelIndex.SelectedValue.ToString()); service.R99Bearer = this.cmbR99Bearer.Text; service.UmtsR99Bearer = this.m_serviceUmtsControl.GetUmtsR99BearByName(this.cmbR99Bearer.Text); return service; }
public void MyTestInitialize() { m_Index = 0; m_Name = "EPDSCHEcNtCase"; m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context(); m_Case = new EPDSCHEcNtCase(); cellList = new List<IACell>(); TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); LinkLossAssist.Init(); group = new UMTSPredictionGroup(); group.Region = MockRegion.CreateRegion(); group.Name = "UMTSPredictionGroup"; group.UIParam.ULRakeEffiFactor = 0.6f; group.UIParam.ULDivGain = 0; UnionPsService psService = new UnionPsService(); UMTSService umtsService = new UMTSService(); umtsService.UmtsR99Bearer = new UMTSR99Bearer(); umtsService.UmtsR99Bearer.ULNominalRate = 3.4f; umtsService.UseHandoff = true; umtsService.EnableHsupa = true; 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.EnableHsupa = true; tempTerminal.NetType = NetWorkType.UMTS; terminalList.Add(tempTerminal); group.TrafficTerminal.NetTerminalList = terminalList; 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); ShortResultStruct srsID = ShortResultStruct.DefaultMax; m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID); for (int i = 0; i < 2; i++) { IACell cell = new UMTSCell(); UMTSCell umtsCell = cell as UMTSCell; umtsCell.CellType = CarrierTypeOfUMTS.HSUPA; 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>>(); 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_Case.Name = m_Name; }
[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]); }
private Service GetUmtsService(string name) { UMTSService service = new UMTSService(); service.Name = name; return service; }
[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]); }
/// <summary> /// 根据业务和终端判断用户类型 /// </summary> /// <param name="service">业务</param> /// <param name="terminal">终端</param> private void JudgeUserType(Service service,UMTSTerminal terminal) { UMTSService m_umtsService = new UMTSService(); if (service as UnionPsService != null) { UnionPsService psService = service as UnionPsService; m_umtsService = psService.PSServiceDic[NetWorkType.UMTS] as UMTSService; } else { UnionCsService csService = service as UnionCsService; m_umtsService = csService.CSServiceDic[NetWorkType.UMTS] as UMTSService; } bool enableHsdpa = m_umtsService.EnableHsdpa && terminal.EnableHsdpa; bool enableHsupa = m_umtsService.EnableHsupa && terminal.EnableHsupa; if (enableHsdpa) m_PreAccessCellList = m_HSDPACellList; else if (enableHsupa) m_PreAccessCellList = m_HSUPACellList; else m_PreAccessCellList = m_R99CellList; }
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); }