public object Clone() { UMTSTerminal terminal = new UMTSTerminal(); terminal.ActiveSetSize = this.ActiveSetSize; terminal.Attenuation = base.Attenuation; terminal.DlMaxTxPower = this.DlMaxTxPower; terminal.EnableCompressedMode = this.EnableCompressedMode; terminal.EnableHsdpa = this.EnableHsdpa; terminal.EnableHsupa = this.EnableHsupa; terminal.Gain = base.Gain; terminal.HSDPAUECategoryIndex = this.HSDPAUECategoryIndex; terminal.HSPAsupport = this.HSPAsupport; terminal.HSUPAUECategoryIndex = this.HSUPAUECategoryIndex; terminal.Loss = base.Loss; terminal.MaxTxPower = base.MaxTxPower; terminal.MinTxPower = base.MinTxPower; terminal.MudFactor = this.MudFactor; terminal.Name = base.Name; terminal.NoiseFigure = base.NoiseFigure; terminal.RakeEfficiency = this.RakeEfficiency; terminal.Reception = base.Reception; terminal.RhoFactor = this.RhoFactor; terminal.RxAntNum = this.RxAntNum; terminal.TxAntNum = this.TxAntNum; terminal.UMTSHsdpaUeCategory = this.UMTSHsdpaUeCategory; terminal.UMTSHsupaUeCategory = this.UMTSHsupaUeCategory; return terminal; }
//构造使用PS业务的用户 public static User CreateUser_PS() { Mobility mobility = new Mobility("mobility", 30); int Priority = 1; #region 业务参数 UnionPsService unionPsService = new UnionPsService(); Dictionary<NetWorkType, Service> PSServiceDic = new Dictionary<NetWorkType, Service>(); UMTSPsService umtsPsService = new UMTSPsService(); umtsPsService.UmtsR99Bearer = new UMTSR99Bearer(); PSServiceDic.Add(NetWorkType.UMTS, umtsPsService); unionPsService.PSServiceDic = PSServiceDic; #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, unionPsService, terminal, LinkType.Uplink, Priority); return user; #endregion }
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 UmtsTerminalDesc(TerminalManagement terminalManager, ReceptionEquipmentManagement receptionEquipment, Terminal terminal) { this.m_NewNames = new List<string>(); this.m_TerminalManagement = terminalManager; this.m_ReceptionEquipment = receptionEquipment; this.m_Terminal = terminal; this.m_UmtsTerminal = terminal.NetTerminalList[0] as UMTSTerminal; }
public TerminalUmtsPropertyModel(TrafficCollectionModel model, Terminal terminal) { this.m_ReceptionEquipment = model.RecepEquipManagement; this.m_HsupaUeCategoryMangement = model.HsupaUeCategoryManagement; this.m_HsdpaUeCategoryManagement = model.HsdpaUeCategoryManagement; this.m_Terminal = terminal; this.m_UmtsTerminal = (terminal.NetTerminalList[0] as UMTSTerminal).Clone() as UMTSTerminal; this.m_Terminal.NetTerminalList.Clear(); this.m_Terminal.NetTerminalList.Add(this.m_UmtsTerminal); }
/// <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; }
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); }
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 UMTSPredictionGroup InitialGroup() { UMTSPredictionGroup group = new UMTSPredictionGroup(); group.Name = "group1"; group.Region = MockRegion.CreateRegion(); group.Region.Name = "region1"; Terminal terminal = new Terminal(); terminal.ID = 0; List<NetworkTerminal> m_List = new List<NetworkTerminal>(); UMTSTerminal umtsTerminal1 = new UMTSTerminal(); umtsTerminal1.NetType = NetWorkType.UMTS; m_List.Add(umtsTerminal1); UMTSTerminal umtsTerminal2 = new UMTSTerminal(); umtsTerminal2.NetType = NetWorkType.UMTS; m_List.Add(umtsTerminal2); terminal.NetTerminalList = m_List; group.TrafficTerminal = terminal; return group; }
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; }
/// <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); }
/// <summary> /// 从context里获取数据 /// </summary> /// <param name="context"></param> private void GetDataFromContext(Context context) { m_Group = (CoPredicGroup)context[ContextKeys.Group]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; IProjectManager projectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_ProjectPath = projectManager.CurrentProjectLossPath; //获得Cell列表 m_CellList = (List<IACell>)context[ContextKeys.CellList]; //获得接收功率矩阵 m_GSMBestServerRSCP = (ValueMatrixShort)context[ContextKeys.CoGSMBestServerRSCP]; m_UMTSBestServerRSCP = (ValueMatrixShort)context[ContextKeys.CoUMTSBestServerRSCP]; m_TDBestServerRSCP = (ValueMatrixShort)context[ContextKeys.CoTDSCDMABestServerRSCP]; m_LTEBestServerRSCP = (ValueMatrixShort)context[ContextKeys.CoLTEBestServerRSCP]; m_GSMBestServerID = (ValueMatrixDouble)context[ContextKeys.CoGSMBestServerID]; m_UMTSBestServerID = (ValueMatrixDouble)context[ContextKeys.CoUMTSBestServerID]; m_TDBestServerID = (ValueMatrixDouble)context[ContextKeys.CoTDBestServerID]; m_LTEBestServerID = (ValueMatrixDouble)context[ContextKeys.CoLTEBestServerID]; //获得干扰矩阵 m_GSMInterf = (ValueMatrixDouble)context[ContextKeys.CoGSMInterf]; m_UMTSInterf = (ValueMatrixDouble)context[ContextKeys.CoUMTSInterf]; m_TDInterf = (ValueMatrixDouble)context[ContextKeys.CoTDInterf]; m_LTEInterf = (ValueMatrixDouble)context[ContextKeys.CoLTEInterf]; m_UMTSTerminal = (UMTSTerminal)m_Group.CoUMTSGroup.Terminal.GetNetWorkTerminal(NetWorkType.UMTS); m_TDTerminal = (TDTerminal)m_Group.CoTDSCDMAGroup.Terminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); m_LTETerminal = (LTETerminal)m_Group.CoLTEGroup.Terminal.GetNetWorkTerminal(NetWorkType.LTE); }
/// <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); }