/// <summary> /// 计算点的PDSCH RSCP /// </summary> /// <param name="index"></param> /// <param name="cell"></param> protected override void Calc(int index, IACell cell) { if (m_bestServerCellIDMatrix[index] == m_bestServerCellIDMatrix.DefaultValue || m_bestServerCellIDMatrix[index] != cell.ID) { return; } TDSCDMACarrier bestCell = (TDSCDMACarrier)SearchAssist.GetCellbyID(m_bestServerCellIDMatrix[index], m_cellList); bool isCellSuit = (bestCell.CarrierType == CarrierTypeOfTD.HSPA && m_tdPredicGroup.tdUIParam.CurrentTimeSlot != 6); bool isTerminalSuit = m_TDTerminal.EnableHsdpa; bool isServiceSuit = IsServiceSupportHSDPA(m_tdPredicGroup); if (!(bestCell != null && isCellSuit && isTerminalSuit && isServiceSuit)) { return; } if (m_tdPredicGroup.tdUIParam.CurrentTimeSlot <= bestCell.SwitchPoint) { return; } float[] linkLoss = TDIntefCalc.GetLinkLossWithMainSAGain(index, m_tFMatrix, cell, m_tdPredicGroup); double recPower = TDPredictionCommonCalc.GetDlReceivePower(((TDSCDMACarrier)cell).HSDPAPower, linkLoss[1]); if (recPower >= m_RSRxSensitivity) { m_HSPDSCHRSCPMatrix[index] = UnitTrans.DoubleToShort(recPower); } }
//这个方法好像没有调用的地方 public float[] CalcPointPathLoss(IPropagationModel prop, IACell carrier, AntConfig ant, GeoXYLine xyLine, float resolution, float rxHeight, out Dictionary<string, object> modelDetail) { if (prop == null) { modelDetail = null; return new float[2]; } AntConfig config = ant; IPropagationModel model = prop; SectionPathLossCalcParam param = new SectionPathLossCalcParam(); param.TxAntennaHeight = config.Height; if (!(AntConfig.IS_ANTENNA_HEIGHT_INCLUDE_BUILDING || !this.GeoDataProvider.IGeoProvider.IsBuildingLoaded)) { param.TxAntennaHeight += this.GeoDataProvider.GisInfo.GetValueByGeoXYPoint(xyLine.Points[0], DemDataType.Building, false); } param.RxAntennaHeight = rxHeight; param.Frequency = carrier.FreqBand.DLFrequency; param.MergeEdgeMaxDis = 80f; param.PropagModel = model; param.CalcResolution = resolution; param.CalcEndRadius = (float) xyLine.GetDistance(); param.X = (float) xyLine.Points[0].X; param.Y = (float) xyLine.Points[0].Y; return this.CalcPointPathLoss(param, xyLine, carrier.FreqBand.ULFrequency, out modelDetail); }
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); }
public TranceiverCalcInfo(Transceiver tranceiver, Point startPoint, Point endPoint, IACell maxRSCell) { m_StartPoint = startPoint; m_EndPoint = endPoint; m_Tranceiver = tranceiver; m_Cell = maxRSCell; }
public static IACell CreateCell(IACell cell) { Transceiver trans = new Transceiver(); Site site = new Site(); site.X = 100; site.Y = 100; site.Equipment = new BtsEquipment(); site.Equipment.NoiseFigure = 2; trans.Name = "Trans1"; trans.Parent = site; trans.Cells.Add(cell); cell.Parent = trans; cell.MaxPower = 39; AntConfig antConfig = new AntConfig(); cell.Parent.AntConfiguration.Add(antConfig); cell.Parent.AntConfiguration[0].IsMainAnt = true; cell.Parent.AntConfiguration[0].DlTotalLoss = 2; antConfig.OutdoorAntenna = new AntennaEntity(); cell.ID = 1; PropModelConfig propModelConfig = new PropModelConfig(); propModelConfig.CalcRadius = 4000; propModelConfig.CalcResolution = 50; trans.Cells[0].PropModels.Add(propModelConfig); return cell; }
public PropagationForm(CollectionsModel colModel, IACell cell) { this.InitializeComponent(); this.m_PropagationEditor = new PropagationEditor(colModel, cell); this.m_Cell = cell; this.InitData(); this.btnApply.Enabled = false; }
/// <summary> /// 构造函数 /// </summary> /// <param name="CI">当前链路的CIR</param> /// <param name="bestCell">当前点的最佳服务小区</param> /// <param name="tdHSDPABearList">承载列表</param> /// <param name="tdTerminal">终端类型</param> public TDDwLinkThroughPutCalculator(double CI, IACell bestCell, List<TDHSDPABearer> tdHSDPABearList, TDTerminal tdTerminal) { m_ServiceCI = CI; m_TdHSDPABearList = tdHSDPABearList; m_TdCell = bestCell as TDSCDMACarrier; m_TdTerminal = tdTerminal; }
/// <summary> /// 计算一个点收到的下行小区的干扰 /// </summary> /// <param name="index"></param> /// <param name="cell"></param> protected override void Calc(int index, IACell cell) { if (m_BestServerCellIDMatrix[index] == m_BestServerCellIDMatrix.DefaultValue) { return; } TDSCDMACarrier bestCell = (TDSCDMACarrier)SearchAssist.GetCellbyID(m_BestServerCellIDMatrix[index], m_CellList); CalcInterf(index, cell, bestCell); }
/// <summary> /// 计算干扰 /// </summary> /// <param name="m_ActiveSet"></param> /// <returns></returns> public static float GetInterference(IACell bestCell, List<RxPowerAndLinkLossModel> ModelList) { double totalIntef = 0; foreach (RxPowerAndLinkLossModel model in ModelList) { GetOneCellInterf(bestCell, ref totalIntef, model); } return (float)totalIntef; }
private TranceiverCalcInfo ConstructCalcInfo(IACell cell, float resolution, GeoXYPoint pointLeftTop, GeoXYPoint pointRightBottom, GeoXYPoint pointCell, Transceiver tranceiver) { float radius = GetMaxCalcRadius(tranceiver); Point startP; Point endP; CalcStartEndPoint(resolution, pointLeftTop, pointRightBottom, pointCell, radius, out startP, out endP); TranceiverCalcInfo calcInfo = new TranceiverCalcInfo(tranceiver, startP, endP, cell); return calcInfo; }
private void CellParamToString(StringBuilder transParamSb, IACell cell) { foreach (PropModelConfig config in cell.PropModels) { transParamSb.Append(this.GetPropModelConfigString(config)); } transParamSb.Append(cell.FreqBand.DLFrequency.ToString() + cell.FreqBand.ULFrequency.ToString()); transParamSb.Append(cell.ChannelIndex.ToString()); }
/// <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 double CalculateAsRxPower(IACell cell, GeoXYPoint point, float Linkloss) //{ //double m_TRXPower = ((GSMTRX)cell).MaxPower; //GSMTRX isGSMCell = cell as GSMTRX; //if (isGSMCell != null) //{ //GSMTerminal gsmTerminal = (GSMTerminal)terminal.GetNetWorkTerminal(NetWorkType.GSM); //double terminalGain = gsmTerminal.Gain; //double serviceLoss = ((GSMService)service).BodyLoss; //return m_TRXPower + terminalGain - serviceLoss - linkloss; //} //else //{ // return double.NegativeInfinity; //} // return CalculateRxPower(cell, point, Linkloss); //} public IDetail CalculateDownLinkDetail(List<RxPowerAndLinkLossModel> ModelList, GeoXYPoint point, Service service, Mobility mobility, Terminal terminal) { TargetPara target = new TargetPara(); InitData(ModelList, service, terminal, target); m_DlBestCell = FindDlBestServer(); m_IInterf = InitInterfCalc(); DlResultImage(); DlJudgeAccess(target); return dlDetail; }
/// <summary> /// 建立一个Signal对象 /// </summary> /// <param name="cell"></param> /// <returns></returns> private static Signal InitSingle(IACell cell) { Signal sig = new Signal(); sig.FreqBand = cell.FreqBand.BandWidth; sig.Frequency = cell.FreqBand.DLFrequency + (cell.ChannelIndex - cell.FreqBand.StartChIndex) * cell.FreqBand.BandWidth + cell.FreqBand.BandWidth / 2; sig.NetType = cell.NetType; return sig; }
protected override void Calc(int index, IACell cell) { if (m_BestServerCellIDMatrix[index] == m_BestServerCellIDMatrix.InvalidValue) { return; } IACell bestCell = SearchAssist.GetCellbyID(m_BestServerCellIDMatrix[index], m_cells); //if (cell == bestCell) // return; JudgePilotPollution(index,bestCell, cell); }
/// <summary> /// 计算当前小区到当前点的干扰 /// </summary> /// <param name="index"></param> /// <param name="cell"></param> protected override void Calc(int index, IACell cell) { if (m_BestServerCellIDMatrix[index] == m_BestServerCellIDMatrix.DefaultValue) { return; } TDSCDMACarrier bestCell = (TDSCDMACarrier)SearchAssist.GetCellbyID(m_BestServerCellIDMatrix[index], m_CellList); m_TotalInf = UnitTrans.dBmTomw(m_PCCPCHInterfMatrix[index]); CalcInterf(index, cell, bestCell); m_PCCPCHInterfMatrix[index] = UnitTrans.mwTodBm(m_TotalInf); }
/// <summary> /// 为一个Cell计算一个点 /// </summary> /// <param name="point"></param> /// <param name="cell"></param> protected void CalcOnePoint(XYPoint point, IACell cell) { if (IsNeedCalc(cell)) { if (point.X>352&&point.X<360&&point.Y>350&&point.Y<360) { } Calc(point.GlobalIndex, cell); } }
private List<IACell> InitCellList(IACell cell) { List<IACell> celllist = new List<IACell>(); celllist.Add(new TDSCDMACarrier()); celllist.Add(new TDSCDMACarrier()); double[] x = { 100, 150 }; double[] y = { 100, 100 }; celllist = MockCellList.CreateCellList(celllist, x, y); celllist.Add(cell); return celllist; }
/// <summary> /// 计算TD链路损耗 /// </summary> /// <param name="index"></param> /// <param name="tfMatrix"></param> /// <param name="cell"></param> /// <param name="pg"></param> /// <returns></returns> public float[] GetTDLinkLoss(int index,TrueFalseMatrix tfMatrix, IACell cell) { User user = ConstructUser(index, tfMatrix); AntConfig mainAnt = FindMainAnt(cell.Parent.AntConfiguration); double pathLossGate = GetPathLossGate(cell.MaxPower, m_RxSensitivity, mainAnt); float[] result = GetLink(user, pathLossGate, cell); float antGain = GetBCHGain(cell, user);//返回的是linkloss-天线增益,但是天线增益是零 result[0] -= antGain; result[1] -= antGain; return result;//返回的是linkloss,外面用的话分信道看加的是智能天线的增益还是普通天线的增益 }
public void GetPropModelConfigTest() { cell1= new TDSCDMACarrier(); PropModelConfig propmdcfg1 = new PropModelConfig(); PropModelConfig propmdcfg2 = new PropModelConfig(); PropModelConfig propmdcfg3 = new PropModelConfig(); cell1.PropModels.Add(propmdcfg1); cell1.PropModels.Add(propmdcfg2); cell1.PropModels.Add(propmdcfg3); Assert.AreEqual(propmdcfg1, Tool.GetPropModelConfig(cell1)); }
public static float GetLTECarrierAzimuth(IACell carrier) { List<AntConfig> antConfiguration = SimulationTools.GetAntConfig(carrier); foreach (AntConfig config in antConfiguration) { if (config.IsMainAnt) { return config.Azimuth; } } return 0f; }
/// <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; }
public void InitCarrierTag(SimulationCarrier carrier, SchedulePolicy policy) { this.m_Carrier = carrier.Carrier; this.m_maxPower = SimulationTools.ConvertdBToLine(this.m_Carrier.MaxPower); this.m_bchPower = SimulationTools.ConvertdBToLine(carrier.BCHPower); this.m_schPower = SimulationTools.ConvertdBToLine(carrier.SCHPower); this.m_rsPower = SimulationTools.ConvertdBToLine(carrier.RSPower); this.m_bchRePower = this.m_bchPower / 20f; this.m_schRePower = this.m_schPower / 10f; this.m_voiceScheduler.InitScheduleMethod(carrier, this, policy); this.m_dataScheduler.InitScheduleMethod(carrier, this, policy); this.m_DataFrequencySelectMethod.InitScheduleMethod(carrier, this, carrier.SchedulePolicy); }
/// <summary> /// 生成Case计算时需要的数据类型 /// </summary> /// <param name="polygon">计算区域</param> /// <param name="cell">当前小区</param> /// <param name="resolution">精度</param> /// <returns>构造的数据类型</returns> public TranceiverCalcInfo GenTranceiverCalcInfo(GeoPolygonRegion polygon, IACell cell, float resolution) { double bottom, left, right, top; GetPolygonParameters(polygon, resolution, out bottom, out left, out right, out top); GeoXYPoint pointLeftTop = new GeoXYPoint(left, top); GeoXYPoint pointRightBottom = new GeoXYPoint(right, bottom); GeoXYPoint pointCell = CreatPoint(cell.Parent); //Tranceiver tranceiver = CreatPoint(cell.Parent); //pointCell.X = tranceiver.X; //pointCell.Y = tranceiver.Y; TranceiverCalcInfo calcInfo = ConstructCalcInfo(cell, resolution, pointLeftTop, pointRightBottom, pointCell, cell.Parent); return calcInfo; }
public void MyTestInitialize() { TrueFalseMatrix tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); TDPredictionGroup tdGroup = MockGroupAndCell.MockTDPredicGroup(); m_Cell = MockGroupAndCell.CreateTDCell(); LinkLossAssist.Init(); InitMatrix(tfMatrix, tdGroup); InitCellList(); AddToContext(tfMatrix, tdGroup); }
private float CalculateDlTotalLoss(IACell carrier, User user, LinkLossStruct ulLinkLossStruct, bool isLTECell) { if (isLTECell) { LTECell lteCarrier = carrier as LTECell; return CalculateDlTotalLoss(lteCarrier, user, ulLinkLossStruct); } else { RelayCell relayCarrier = carrier as RelayCell; return CalculateDlTotalLoss(relayCarrier, user, ulLinkLossStruct); } }
public double CalculateRxPower(IACell cell, GeoXYPoint point, float linkloss) { GSMTRX isGSMCell = cell as GSMTRX; if (isGSMCell != null) { double m_TRXPower = ((GSMTRX)cell).MaxPower; return m_TRXPower - linkloss; } else { return double.NegativeInfinity; } }
/// <summary> /// 计算最佳服务小区的EcIo /// </summary> /// <param name="bestServer"></param> /// <returns></returns> private double GetEcIo(IACell bestServer) { double rscp = 0; double Iomw = 0; double EcIo; foreach (RxPowerAndLinkLossModel model in m_ModelList) { CalaIoOrRSCP(bestServer, ref rscp, ref Iomw, model); } Io = UnitTrans.mwTodBm(Iomw); EcIo = rscp - Io; return EcIo; }
public void Init() { IProject project = new MockProject(); ProjectSingleton.CurrentProject = project; IGeoProvider Geo = new MockGeoProvider(); ProjectSingleton.CurrentProject.AppContext.RegisterService(Geo); m_Target = new CalcCellToCellLinkLoss(ProjectSingleton.CurrentProject.AppContext); m_CellFrom = new MockIACell(); m_CellTo = new MockIACell(); FrequencyBand fromBand = new FrequencyBand(); fromBand.DLFrequency = 900; m_CellFrom.FreqBand = fromBand; Transceiver fromParent = new Transceiver(); IASite fromSite = new Site(); fromSite.X = 0; fromSite.Y = 0; fromParent.setParent(fromSite); //List<AntConfig> fromConfigs = new List<AntConfig>(); AntConfig fromConfig1 = new AntConfig(); fromConfig1.OutdoorAntenna = new AntennaEntity(); fromConfig1.AntType = 1; fromConfig1.Height = 30; fromConfig1.SectorID = 0; //fromConfigs.Add(fromConfig1); fromParent.addAntConfig(fromConfig1); m_CellFrom.setParent(fromParent, m_CellFrom); FrequencyBand toBand = new FrequencyBand(); toBand.DLFrequency = 905; m_CellTo.FreqBand = toBand; Transceiver toParent = new Transceiver(); IASite toSite = new Site(); toSite.X = 4; toSite.Y = 3; toParent.setParent(toSite); AntConfig toConfig = new AntConfig(); toConfig.OutdoorAntenna = new AntennaEntity(); toConfig.AntType = 1; toConfig.Height = 25; toConfig.SectorID = 0; toParent.addAntConfig(toConfig); m_CellTo.setParent(toParent, m_CellTo); }