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 = "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); }
/// <summary> /// 计算干扰小区(下行)到被干扰小区(上行)的链路损耗 /// </summary> /// <param name="tfMatrix"></param> /// <param name="bestCell"></param> /// <param name="intfCell"></param> /// <param name="pg"></param> /// <returns></returns> public static float GetCellToCellLinkLoss(IACell bestCell, IACell intfCell,TDPredictionGroup pg) { User usr = ConstructionUserByCell(bestCell, pg); AntConfig mainAnt = FindMainAnt(intfCell.Parent.AntConfiguration); double pathLossGate = GetPathLossGate(intfCell.MaxPower, pg.RxSensitivity, mainAnt); float[] result = GetLinkLoss(usr, pathLossGate, intfCell, pg); float antGain = GetSAMainGain(intfCell, usr); return result[1] - antGain; }
public IPredictionGroup CreateGroup(List<StudyTemplate> studyTemplateList, string groupName, int groupID, NetWorkType predictionType) { TDPredictionGroup tdGroup = new TDPredictionGroup(); tdGroup.Name = groupName; tdGroup.GroupId = groupID; tdGroup.PredictionType = predictionType; tdGroup.appContext = m_AppContext; tdGroup.State = CalculateState.Indeterminate; InitStudyList(studyTemplateList, tdGroup); return tdGroup; }
/// <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]; }
/// <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); }
private void InitTerminal(TDPredictionGroup group) { m_Terminal = new Terminal(); group.TrafficTerminal = m_Terminal; List<NetworkTerminal> netTerminalList = new List<NetworkTerminal>(); m_Terminal.NetTerminalList = netTerminalList; TDTerminal tdTerminal = new TDTerminal(); tdTerminal.MaxTxPower = 21; tdTerminal.Attenuation = 45f; tdTerminal.NetType = NetWorkType.TDSCDMA; netTerminalList.Add(tdTerminal); }
/// <summary> /// 初始化StudyList /// </summary> /// <param name="studyTemplateList"></param> /// <param name="pg"></param> private void InitStudyList(List<StudyTemplate> studyTemplateList, TDPredictionGroup pg) { foreach (StudyTemplate item in studyTemplateList) { IStudy study = m_StudyFactory.CreateInstance(item); //study.CategoryValue = Category.Common; study.IsBasic = item.IsBasic; study.Name = item.Name; study.Unit = item.Unit; pg.StudyList.Add(study); } }
/// <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; }
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]; }
private void InitTerminal(TDPredictionGroup group) { m_Terminal = new TDTerminal(); m_Terminal = (TDTerminal)group.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); m_Terminal.EnableHsdpa = true; //List<NetworkTerminal> netTerminalList = new List<NetworkTerminal>(); //m_Terminal.NetTerminalList = netTerminalList; //TDTerminal tdTerminal = new TDTerminal(); //tdTerminal.MaxTxPower = 21; //tdTerminal.UppchPower = 23; //tdTerminal.NetType = NetWorkType.TDSCDMA; //netTerminalList.Add(tdTerminal); }
/// <summary> /// 构造函数 /// </summary> /// <param name="tdGroupMgr"></param> public TDSCDMAPropertyForm(IPredictionGroup group) { InitializeComponent(); m_tdPredicGroup = (TDPredictionGroup)group; m_appContext = m_tdPredicGroup.appContext; m_TDUIParam = m_tdPredicGroup.tdUIParam; m_TranfficForApplication = ServiceHelper.Lookup<ITrafficForApplication>(m_appContext); m_GeoProvider = ServiceHelper.Lookup<IGeoProvider>(m_appContext); m_tdTerminalList = m_TranfficForApplication.FindTerminalList(NetWorkType.TDSCDMA); m_CsServiceList = m_TranfficForApplication.UnionCsServiceList; m_PsServiceList = m_TranfficForApplication.UnionPsServiceList; Init(); }
public void MyTestInitialize() { m_Name = "DLPeakThroughput"; 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; m_terminal = new TDTerminal(); //m_Group.TrafficTerminal.NetTerminalList.Add(m_terminal); m_terminal = (TDTerminal)m_Group.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); m_terminal.EnableHSUPA = true; //UnionCsService m_service = new UnionCsService(); //UnionPsService service = new UnionPsService(); //TDPsService S = new TDPsService(); ////((TDPsService)m_Group.TrafficService ).EnableHSUPA = true; //service.PSServiceDic.Add(NetWorkType.TDSCDMA, S); //(service.PSServiceDic[NetWorkType.TDSCDMA] as TDPsService).EnableHSUPA = true; LinkLossAssist.Init(); m_Case = new HSUPAPeakThroughputCase(); m_projectMgr = ServiceHelper.Lookup<IProjectManager>(ProjectSingleton.CurrentProject.AppContext); GenerateMatrix(); m_BestServerIDMatrix[m_index] = (short)(m_Cell.ID); m_HSUPACIMatrix[m_index] = -540; 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(); }
/// <summary> /// 初始化计算中需要的指标以及存储路径 /// </summary> /// <param name="tfMatrix"></param> /// <param name="tdGroup"></param> private void InitMatrix(TrueFalseMatrix tfMatrix, TDPredictionGroup tdGroup) { IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext); string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID); string relativePathID = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID); string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.HSPDSCHRSCP); string relativePathRSCP = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.HSPDSCHRSCP); string absolutePathInterf = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.HSPDSCHInterf); string relativePathInterf = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.HSPDSCHInterf); string absolutePathOther = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.OtherSystemInterf); string relativePathOther = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.OtherSystemInterf); m_BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathID, relativePathID, ShortResultStruct.DefaultMax); m_HSPDSCHRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathRSCP, relativePathRSCP, ShortResultStruct.DefaultMin); m_HSPDSCHInterf = new ValueMatrixDouble(absolutePathInterf, relativePathInterf, tfMatrix.RowCount, tfMatrix.ColCount); m_HSPDSCHInterf.SetValue(0, 0, double.NegativeInfinity); m_OtherSystemInterf = new ValueMatrixDouble(absolutePathOther, relativePathOther, tfMatrix.RowCount, tfMatrix.ColCount); m_OtherSystemInterf.SetValue(0, 0, double.NegativeInfinity); }
public void Inital() { #region 初始化小区 bestCell = new TDSCDMACarrier(); bestCell.FreqBand=new FrequencyBand(); bestCell.FreqBand.BandWidth = 1.6f; bestCell.FreqBand.DLFrequency = 2010.0f; bestCell.FreqBand.StartChIndex = 0; bestCell.ChannelIndex = 0; intefCell = new TDSCDMACarrier(); intefCell.FreqBand = new FrequencyBand(); intefCell.FreqBand.BandWidth = 1.6f; intefCell.FreqBand.DLFrequency = 2010.0f; intefCell.FreqBand.StartChIndex = 0; intefCell.ChannelIndex = 0; ((TDSCDMACarrier)intefCell).OrthCoef = 0.5f; intefCell1 = new UMTSCell(); intefCell1.FreqBand = new FrequencyBand(); intefCell1.FreqBand.BandWidth = 1.6f; intefCell1.FreqBand.DLFrequency = 2010.0f; intefCell1.FreqBand.StartChIndex = 0; intefCell1.ChannelIndex = 0; intefCell2 = new GSMTRX(); intefCell2.FreqBand = new FrequencyBand(); intefCell1.FreqBand.BandWidth = 2.4f; intefCell1.FreqBand.DLFrequency = 1800.0f; intefCell1.FreqBand.StartChIndex = 0; intefCell1.ChannelIndex = 0; #endregion LinkLossAssist.Init(); pg = MockGroupAndCell.MockTDPredicGroup(); matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); cell = MockCell.CreateCell(cell); cell1 = MockCell.CreateCell(cell1); }
public void MyTestInitialize() { m_Name = "HSPDSCH_SINR"; m_Context = new Context(); m_Case = new HSPDSCHCIRCase(); m_CellList = new List<IACell>(); LinkLossAssist.Init(); tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); tdGroup = MockGroupAndCell.MockTDPredicGroup(); m_Cell = MockGroupAndCell.CreateTDCell(); m_Cell.ID = 5; m_terminal = new TDTerminal(); m_terminal = (TDTerminal)tdGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); m_terminal.EnableHsdpa = true; InitMatrix(tfMatrix, tdGroup); InitCellList(); AddToContext(tfMatrix, tdGroup); }
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 DLDCHRSCPCase(); GenerateBestServerMatrix(); 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(); }
/// <summary> /// 从context里面取得计算本case需要的数据对象 /// </summary> /// <param name="context"></param> private void GetValueFromContext(Context context) { m_tdPredicGroup = (TDPredictionGroup)context[ContextKeys.Group]; m_tFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix]; m_cellList = (List<IACell>)context[ContextKeys.CellList]; m_bestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_smartAntGain = ServiceHelper.Lookup<ISmartAntCalcGain>(m_appContext); m_projectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_Name = m_tdPredicGroup.Name; m_TDTerminal = (TDTerminal)m_tdPredicGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); }
private bool IsServiceSupportHSUPA(TDPredictionGroup predictionGroup) { bool isServiceSuit = false; if (predictionGroup.TrafficService is UnionCsService) { UnionCsService csService = predictionGroup.TrafficService as UnionCsService; TDCsService service = csService.CSServiceDic[NetWorkType.TDSCDMA] as TDCsService; } else if (predictionGroup.TrafficService is UnionPsService) { UnionPsService psService = predictionGroup.TrafficService as UnionPsService; TDPsService service = psService.PSServiceDic[NetWorkType.TDSCDMA] as TDPsService; isServiceSuit = service.EnableHsupa; } return isServiceSuit; }
/// <summary> /// 初始化本指标的保存路径,读取界面参数 /// </summary> /// <param name="group"></param> /// <param name="tfMatrix"></param> private void InitData(TDPredictionGroup group, TrueFalseMatrix tfMatrix) { string absolutePath = ResultFilePath.CreateFilePath(m_ProjectManager.CurrentProjectLossPath, group.Name, group.Region.Name, TDPredictionStudyType.CellToCell_Interf.ToString()); string relativePath = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, TDPredictionStudyType.CellToCell_Interf.ToString()); ShortResultStruct srs = ShortResultStruct.DefaultMin; m_CellToCellIntef = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePath, relativePath, srs); }
public void GetProcGainTest() { TDPredictionGroup pg1 = new TDPredictionGroup(); TDPredictionGroup pg2 = new TDPredictionGroup(); pg1.TrafficService = new UnionCsService(); pg2.TrafficService = new UnionPsService(); TDCsService service1 = new TDCsService(); TDPsService service2 = new TDPsService(); ((UnionCsService)pg1.TrafficService).CSServiceDic[NetWorkType.TDSCDMA] = service1; ((UnionPsService)pg2.TrafficService).PSServiceDic[NetWorkType.TDSCDMA] = service2; TDR99Bearer TDR99Bearer = new TDR99Bearer(); service1.TDR99Bearer = TDR99Bearer; service2.TDR99Bearer = TDR99Bearer; float [] actual1=TDPredictionCommonCalc.GetProcGain(pg1); float[] actual2 = TDPredictionCommonCalc.GetProcGain(pg2); float[] expected1 = { service1.TDR99Bearer.UlPG, service1.TDR99Bearer.DlPG }; float[] expected2 = { service2.TDR99Bearer.UlPG, service2.TDR99Bearer.DlPG }; Assert.AreEqual(actual1, expected1); Assert.AreEqual(actual2, expected2); }
/// <summary> /// 初始化窗体中用户可设置的参数 /// </summary> /// <param name="predicGroup"></param> private void InitUIViewValue(TDPredictionGroup predicGroup) { if (predicGroup.Shadow) { cbShadow.CheckState = CheckState.Checked; } if (predicGroup.IndoorCoverage) { cbCoverage.CheckState = CheckState.Checked; } ntbCoverage.Value = (decimal)predicGroup.CoverageProb; }
/// <summary> /// 初始化指标的存取矩阵 /// </summary> /// <param name="group"></param> /// <param name="tFMatrix"></param> private void InitData(TDPredictionGroup pg, TrueFalseMatrix tFMatrix) { string absolutePath = ResultFilePath.CreateFilePath(m_projectManager.CurrentProjectLossPath, pg.Name, pg.Region.Name, ContextKeys.PCCPCHInterf); string relativePath = ResultFilePath.CreateRelativePath(pg.Name, pg.Region.Name, ContextKeys.PCCPCHInterf); m_PCCPCHInterfMatrix = new ValueMatrixDouble(absolutePath, relativePath, tFMatrix.RowCount, tFMatrix.ColCount); m_PCCPCHInterfMatrix.SetValue(0, 0, double.NegativeInfinity); }
/// <summary> /// 初始化存放DwPCH RSCP指标数据的ValueMatrixShort容器和界面参数 /// </summary> /// <param name="group"></param> /// <param name="tFMatrix"></param> private void InitMatrix(TDPredictionGroup group, TrueFalseMatrix tFMatrix) { m_RSRxSensitivity = group.RxSensitivity; string absolutePath = ResultFilePath.CreateFilePath(m_ProjectManager.CurrentProjectLossPath, group.Name, group.Region.Name,TDPredictionStudyType.DwPCH_RSCP.ToString()); string relativePath = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, TDPredictionStudyType.DwPCH_RSCP.ToString()); ShortResultStruct srs = ShortResultStruct.DefaultMin; m_DwPCHRSCPMatrix = ValueMatrixAssist.GenerateByTrueFalseMatrix(tFMatrix, absolutePath, relativePath, srs); }
/// <summary> /// 从context里面取得计算本case需要的数据对象 /// </summary> /// <param name="context"></param> private void GetValueFromContext(Context context) { m_tdPredicGroup = (TDPredictionGroup)context[ContextKeys.Group]; m_tFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix]; m_CellList = (List<IACell>)context[ContextKeys.CellList]; m_BestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_smartAntGain = ServiceHelper.Lookup<ISmartAntCalcGain>(m_appContext); m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_Name = m_tdPredicGroup.Name; }
private ValueMatrixShort GenerateBestServerMatrix(TrueFalseMatrix tfMatrix, TDPredictionGroup group) { 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(tfMatrix, absolutePath2, relativePath2, srs2); return BestServerCellID; }
/// <summary> /// 从context里面读取数据对象 /// </summary> /// <param name="context"></param> private void GetValueFronContext(Context context) { m_tdPredicGroup = (TDPredictionGroup)context[ContextKeys.Group]; m_TFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix]; m_CellList = (List<IACell>)context[ContextKeys.CellList]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_BestServerCellID = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID]; m_Name = m_tdPredicGroup.Name; m_CurrentTimeSlot = m_tdPredicGroup.tdUIParam.CurrentTimeSlot; }
/// <summary> /// 初始化计算本指标需要的指标以及存储路径 /// </summary> /// <param name="tfMatrix"></param> /// <param name="tdGroup"></param> private void InitMatrix(TrueFalseMatrix tfMatrix, TDPredictionGroup tdGroup) { IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>( ProjectSingleton.CurrentProject.AppContext); string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID); string relativePathID = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.TDBestServerCellID); string absolutePathRSCP = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, tdGroup.Name, tdGroup.Region.Name, ContextKeys.ULDCHRSCP); string relativePathRSCP = ResultFilePath.CreateRelativePath(tdGroup.Name, tdGroup.Region.Name, ContextKeys.ULDCHRSCP); ShortResultStruct srsID = ShortResultStruct.DefaultMax; ShortResultStruct srsRSCP = ShortResultStruct.DefaultMin; m_BestServerCellID = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathID, relativePathID, srsID); m_ULDCHRSCP = ValueMatrixAssist.GenerateByTrueFalseMatrix(tfMatrix, absolutePathRSCP, relativePathRSCP, srsRSCP); }
public void GetTxPowerTest() { TDPredictionGroup pg1= new TDPredictionGroup(); TDPredictionGroup pg2 = new TDPredictionGroup(); pg1.TrafficService = new UnionCsService(); pg2.TrafficService = new UnionPsService(); TDCsService service1 = new TDCsService(); TDPsService service2= new TDPsService(); ((UnionCsService)pg1.TrafficService).CSServiceDic[NetWorkType.TDSCDMA] = service1; ((UnionPsService)pg2.TrafficService).PSServiceDic[NetWorkType.TDSCDMA] = service2; TDR99Bearer TDR99Bearer = new TDR99Bearer(); service1.TDR99Bearer = TDR99Bearer; service2.TDR99Bearer = TDR99Bearer; float actual1=TDPredictionCommonCalc.GetTxPower(pg1); float actual2 = TDPredictionCommonCalc.GetTxPower(pg2); float expected1= service1.TDR99Bearer.PtchMax; float expected2 = service2.TDR99Bearer.PtchMax; Assert.AreEqual(expected1,actual1 ); Assert.AreEqual(expected2, actual2); }
/// <summary> /// 从context里面取数据 /// </summary> /// <param name="context"></param> private void GetValueFromContext(Context context) { m_TFMatrix = (TrueFalseMatrix)context[ContextKeys.TFMatrix]; m_tdPredicGroup = (TDPredictionGroup)context[ContextKeys.Group]; m_BestServerCellIDMatrix = (ValueMatrixShort)context[ContextKeys.TDBestServerCellID]; m_CellList = (List<IACell>)context[ContextKeys.CellList]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_projectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_TDTerminal = (TDTerminal)m_tdPredicGroup.TrafficTerminal.GetNetWorkTerminal(NetWorkType.TDSCDMA); List<Transceiver> trans = (List<Transceiver>)context[ContextKeys.TranceiverList]; InterfParameter interfPara = new InterfParameter(); interfPara.InterfTable = TrafficAdaptorMgr.Instance.TableDIC; m_IInterf = (IInterf)interfPara; m_linkLossCalc = new CoLinkLossCalc(m_tdPredicGroup.RxSensitivity, m_tdPredicGroup.TrafficTerminal, m_tdPredicGroup.TrafficService, m_tdPredicGroup.Shadow, m_tdPredicGroup.IndoorCoverage, m_tdPredicGroup.CoverageProb); InitialHopDic(trans); }