public PredictionStatisticsManager(PredictionGroup pg, OtherSubSysInterface subSysInterface) { this.m_ActualMaxValue = -32768f; this.m_ActualMinValue = 0x7fffffff; this.m_SubSysInterface = subSysInterface; this.m_PredictionGroup = pg; }
private string CreateExportIntervalLegendXml(PredictionGroup group, PredictionStudy study) { string str = string.Empty; string str2 = "<?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n"; string str3 = (string.Empty + "<STUDY>\r\n") + this.CreateExpIntervalLegendForStudyXml(study) + "</STUDY>\r\n"; return (str + str2 + str3); }
private void ValidateGroups(List<PredictionGroup> grps, PredictionGroup group) { if (group.Tag != null) { grps.Add(group); } }
private string getCellname(PredictionGroup group, short cellId) { foreach (LTECellCalcInfo info in group.CellInfos) { if (info.Tanceiver.ID == cellId) { return info.Tanceiver.Name; } } return ""; }
public void ClearBestServerMapLayer(PredictionStudy ps, PredictionGroup group) { string str = Enum.GetName(typeof(PredictionStudyType), ps.StudyType).Replace('_', ' '); TreeNode node = this.m_PredictionGroupsManager.RootNode.Nodes[group.Name].Nodes[str]; if (ps.StudyLegend.MapLever != -2147483648) { int num = (node.Nodes.Count - 1) / 0xff; for (short i = 0; i <= num; i = (short) (i + 1)) { this.m_SubSysInterface.AnalyDispEvent.RemoveRasterLayer(ps.StudyLegend.MapLever + i); } } }
private string getMatrixIntNameAndstudy(PredictionStudy study, GeoXYPoint gPoint, PredictionGroup group) { string str = null; ValueMatrixIntCollection studyValueMatrix = (ValueMatrixIntCollection) study.StudyValueMatrix; if (studyValueMatrix == null) { return null; } studyValueMatrix.Open(this.m_SubSysInterface.ProjectManager); foreach (ValueMatrixInt num in studyValueMatrix.Values) { int num2 = this.getMatrixIndex(gPoint, num.Resolution, num.NorthwestY, num.NorthwestX, num.ColumnsCount); if (num[num2] != -32768) { str = string.Concat(new object[] { str, study.StudyType.ToString(), " = ", ((float) num[num2]) / 1000f, this.blank_enter }); } } studyValueMatrix.Close(false); return str; }
private string getIsDivisionShort(PredictionStudy study, ValueMatrixShort matrixShort, int index, PredictionGroup group) { string nameAndStudy = null; if ((study.StudyType & this.studyTypeNotdivision) == study.StudyType) { if (study.StudyType == PredictionStudyType.Best_Server) { return (this.getCellname(group, matrixShort[index]) + this.blank_enter); } if ((study.StudyType == PredictionStudyType.PUSCH_MCS) || (study.StudyType == PredictionStudyType.PDSCH_MCS)) { int mscid = matrixShort[index]; if (mscid == 0) { return nameAndStudy; } return this.GetMscCodingRate(study, group, nameAndStudy, mscid); } return (((float) matrixShort[index]) + this.blank_enter); } return ((((float) matrixShort[index]) / 100f) + this.blank_enter); }
public PredictionDataManager(PredictionGroup pg, PredictionConfig cfg, OtherSubSysInterface interfaces, ProgressHandle pgrsHandle, string savepath, string projectName) { this.m_Interfaces = interfaces; this.m_Group = pg; this.m_PredictionCfg = cfg; this.m_ProgressHandle = pgrsHandle; this.m_DLBLER = pg.DLBLER; this.m_ULBLER = pg.ULBLER; this.m_CalcLTECells = new LTECalcCellsInfoCollection(); this.m_CaseDataManager = new CaseDataManager(this.m_Group, savepath, projectName); this.m_AllPolygonsCellCalcInfo = new List<LTECalcCellsInfoCollection>(); this.m_NeedCalActualRxIntf = false; this.m_NeedCalMaxRxIntf = false; this.m_NeedCalSecondMaxRSRP = false; this.m_NeedCalSymbolRSRP = false; this.m_NeedCalOverlapping = false; this.NeedCreateActualRxPowerValueMatrix(); this.NeedCreateMaxRxPowerValueMartix(); this.NeedCalSecondMaxRSRP(); this.NeedCalSymbol_RSRP(); this.NeedCalOverlapping(); this.SetSavingPath(savepath, projectName); }
private bool IsHave(PredictionGroup pg) { foreach (PredictionStudy study in pg.StudyList) { if (Enum.GetName(typeof(PredictionStudyType), (int) study.StudyType).Replace("_", " ") == ((string) this.cboStudy.SelectedItem)) { return true; } } return false; }
private void Init() { this.m_GroupNode = this.m_PredictionGroupsManager.RootNode.TreeView.SelectedNode; this.txtName.Text = this.m_GroupNode.Text; this.txtName.ReadOnly = true; this.m_PredictionGroup = this.m_PredictionGroupsManager.Find(this.m_GroupNode.Text); this.ntxtGroupResolution.Value = Convert.ToDecimal(this.m_PredictionGroup.Resolution); this.ntxtRxSensitivity.Value = (decimal) this.m_PredictionGroup.RxSensitivity; this.ntxtMaxSensitivity.Value = (decimal) this.m_PredictionGroup.MaxSensitivity; this.ntxtCellEdgeCoverageProbability.Value = ((decimal) this.m_PredictionGroup.CellEdgeCoverageProbability) * 100M; this.chbShadow.Checked = this.m_PredictionGroup.IsShadowdowAccout; this.chbIndoorCoverage.Checked = this.m_PredictionGroup.IsIndoorCoverage; this.m_PolygonRegion = this.m_SubSysInterface.PolygonRegionList; this.lsbPolygon.Items.Add("Full Map"); this.lsbPolygon.SelectedIndex = 0; foreach (GeoPolygonRegion region in this.m_PolygonRegion) { this.lsbPolygon.Items.Add(region.Name); } if (this.m_PredictionGroup.Region != null) { int num = 0; foreach (GeoPolygonRegion region in this.m_PolygonRegion) { if (region.ID == this.m_PredictionGroup.Region.ID) { this.lsbPolygon.SelectedIndex = num + 1; break; } num++; } } if (!this.m_PredictionGroup.IsChannelIndexSaved) { foreach (KeyValuePair<short, List<int>> pair in this.m_ChannlIndexDic) { this.m_ChannlIndexDictemp.Add(pair.Key, new List<int>(pair.Value)); } } else { foreach (KeyValuePair<short, List<int>> pair in this.m_PredictionGroup.ChannelIndexDic) { this.m_ChannlIndexDictemp.Add(pair.Key, new List<int>(pair.Value)); } } this.TrafficBind(); this.TrafficDataToView(); this.FrenBandbind(); this.FrenBandChannelIndex(); }
public CaseDataManager(PredictionGroup group, string savepath, string projectName) { this.InitialValueCollections(); this.m_Group = group; this.SetSavingPath(savepath, projectName); this.m_CalMatrixStructArr = new List<CalculatorMatrixStruct>(); }
private void GetThroughputClutterCoverage(PredictionGroup group, PredictionStudy study, List<MaxMinValue> indexList, string key) { string savePath = this.GetSavePath(group, study); ValueMatrixIntCollection studyValueMatrix = study.StudyValueMatrix as ValueMatrixIntCollection; studyValueMatrix.Open(this.m_SubSysInterface.ProjectManager); ValueMatrixInt num = studyValueMatrix.Values[0]; studyValueMatrix.Close(false); }
public LTECoverageInfo(PredictionGroup group, IApplicationContext appContext) { this.m_PredictionGroup = group; this.m_AppContext = appContext; }
private IEnumerable<PredictionGroup> Group(IEnumerable<Prediction> predictions, List<string> _groups, int groupNum) { if (groupNum >= _groups.Count) { foreach (Prediction prediction in predictions) yield return new PredictionGroup(prediction.Name, prediction); yield break; } Func<Prediction, string> grouper; if (_groups[groupNum] == groupByIncidentTypesToolStripMenuItem.Text) grouper = p => "Incidents: " + p.Model.IncidentTypes.OrderBy(i => i).Concatenate(", "); else if (_groups[groupNum] == groupByRunToolStripMenuItem.Text) grouper = p => "Run: " + p.RunId; else if (_groups[groupNum] == groupByPredictionIntervalToolStripMenuItem.Text) grouper = p => "Time: " + p.PredictionStartTime.ToShortDateString() + " " + p.PredictionStartTime.ToShortTimeString() + " -- " + p.PredictionEndTime.ToShortDateString() + " " + p.PredictionEndTime.ToShortTimeString(); else { MessageBox.Show("Grouping \"" + _groups[groupNum] + "\" not implemented. Please send this message to the developers."); yield break; } foreach (IGrouping<string, Prediction> group in predictions.GroupBy(grouper)) { PredictionGroup predictionGroup = new PredictionGroup(group.Key); foreach (PredictionGroup subGroup in Group(group, _groups, groupNum + 1)) predictionGroup.SubGroups.Add(subGroup); yield return predictionGroup; } }
private string getMscModulationCodingRate(PredictionGroup group, int McsId, LinkType linkType) { MCS mcs; if (linkType == LinkType.Downlink) { mcs = group.MCSDLDictionary[McsId]; } else { mcs = group.MCSULDictionary[McsId]; } return string.Concat(new object[] { mcs.Modulation, " ", LTEPredictionResource.PREDICTION_CODERATE, mcs.CodingRate, this.blank_enter }); }
private ValueMatrixShortCollection GetValueCollections(PredictionGroup group) { foreach (PredictionStudy study in group.StudyList) { if (study.StudyType == PredictionStudyType.Best_Server) { return (study.StudyValueMatrix as ValueMatrixShortCollection); } } return null; }
private void fillFilter(PredictionGroup group) { List<PredictionStudy> list = new List<PredictionStudy>(); if (group.IsCalSuccess) { foreach (PredictionStudy study in group.StudyList) { if (study.Selected) { list.Add(study); } } if ((list == null) || (list.Count == 0)) { list = null; } else { this.m_Filter[group] = list; } } }
private void ExportStudyDataDisplay(PredictionGroup group, PredictionStudy study) { int displayTypeIndex = study.StudyLegend.DisplayTypeIndex; this.Text = this.m_TreeNode.Text; if (displayTypeIndex == 0) { this.GetUniqueLegend(study, displayTypeIndex); } else if (displayTypeIndex == 1) { this.GetDiscreteLegend(group, study, displayTypeIndex); } else { this.GetIntervalLegend(group, study, displayTypeIndex); } this.dgvExpoertData.ReadOnly = true; }
private void ExportStudyDataAsReport() { this.m_GroupPercentage = 0f; this.m_GroupArea = 0f; this.m_Group = this.m_PredictionGroupsManager.Find(this.m_TreeNode.Parent.Text); if (this.m_Group.IsCalSuccess) { PredictionStudy ps = this.m_PredictionGroupsManager.Find(this.m_Group, this.m_TreeNode.Text); this.psm = new PredictionStatisticsManager(ps, this.m_Group, this.m_SubSysInterface); this.dgvExpoertData.Rows.Add(); this.dgvExpoertData.Rows[0].Cells["GroupNameOrLegend"].Value = this.m_Group.Name + " " + Enum.GetName(typeof(PredictionStudyType), (int) ps.StudyType); this.dgvExpoertData.Rows[0].Cells["GroupNameOrLegend"].Style.Font = new Font("Arial", 11f, FontStyle.Bold); this.m_Index++; this.ExportStudyDataDisplay(this.m_Group, ps); this.dgvExpoertData.Rows[0].Cells["CoverArea"].Value = this.m_GroupArea; this.dgvExpoertData.Rows[0].Cells["CoverArea"].Style.Font = new Font("", 10f, FontStyle.Bold); if (this.m_GroupPercentage > 0.9999f) { this.m_GroupPercentage = 1f; } this.dgvExpoertData.Rows[0].Cells["Percentage"].Value = (this.m_GroupPercentage * 100f) + "%"; this.dgvExpoertData.Rows[0].Cells["Percentage"].Style.Font = new Font("", 10f, FontStyle.Bold); } }
private void ExportOneGroupDataAsReport(PredictionGroup group) { List<PredictionStudy> list; this.m_Filter.TryGetValue(group, out list); if ((list != null) && (list.Count != 0)) { this.m_Group = group; foreach (PredictionStudy study in list) { this.m_GroupPercentage = 0f; this.m_GroupArea = 0f; this.dgvExpoertData.Rows.Add(); int index = this.m_Index; this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Value = group.Name + " " + study.StudyType.ToString(); this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Style.Font = new Font("Arial", 11f, FontStyle.Bold); this.psm = new PredictionStatisticsManager(study, group, this.m_SubSysInterface); this.m_Index++; this.ExportStudyDataDisplay(group, study); this.dgvExpoertData.Rows[index].Cells["CoverArea"].Value = this.m_GroupArea; this.dgvExpoertData.Rows[index].Cells["CoverArea"].Style.Font = new Font("", 10f, FontStyle.Bold); if (this.m_GroupPercentage > 0.9999f) { this.m_GroupPercentage = 1f; } this.dgvExpoertData.Rows[index].Cells["Percentage"].Value = (this.m_GroupPercentage * 100f) + "%"; this.dgvExpoertData.Rows[index].Cells["Percentage"].Style.Font = new Font("", 10f, FontStyle.Bold); } this.m_Group = null; } }
private void ExportDiscreteLegendConfig(PredictionGroup group, PredictionStudy study, string filepath) { this.m_FileStream = new FileStream(filepath, FileMode.Create, FileAccess.Write); this.m_Writer = new StreamWriter(this.m_FileStream, Encoding.Default); try { string str = this.CreateExportDiscreteLegendXml(group, study); this.m_Writer.Write(str); this.m_Writer.Close(); this.m_FileStream.Close(); this.m_Writer = null; this.m_FileStream = null; } catch (Exception exception) { this.ExportExceptionSolve(exception); } }
private string getMatrixShortNameAndstudy(PredictionStudy study, GeoXYPoint gPoint, PredictionGroup group) { string str = null; ValueMatrixShortCollection studyValueMatrix = (ValueMatrixShortCollection) study.StudyValueMatrix; if (studyValueMatrix == null) { return (string) (str = null); } studyValueMatrix.Open(this.m_SubSysInterface.ProjectManager); foreach (ValueMatrixShort @short in studyValueMatrix.Values) { int index = this.getMatrixIndex(gPoint, @short.Resolution, @short.NorthwestY, @short.NorthwestX, @short.ColumnsCount); if ((@short[index] != -32768) && (@short[index] != 0x7fff)) { string str2 = this.getIsDivisionShort(study, @short, index, group); if (str2 != null) { str = str + study.StudyType.ToString() + " = "; str = str + str2; } } } studyValueMatrix.Close(false); return str; }
private string GetMscCodingRate(PredictionStudy study, PredictionGroup group, string nameAndStudy, int mscid) { if (PredictionStudyType.PUSCH_MCS == study.StudyType) { nameAndStudy = this.getMscModulationCodingRate(group, mscid, LinkType.Uplink); return nameAndStudy; } nameAndStudy = this.getMscModulationCodingRate(group, mscid, LinkType.Downlink); return nameAndStudy; }
private void GetIntervalLegend(PredictionGroup group, PredictionStudy study, int ti) { string key = group.Name + Enum.GetName(typeof(PredictionStudyType), study.StudyType); int index = 0; float coverArea = 0f; float area = 0f; float percentage = 0f; List<MaxMinValue> maxMinList = new List<MaxMinValue>(); Dictionary<MaxMinValue, int> maxMinDic = new Dictionary<MaxMinValue, int>(); maxMinList.AddRange(study.StudyLegend.ValueIntervals[study.StudyLegend.FieldItem[ti]].ValueIntervalsField.Keys); maxMinDic = this.GetIntClutterCoverage(group, study, key, maxMinList, maxMinDic); if (maxMinDic != null) { if (this.m_Group.Region != null) { area = (float) this.m_Group.Region.RegionArea; } Dictionary<MaxMinValue, List<double>> clutterDic = this.m_IntervalCluterCoverage[key]; this.cycleMaxMinValue(study, ti, ref index, ref coverArea, area, ref percentage, maxMinList, maxMinDic, clutterDic); this.m_GroupPercentage = this.SolvePrecisionBelow_1(this.m_GroupPercentage); this.m_GroupArea = this.SolvePrecision((double) this.m_GroupArea, this.m_Mode); if ((maxMinList != null) && (maxMinList.Count > 0)) { this.GetCumulatePer(maxMinList.Count); } } }
public string getStudyValueByGroup(PredictionGroup group, double x, double y) { string str = group.Name + this.blank_enter; string result = string.Empty; GeoXYPoint gPoint = null; ValueMatrixIntCollection studyValueMatrix = group.StudyList[0].StudyValueMatrix as ValueMatrixIntCollection; ValueMatrixShortCollection valueMatrixShortCollection = group.StudyList[0].StudyValueMatrix as ValueMatrixShortCollection; if (!this.Validate(x, y, ref gPoint, studyValueMatrix, valueMatrixShortCollection)) { return null; } result = this.GetMatrixNameAndStudy(group, result, gPoint); if (result.Trim().Equals(string.Empty)) { result = null; } else { result = str + result; } return result; }
private string GetSavePath(PredictionGroup group, PredictionStudy ps) { string currentProjectLossPath = this.m_SubSysInterface.ProjectManager.CurrentProjectLossPath; if (string.IsNullOrEmpty(currentProjectLossPath)) { currentProjectLossPath = this.m_SubSysInterface.ProjectManager.DefaultProjectLossPath; } string str3 = currentProjectLossPath; return (str3 + @"\" + group.Name + ps.StudyType.ToString() + "_toGIS.tmp"); }
private void GetDiscreteLegend(PredictionGroup group, PredictionStudy study, int ti) { short num = 0; float regionArea = 0f; float num3 = 0f; float percentage = 0f; Dictionary<short, int> dictionary = new Dictionary<short, int>(); List<short> indexList = new List<short>(); indexList.AddRange(study.StudyLegend.DiscreteValue[study.StudyLegend.FieldItem[ti]].DiscreteValueField.Keys); dictionary = this.psm.CalculateDiscreteRate(indexList); if (this.m_Group.Region != null) { regionArea = (float) this.m_Group.Region.RegionArea; } if (dictionary != null) { string key = group.Name + Enum.GetName(typeof(PredictionStudyType), study.StudyType); if (!this.m_DiscreteCluterCoverage.ContainsKey(key)) { this.GetDIScreteClutterCoverage(study, indexList, key); } Dictionary<short, List<double>> dictionary2 = this.m_DiscreteCluterCoverage[key]; foreach (short num5 in indexList) { this.dgvExpoertData.Rows.Add(); string str2 = study.StudyLegend.DiscreteValue[study.StudyLegend.FieldItem[ti]].LegendString[num]; Color color = study.StudyLegend.DiscreteValue[study.StudyLegend.FieldItem[ti]].DiscreteValueField[num5]; percentage = ((float) dictionary[num5]) / ((float) this.m_Group.NumPointInPolygon); percentage = this.SolvePrecisionBelow_1(percentage); num3 = regionArea * percentage; this.m_GroupArea += num3; this.m_GroupPercentage += percentage; num3 = this.SolvePrecision((double) num3, this.m_Mode); this.dgvExpoertData.Rows[this.m_Index].Cells["GroupNameOrLegend"].Value = this.m_EmptyString + str2; this.dgvExpoertData.Rows[this.m_Index].Cells["CoverArea"].Value = num3; this.dgvExpoertData.Rows[this.m_Index].Cells["Percentage"].Value = this.SolvePrecision((double) (percentage * 100f), this.m_Mode) + "%"; List<double> list2 = dictionary2[num5]; for (int i = 0; i < this.m_Clutters.Count; i++) { this.dgvExpoertData.Rows[this.m_Index].Cells[this.m_Clutters[i]].Value = this.SolvePrecision(list2[i] * 100.0, this.m_Mode) + "%"; } this.m_Index++; num = (short) (num + 1); } this.m_GroupPercentage = this.SolvePrecisionBelow_1(this.m_GroupPercentage); this.m_GroupArea = this.SolvePrecision((double) this.m_GroupArea, 4); if ((indexList != null) && (indexList.Count > 0)) { this.GetCumulatePer(indexList.Count); } } }
public void ExportLegendConfig(PredictionGroup group, PredictionStudy study, string filepath) { if (!string.IsNullOrEmpty(filepath)) { if ((study.StudyType & this.m_DiscreteStudy) == study.StudyType) { this.ExportDiscreteLegendConfig(group, study, filepath); } else { this.ExportIntervalLegendConfig(group, study, filepath); } } }
private string GetMatrixNameAndStudy(PredictionGroup group, string result, GeoXYPoint gPoint) { foreach (PredictionStudy study in group.StudyList) { if (study.Selected) { if ((study.StudyType & this.studyType) == study.StudyType) { result = result + this.getMatrixIntNameAndstudy(study, gPoint, group); } else { result = result + this.getMatrixShortNameAndstudy(study, gPoint, group); } } } return result; }
private Dictionary<MaxMinValue, int> GetIntClutterCoverage(PredictionGroup group, PredictionStudy study, string key, List<MaxMinValue> MaxMinList, Dictionary<MaxMinValue, int> MaxMinDic) { if ((((study.StudyType == PredictionStudyType.DL_MAC_Peak_Throughput) || (study.StudyType == PredictionStudyType.UL_MAC_Peak_Throughput)) || (study.StudyType == PredictionStudyType.DL_Application_Peak_Throughput)) || (study.StudyType == PredictionStudyType.UL_Application_Peak_Throughput)) { MaxMinDic = this.psm.CalculateIntValue(MaxMinList, StatisticType.TableLegend); if (!this.m_IntervalCluterCoverage.ContainsKey(key)) { this.GetThroughputClutterCoverage(group, study, MaxMinList, key); } return MaxMinDic; } MaxMinDic = this.psm.CalculateShortValue(MaxMinList, StatisticType.TableLegend); if (!this.m_IntervalCluterCoverage.ContainsKey(key)) { this.GetIntervalClutterCoverage(study, MaxMinList, key); } return MaxMinDic; }