/// <summary> /// 构造函数 /// </summary> /// <param name="difLossCalcPara">扇形片路径损耗计算参数</param> /// <param name="geoDataObserver"></param> public DiffractionLossCalculator(SectionPathLossCalcParam difLossCalcPara, IPropaGeoDataObserver geoDataObserver) { this.m_DifLossCalcPara = difLossCalcPara; this.m_Spmodel = difLossCalcPara.PropagModel; this.m_CalcDifLossMethod = (DiffractionLossBase) difLossCalcPara.PropagModel.DifLossMethod; this.m_GeoDataProvider = geoDataObserver; }
public override float[] CalculateRayPathLoss(RayMethodParam rayParam, IPropagationModel model, ref bool isStopCalculator) { RelayUEPropagationModel propModel = model as RelayUEPropagationModel; float[] rayLossArray = new float[rayParam.EndIndex - rayParam.StartIndex + 1]; if (propModel == null||isStopCalculator) return rayLossArray; for (int i = 0; i < rayLossArray.Length; i++) { if (rayParam.TxEffHeight[i] == -32768 || rayParam.RxEffHeight[i] == -32768f) { rayLossArray[i] = float.MinValue; } else { float distance = GetDotDistance(rayParam.StartIndex,rayParam.CalcResolution, i); float prob = CalcProbability(propModel, distance); rayLossArray[i] = GetPathLoss(propModel, distance, prob); } if (base.m_Log4net.IsDebugEnabled) { string message = string.Concat(new object[] { DateTime.Now.ToString("G"), ",", rayParam.CellName, ",", rayParam.X, ",", rayParam.Y, ",", rayParam.TxEffHeight[0], ",", rayParam.RxEffHeight[i], ",",propModel.PropModelName, ",", base.m_RayIndex, ",", i, ",", rayParam.CalcResolution, ",,,,", rayLossArray[i], ",", rayLossArray[i] }); base.m_Log4net.Debug(message); } } return rayLossArray; }
//这个方法好像没有调用的地方 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 IPropertiesFormBase GetPropertiesForm(IPropagationModel model) { IPropertiesFormBase base2 = null; try { base2 = Activator.CreateInstance(this.GetUIType(model.GetType().FullName)) as IPropertiesFormBase; } catch (Exception exception) { throw new Exception("Get PropertiesFormBase Failed: " + exception.Message, exception); } return base2; }
public bool AddPropModel(IPropagationModel propModel) { try { this.m_PropModelCollection.AddPropModel(propModel); return true; } catch (Exception exception) { WriteLog.Logger.Error(exception.StackTrace); return false; } }
private bool BandProperties(string strPropertiesXml, IPropagationModel propModel) { this.m_propModel = propModel as PropagationModelBase; this.m_editPropModel = this.m_propModel.Clone() as PropagationModelBase; this.Text = this.m_propModel.PropModelName; this.txtName.Text = this.m_editPropModel.PropModelName; this.txtDescriptionrich.Text = this.m_editPropModel.Description; ms_XDoc.LoadXml(strPropertiesXml); XmlNodeList pObjectPropertys = ms_XDoc.SelectSingleNode("Properties").SelectNodes("Property"); this.m_CustomProperty = new CustomProperty(this.m_editPropModel, pObjectPropertys); this.gridParameters.SelectedObject = this.m_CustomProperty; return true; }
private void AddOnePropModel(TreeNode tnCategory, IPropagationModel propModel) { TreeNode treeNodeByName = this.GetTreeNodeByName(tnCategory.Nodes, propModel.PropModelName); if (treeNodeByName == null) { treeNodeByName = new TreeNode(); tnCategory.Nodes.Add(treeNodeByName); } treeNodeByName.Text = propModel.PropModelName; treeNodeByName.Tag = propModel.PropModelID; treeNodeByName.ImageIndex = 2; treeNodeByName.SelectedImageIndex = 2; treeNodeByName.ContextMenuStrip = this.m_TreeNodeContextMenuStrip; }
public int AddPropModel(IPropagationModel propModel) { propModel.PropModelID = this.getProdelModelID(propModel); propModel.PropModelName = this.ValidatePropModelName(propModel.PropModelName, propModel.PropModelID); this.m_PropModelNameMap.Add(propModel.PropModelName, propModel.PropModelID); this.m_PropModelList.Add(propModel); this.m_PropModelDictionary.Add(propModel.PropModelID, propModel); propModel.ReNameEvent += new ReName(this.PropModel_ReNameEvent); PropagationModelCategory category = this.m_PropModelCategoryDictionary[propModel.CategoryID]; category.PropModelList.Add(propModel); //this.PropModelListAddEvent(propModel); PropagationDealedArgs result = new PropagationDealedArgs(); result.DealOp = PropaDealedOper.ADD; result.PropagationModelName = propModel.PropModelName; this.OnPropagationDealEvent("", result); return propModel.PropModelID; }
public override float[] CalculateRayPathLoss(RayMethodParam rayParam, IPropagationModel model, ref bool isStopCalculator) { ITURPPropagationModel iTURPModel = model as ITURPPropagationModel; int startIndex = rayParam.StartIndex; float[] numArray = new float[(rayParam.EndIndex - startIndex) + 1]; if (iTURPModel != null) { StructAntennaParam antennaGainParam = rayParam.AntennaGainParam; float calcResolution = rayParam.CalcResolution; float num5 = (float) Math.Log10((double) rayParam.Frequency); for (int i = 0; i < numArray.Length; i++) { if (isStopCalculator) { return numArray; } if (rayParam.RxEffHeight[i] != -32768f) { float num6; if ((i + startIndex) == 0) { num6 = 0f; } else { num6 = (float) Math.Log10((double) ((i + startIndex) * rayParam.CalcResolution)); } float num3 = (i + startIndex) * calcResolution; numArray[i] = ((iTURPModel.K2 + (iTURPModel.K1 * num5)) + (iTURPModel.N * num6)) + this.GetLf(iTURPModel); string message = string.Concat(new object[] { DateTime.Now.ToString("G"), ",", rayParam.CellName, ",", rayParam.X, ",", rayParam.Y, ",", rayParam.TxEffHeight[0], ",", rayParam.RxEffHeight[i], ",", iTURPModel.PropModelName, ",", base.m_RayIndex, ",", i, ",", rayParam.CalcResolution, ",,,,", numArray[i], ",", numArray[i] }); if (base.m_Log4net.IsDebugEnabled) { base.m_Log4net.Debug(message); } } else { numArray[i] = float.MinValue; } } } return numArray; }
/// <summary> /// 计算上下行路径损耗的差值 /// </summary> /// <param name="prop"></param> /// <param name="DLFreq"></param> /// <param name="ULFreq"></param> /// <param name="rxHeight"></param> /// <returns></returns> public override float CalcDeltaLossFrmDLToUL(IPropagationModel prop, float DLFreq, float ULFreq, float rxHeight) { float propCoef; OkumuHataPropagationModel okumModel = prop as OkumuHataPropagationModel; float lgDiffFreq = (float) Math.Log10((double) (ULFreq / DLFreq)); float diffFreqCoef = okumModel.K2 * lgDiffFreq; if (rxHeight == 1.5f) { propCoef = 0f; } else if (okumModel.SelectA == 0) { propCoef = ((okumModel.K6 * rxHeight) - okumModel.K8) * lgDiffFreq; } else { propCoef = 0f; } return ((diffFreqCoef + propCoef) + this.GetCellCalculate(okumModel, lgDiffFreq, ULFreq, DLFreq)); }
public override void Init(IPropagationModel propModel, IBaseService context) { base.Init(propModel, context, Resources.ITUR230PropertiesXmlStr); }
public virtual float CalcDeltaLossFrmDLToUL(IPropagationModel prop, float DLFreq, float ULFreq, float rxHeight) { throw new Exception("The method or operation is not implemented."); }
/// <summary> /// 计算某一条射线上的路径损耗(未实现) /// </summary> /// <param name="rayParam"></param> /// <param name="model"></param> /// <param name="isStopCalculator"></param> /// <returns></returns> public virtual float[] CalculateRayPathLoss(RayMethodParam rayParam, IPropagationModel model, ref bool isStopCalculator) { throw new Exception("The method or operation is not implemented."); }
public override void Init(IPropagationModel propModel, IBaseService context) { base.Init(propModel, context, Resources.OkumuHataPropModelPropertiesXmlStr); this.m_PropModel = base.m_editPropModel as OkumuHataPropagationModel; this.m_PropagModelCollection = ServiceHelper.Lookup<IPropagModelCollection>(context); }
public virtual void Init(IPropagationModel propModel, IBaseService context) { }
public override float CalcDeltaLossFrmDLToUL(IPropagationModel prop, float oldFreq, float newFreq, float rxHeight) { return 0f; }
public override void Init(IPropagationModel propModel, IBaseService context) { Init(propModel, context,Resources.CostHataPropModelPropertiesXmlStr); m_PropModel = base.m_editPropModel as MacroRelayPropagationModel; }
private int getProdelModelID(IPropagationModel propModel) { int key = propModel.PropModelID; for (int i = 0; i <= this.m_PropModelDictionary.Count; i++) { if ((propModel.PropModelID == -1) || this.m_PropModelDictionary.ContainsKey(propModel.PropModelID)) { key = this.m_NoUsedPropModelMaxID++; } if (!this.m_PropModelDictionary.ContainsKey(key)) { return key; } } return key; }
private void PropModelListAdded(IPropagationModel propModel) { TreeNode tnCategory = new TreeNode(); for (int i = 0; i < this.m_rootNode.Nodes.Count; i++) { tnCategory = this.m_rootNode.Nodes[i]; PropagationModelCategory category = tnCategory.Tag as PropagationModelCategory; if (category.CategoryID == propModel.CategoryID) { break; } } this.AddOnePropModel(tnCategory, propModel); }
public bool ModifyPropModel(string PropModeName, IPropagationModel m_editPropModel) { bool flag = false; if (!"".Equals(m_editPropModel.PropModelName.Trim())) { try { IPropagationModel dest = this.m_PropModelCollection.GetPropModel(PropModeName); if (dest != null) { m_editPropModel.PropModelID = dest.PropModelID; CopyObject.ObjectMemberwiseCopy(dest, m_editPropModel, this.m_PropModelCollection); flag = true; } } catch (Exception exception) { WriteLog.Logger.Error(exception.StackTrace); flag = false; } } return flag; }
public bool IsExistTheSameName(int propModelId, IPropagationModel m_editPropModel) { bool flag = false; if (!"".Equals(m_editPropModel.PropModelName.Trim())) { try { IPropagationModel propModel = this.m_PropModelCollection.GetPropModel(m_editPropModel.PropModelName); if ((propModel != null) && (propModel.PropModelID != m_editPropModel.PropModelID)) { return true; } propModel = this.m_PropModelCollection.GetPropModel(propModelId); this.ModifyPropModel(propModel.PropModelName, m_editPropModel); } catch (Exception exception) { WriteLog.Logger.Error(exception.StackTrace); flag = false; } } return flag; }
/// <summary> /// 计算射线上的点的路径损耗 /// </summary> /// <param name="param"></param> /// <param name="model"></param> /// <param name="isStopCalculator"></param> /// <returns></returns> public override float[] CalculateRayPathLoss(RayMethodParam param, IPropagationModel model, ref bool isStopCalculator) { Dictionary<GeoXYPoint, float> results = new Dictionary<GeoXYPoint, float>(); ITUR230PropagationModel ITUR230PropModel = model as ITUR230PropagationModel; float frequency = param.Frequency;//频率 float height = param.AntHeight;//基站高度 // float height = 0; int startIndex = param.StartIndex; param.PeakHeightMatrix = new short[(param.EndIndex - startIndex) + 1]; param.PeakDotMatrix = new int[(param.EndIndex - startIndex) + 1]; PeakTempValue peakTempValue = new PeakTempValue(); GeoXYPoint sitePoint = new GeoXYPoint(param.X, param.Y); float[] pointsPathLossOnRay = new float[(param.EndIndex - startIndex) + 1]; if (ITUR230PropModel != null) { float calcResolution = param.CalcResolution; for (int i = 0; i < pointsPathLossOnRay.Length; i++) { if (isStopCalculator) return pointsPathLossOnRay; if ((param.TxEffHeight[i] != -32768f) && (param.RxEffHeight[i] != -32768f)) { GeoXYPoint calPoint = new GeoXYPoint(param.X + (i + startIndex) * param.CalcResolution * Math.Sin(param.Angle), param.Y + (i + startIndex) * param.CalcResolution * Math.Cos(param.Angle)); double distance = GetDistance(calPoint, sitePoint);//每个点到基站的距离 param.PeakHeightMatrix[i] = peakTempValue.PeakHeight; param.PeakDotMatrix[i] = (int)peakTempValue.PeakDot; //pointsPathLossOnRay[i] = CalculatePointPathLossOnRayByITUR230(height, frequency, distance, ref isStopCalculator);//每个点到基站的路损计算 pointsPathLossOnRay[i] = (float)getLoss(230, distance / 1000, height, 10, 10) - k1;//getLoss(Double frequence, Double distance, Double height, Double G, Double Heff) //frequence:频率,distance:距离,height:天线高度,G:天线增益,单位dB ,Heff:附近环境的平均高度,通过Gis获得?(典型场景:中心城市30m,郊区20m,农村10m?) results.Add(calPoint, pointsPathLossOnRay[i]); } } } return pointsPathLossOnRay; }
public float[] CalcPointPathLoss(IPropagationModel prop, Huawei.UNet.NE.Interface.IACell carrier, Huawei.UNet.NE.Interface.AntConfig ant, Huawei.UNet.GIS.GeoInterface.GeoXYLine xyLine, float resolution, float rxHeight, out Dictionary<string, object> modelDetail) { throw new NotImplementedException(); }
public float[] CalcPointPathLoss(IPropagationModel prop, Huawei.UNet.NE.Interface.IACell carrier, Huawei.UNet.NE.Interface.AntConfig ant, Huawei.UNet.GIS.GeoInterface.GeoXYLine xyLine, float resolution, out Dictionary<string, object> modelDetail) { modelDetail = new Dictionary<string, object>(); return new float[2]{0,0}; }
public override void Init(IPropagationModel propModel, IBaseService context) { IPropaGeoDataObserver observer = ServiceHelper.Lookup<IPropaGeoDataObserver>(context); if ((propModel.GisClutterDictionary.Count == 0) && (observer.GisClutterDictionary.Count > 0)) { propModel.GisClutterDictionary = observer.GisClutterDictionary; } base.Init(propModel, context, Resources.PropModelPropertiesXmlStr); this.m_PropModel = base.m_editPropModel as SpmPropagationModel; this.dgvClutterLoss.AllowUserToDeleteRows = false; this.dgvClutterLoss.EditingControlShowing += new DataGridViewEditingControlShowingEventHandler(this.dgvClutterLoss_EditingControlShowing); this.dgvClutterLoss.CellValidating += new DataGridViewCellValidatingEventHandler(this.dgvClutterLoss_CellValidating); this.dgvClutterLoss.CellValueChanged += new DataGridViewCellEventHandler(this.dgvClutterLoss_CellValueChanged); this.gridParameters.PropertyValueChanged += new PropertyValueChangedEventHandler(this.gridParameters_PropertyValueChanged); //add by liujialin 5.15 this.InitClutterLossLissView(); this.m_PropagModelCollection = ServiceHelper.Lookup<IPropagModelCollection>(context); }
//public override float[] CalculateRayPathLoss(RayMethodParam param, IPropagationModel model, ref bool isStopCalculator) //{ // OkumuHataPropagationModel okumuHataPropagationModel = model as OkumuHataPropagationModel; // float f = param.Frequency; // int startIndex = param.StartIndex; // int endIndex = param.EndIndex; // float calcResolution = param.CalcResolution; // float[] txEffHeight = param.TxEffHeight; // float[] rxEffHeight = param.RxEffHeight; // float[] numArray3 = new float[(endIndex - startIndex) + 1]; // if (okumuHataPropagationModel != null) // { // float num8 = this.CellSelect(f, okumuHataPropagationModel); // float num7 = (float) Math.Log10((double) f); // float num6 = (float) Math.Log10((double) txEffHeight[0]); // StructAntennaParam antennaGainParam = param.AntennaGainParam; // for (int i = 0; i < numArray3.Length; i++) // { // if (isStopCalculator) // { // return numArray3; // } // if ((param.TxEffHeight[i] != -32768f) && (param.RxEffHeight[i] != -32768f)) // { // float num5 = this.GetDistance(startIndex, i, calcResolution); // float num11 = this.AhrCalculate(f, rxEffHeight, i, okumuHataPropagationModel); // float num9 = (i + startIndex) * calcResolution; // float num12 = base.CalcDiffLoss(i * calcResolution, i); // float num13 = ((((okumuHataPropagationModel.K1 + (okumuHataPropagationModel.K2 * num7)) - (okumuHataPropagationModel.K3 * num6)) + ((okumuHataPropagationModel.K4 - (okumuHataPropagationModel.K5 * num6)) * num5)) + num11) + num8; // numArray3[i] = num13 + (num12 * okumuHataPropagationModel.KDiffraction); // string message = string.Concat(new object[] { // DateTime.Now.ToString("G"), ",", param.CellName, ",", param.X, ",", param.Y, ",", txEffHeight[0], ",", param.RxEffHeight[i], ",", okumuHataPropagationModel.PropModelName, ",", base.m_RayIndex, ",", // i, ",", calcResolution, ",,,", num12, ",", num13, ",", numArray3[i] // }); // if (base.m_Log4net.IsDebugEnabled) // { // base.m_Log4net.Debug(message); // } // } // else // { // numArray3[i] = float.MinValue; // } // } // } // return numArray3; //} #endregion #region modified 2012.9.24 public override float[] CalculateRayPathLoss(RayMethodParam param, IPropagationModel model, ref bool isStopCalculator) { OkumuHataPropagationModel okumuHataPropagationModel = model as OkumuHataPropagationModel; float f = param.Frequency; int startIndex = param.StartIndex; int endIndex = param.EndIndex; float calcResolution = param.CalcResolution; float[] txEffHeight = param.TxEffHeight; float[] rxEffHeight = param.RxEffHeight; float[] numArray3 = new float[(endIndex - startIndex) + 1]; param.PeakHeightMatrix = new short[(endIndex - startIndex) + 1]; param.PeakDotMatrix = new int[(endIndex - startIndex) + 1]; PeakTempValue peakTempValue = new PeakTempValue(); if (okumuHataPropagationModel != null) { float num8 = this.CellSelect(f, okumuHataPropagationModel); float num7 = (float)Math.Log10((double)f); float num6 = (float)Math.Log10((double)txEffHeight[0]); StructAntennaParam antennaGainParam = param.AntennaGainParam; for (int i = 0; i < numArray3.Length; i++) { if (isStopCalculator) { return numArray3; } if ((param.TxEffHeight[i] != -32768f) && (param.RxEffHeight[i] != -32768f)) { float num5 = this.GetDistance(startIndex, i, calcResolution); float num11 = this.AhrCalculate(f, rxEffHeight, i, okumuHataPropagationModel); float num9 = (i + startIndex) * calcResolution; float num12 = base.CalcDiffLoss(i * calcResolution, i, peakTempValue); param.PeakDotMatrix[i] = (int)peakTempValue.PeakDot; param.PeakHeightMatrix[i] = peakTempValue.PeakHeight; float num13 = ((((okumuHataPropagationModel.K1 + (okumuHataPropagationModel.K2 * num7)) - (okumuHataPropagationModel.K3 * num6)) + ((okumuHataPropagationModel.K4 - (okumuHataPropagationModel.K5 * num6)) * num5)) + num11) + num8; numArray3[i] = num13 + (num12 * okumuHataPropagationModel.KDiffraction); string message = string.Concat(new object[] { DateTime.Now.ToString("G"), ",", param.CellName, ",", param.X, ",", param.Y, ",", txEffHeight[0], ",", param.RxEffHeight[i], ",", okumuHataPropagationModel.PropModelName, ",", base.m_RayIndex, ",", i, ",", calcResolution, ",,,", num12, ",", num13, ",", numArray3[i] }); if (base.m_Log4net.IsDebugEnabled) { base.m_Log4net.Debug(message); } } else { numArray3[i] = float.MinValue; } } } return numArray3; }
protected void Init(IPropagationModel propModel, IBaseService context, string strPropertiesXml) { this.m_PropertyGridName = this.gridParameters.Text; this.BandProperties(strPropertiesXml, propModel); this.AddComboInPropertyGrid(); this.btnApply.Enabled = false; this.gridParameters.PropertyValueChanged += new PropertyValueChangedEventHandler(this.gridParameters_PropertyValueChanged); this.gridParameters.Controls[2].Controls[1].KeyDown += new KeyEventHandler(this.PropertiesFormBase_KeyDown); this.txtName.TextChanged += new EventHandler(this.txtName_TextChanged); this.txtDescriptionrich.TextChanged += new EventHandler(this.txtDescriptionrich_TextChanged); }