private double CalcAjecentCellInterf(TDSCDMACarrier tdInterfCell, TDSCDMACarrier bestCell, float linkLoss) { CoPredicGroup coPredicGroup = new CoPredicGroup(); double txPower = UnitTrans.dBmTomw(tdInterfCell.PCCPCHPower) + (UnitTrans.dBmTomw(tdInterfCell.SCCPCHPower) + UnitTrans.dBmTomw(tdInterfCell.PICHPower)) * coPredicGroup.CoCovUIParam.OtherCommonCHFactor; double interf = 0; FrequencyRelationType type = GetFrequencyRelation(bestCell, tdInterfCell, bestCell.ChannelIndex, tdInterfCell.ChannelIndex); if (type == FrequencyRelationType.SameFrequency) { interf = UnitTrans.dBmTomw(UnitTrans.mwTodBm(txPower) - linkLoss) * (1 - bestCell.OrthCoef); } else if (type == FrequencyRelationType.FirstNeighbour) { double ACIR1 = (double)m_IInterf.findACIR(tdInterfCell.FreqBand.DLFrequency, tdInterfCell.FreqBand.BandWidth); if (!double.IsNaN(ACIR1)) { interf = UnitTrans.dBmTomw(UnitTrans.mwTodBm(txPower) - linkLoss - ACIR1); } } else if (type == FrequencyRelationType.SecondNeighbour) { double ACIR2 = (double)m_IInterf.findACIR2(tdInterfCell.FreqBand.DLFrequency, tdInterfCell.FreqBand.BandWidth); if (!double.IsNaN(ACIR2)) { interf = UnitTrans.dBmTomw(UnitTrans.mwTodBm(txPower) - linkLoss - ACIR2); } } return interf; }
/// <summary> /// 从context里取得需要的数据信息 /// </summary> /// <param name="context"></param> private void GetValueFromContext(Context context) { m_Context = context; m_CovBySignalLevel = (ValueMatrixShort)context[ContextKeys.CovBySignalLevel]; m_Group = (CoPredicGroup)context[ContextKeys.Group]; //获得CellID m_GSMBestServerID = (ValueMatrixDouble)context[ContextKeys.CoGSMBestServerID]; m_UMTSBestServerID = (ValueMatrixDouble)context[ContextKeys.CoUMTSBestServerID]; m_TDBestServerID = (ValueMatrixDouble)context[ContextKeys.CoTDBestServerID]; m_LTEBestServerID = (ValueMatrixDouble)context[ContextKeys.CoLTEBestServerID]; //获得Cell列表 m_CellList = (List<IACell>)context[ContextKeys.CellList]; m_trans = (List<Transceiver>)context[ContextKeys.TranceiverList]; InterfParameter interfPara = new InterfParameter(); interfPara.InterfTable = TrafficAdaptorMgr.Instance.TableDIC; m_IInterf = (IInterf)interfPara; }
public IPredictionGroup Clone() { CoPredicGroup myGroup = new CoPredicGroup(); myGroup.GroupId = this.GroupId; myGroup.HandoverAreaThreshold = this.HandoverAreaThreshold; myGroup.InterferenceGate = this.InterferenceGate; myGroup.IsCoGroup = this.IsCoGroup; myGroup.Locked = this.Locked; myGroup.MaxSensitivity = this.MaxSensitivity; myGroup.Name = this.Name; myGroup.NumPointInPolygon = this.NumPointInPolygon; myGroup.PredictionType = this.PredictionType; myGroup.Resolution = this.Resolution; myGroup.RxSensitivity = this.RxSensitivity; myGroup.ServiceValue = this.ServiceValue; myGroup.State = this.State; myGroup.TerminalValue = this.TerminalValue; myGroup.Terminal = (Terminal)this.Terminal; myGroup.Service = (Service)this.Service; foreach (IStudy study in this.m_StudyList) { myGroup.StudyList.Add(study.Clone()); } myGroup.TranceiverInfoList = this.TranceiverInfoList; foreach(NetWorkType net in this.Nets) { myGroup.Nets.Add(net); } myGroup.Region = this.Region; myGroup.TrafficMobility = (Mobility)this.TrafficMobility; myGroup.TrafficService = (Service)this.TrafficService; myGroup.TrafficTerminal = (Terminal)this.TrafficTerminal; myGroup.AppContext = this.AppContext; myGroup.CoCovUIParam = this.CoCovUIParam.Clone(); myGroup.CoGSMGroup = this.CoGSMGroup.Clone(); myGroup.CoTDSCDMAGroup = this.CoTDSCDMAGroup.Clone(); myGroup.CoUMTSGroup = this.CoUMTSGroup.Clone(); myGroup.CoLTEGroup = this.CoLTEGroup.Clone(); return myGroup; }
/// <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> /// 读取Context里面的数据,写入要计算的值 /// </summary> /// <param name="context"></param> public void InitialCase(Context context) { m_group = (CoPredicGroup)context[ContextKeys.Group]; m_appContext = (IBaseService)context[ContextKeys.ApplicationContext]; m_ProjectManager = ServiceHelper.Lookup<IProjectManager>(m_appContext); m_ProjectPath = m_ProjectManager.CurrentProjectLossPath; srs = new ShortResultStruct(short.MinValue, short.MaxValue, short.MinValue); if (IsGSMExist()) { m_GSMLinkLossCalc = new CoLinkLossCalc(m_group.CoGSMGroup.Sensitivity, m_group.CoGSMGroup.Terminal, m_group.CoGSMGroup.Service, m_group.CoCovUIParam.Shadow, m_group.CoCovUIParam.IndoorCoverage, m_group.CoCovUIParam.CoverageProb); } if (IsTDExist()) { m_TDLinkLossCalc = new CoLinkLossCalc(m_group.CoTDSCDMAGroup.Sensitivity, m_group.CoTDSCDMAGroup.Terminal, m_group.CoTDSCDMAGroup.Service, m_group.CoCovUIParam.Shadow, m_group.CoCovUIParam.IndoorCoverage, m_group.CoCovUIParam.CoverageProb); } if (IsUMTSExist()) { m_UMTSLinkLossCalc = new CoLinkLossCalc(m_group.CoUMTSGroup.Sensitivity, m_group.CoUMTSGroup.Terminal, m_group.CoUMTSGroup.Service, m_group.CoCovUIParam.Shadow, m_group.CoCovUIParam.IndoorCoverage, m_group.CoCovUIParam.CoverageProb); } if (IsLTEExit()) { m_LTELinkLossCalc = new CoLinkLossCalc(m_group.CoLTEGroup.Sensitivity, m_group.CoLTEGroup.Terminal, m_group.CoLTEGroup.Service, m_group.CoCovUIParam.Shadow, m_group.CoCovUIParam.IndoorCoverage, m_group.CoCovUIParam.CoverageProb); } InitMatrix(context); AddDataToContext(context); InitCovBySingnal(context); }