示例#1
0
 private void CalculateTotalData(SimulationResult result, List<string> serviceNameList, List<int> snapShotIndexs, Dictionary<string, float[]> statDataDic)
 {
     foreach (int num in snapShotIndexs)
     {
         SnapShotStatData snapShotStatData = result.GetSnapShotStatData(num, this.m_OtherSubSysInterface);
         foreach (StaSimuSiteResult result2 in snapShotStatData.StatSimuSiteResultList)
         {
             float[] numArray;
             statDataDic.TryGetValue(result2.SiteName, out numArray);
             numArray[1] += result2.UlAvgThroughput;
             numArray[2] += result2.UlAppAvgThroughput;
             numArray[3] += result2.DlAvgThroughput;
             numArray[4] += result2.DlAppAvgThroughput;
             for (int i = 0; i < serviceNameList.Count; i++)
             {
                 ServiceThroughput throughput;
                 result2.ServiceThroughputDic.TryGetValue(serviceNameList[i], out throughput);
                 if (throughput != null)
                 {
                     numArray[5 + (i * 4)] += throughput.UlThroughput;
                     numArray[6 + (i * 4)] += throughput.UlAppThroughput;
                     numArray[7 + (i * 4)] += throughput.DlThroughput;
                     numArray[8 + (i * 4)] += throughput.DlAppThroughput;
                 }
             }
         }
     }
 }
示例#2
0
 public DataTable GetAllCellsStatData(SimulationResult result)
 {
     DataTable table = new DataTable();
     table.Columns.Add(SimulationResource.SIMULATION_SITE);
     table.Columns.Add(SimulationResource.SIMULATION_TRANSCEIVER);
     table.Columns.Add(SimulationResource.SIMULATION_CELL);
     table.Columns.Add(SimulationResource.SIMULATION_TX_POWER, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_UL_IOT_DB, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_UL_LOAD, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_UL_AVG_USERD_RB_NUM, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_DL_LOAD, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_DL_AVG_USERD_RB_NUM, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_UL_THROUGHPUT_KBPS, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_UL_APP_THROUGHPUT_KBPS, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_DL_THROUGHPUT_KBPS, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_DL_APP_THROUGHPUT_KBPS, typeof(float));
     table.Columns.Add(SimulationResource.SIMULATION_SERVICE_USER, typeof(int));
     table.Columns.Add(SimulationResource.SIMULATION_CALL_DROPED_USER, typeof(int));
     List<int> snapshotIndexs = result.GetSnapshotIndexs();
     int count = snapshotIndexs.Count;
     if (count > 0)
     {
         CarrierStatData data2;
         List<StaSimuSiteResult> statSimuSiteResultList = result.GetSnapShotStatData(snapshotIndexs[0], this.m_OtherSubSysInterface).StatSimuSiteResultList;
         Dictionary<string, CarrierStatData> dictionary = new Dictionary<string, CarrierStatData>();
         foreach (StaSimuSiteResult result2 in statSimuSiteResultList)
         {
             foreach (StatSimuCarrierResult result3 in result2.StatSimuCarrierResultList)
             {
                 data2 = new CarrierStatData();
                 data2.Carrier = result3.CarrierName;
                 dictionary.Add(result3.CarrierName, data2);
             }
         }
         foreach (int num2 in snapshotIndexs)
         {
             SnapShotStatData snapShotStatData = result.GetSnapShotStatData(num2, this.m_OtherSubSysInterface);
             foreach (StaSimuSiteResult result2 in snapShotStatData.StatSimuSiteResultList)
             {
                 foreach (StatSimuCarrierResult result3 in result2.StatSimuCarrierResultList)
                 {
                     dictionary.TryGetValue(result3.CarrierName, out data2);
                     data2.Site = result2.SiteName;
                     data2.Cell = result3.CellName;
                     data2.Carrier = result3.CarrierName;
                     data2.TXPower += result3.TxPower;
                     data2.ULIot += result3.UlIoT;
                     data2.UlAvgUsedRbNum += result3.UlAvgUsedRbNum;
                     data2.DlAvgUsedRbNum += result3.DlAvgUsedRbNum;
                     data2.ULLoad += result3.UlAvgLoad;
                     data2.DLLoad += result3.DlAvgLoad;
                     data2.ULThroughPut += result3.UlAvgThroughput;
                     data2.ULAppThroughPut += result3.UlAppAvgThroughput;
                     data2.DLThroughPut += result3.DlAvgThroughput;
                     data2.DLAppThroughPut += result3.DlAppAvgThroughput;
                     data2.ServiceUser += result3.SatisfiedUserNum;
                     data2.CallDropedUser += result3.OfflineUserNum;
                 }
             }
         }
         foreach (KeyValuePair<string, CarrierStatData> pair in dictionary)
         {
             List<object> list3 = new List<object>();
             data2 = pair.Value;
             list3.Add(data2.Site);
             list3.Add(data2.Cell);
             list3.Add(data2.Carrier);
             list3.Add(data2.TXPower / ((float) count));
             list3.Add(data2.ULIot / ((float) count));
             list3.Add(data2.ULLoad / ((float) count));
             list3.Add(data2.UlAvgUsedRbNum / ((float) count));
             list3.Add(data2.DLLoad / ((float) count));
             list3.Add(data2.DlAvgUsedRbNum / ((float) count));
             list3.Add(data2.ULThroughPut / ((float) count));
             list3.Add(data2.ULAppThroughPut / ((float) count));
             list3.Add(data2.DLThroughPut / ((float) count));
             list3.Add(data2.DLAppThroughPut / ((float) count));
             list3.Add(data2.ServiceUser / count);
             list3.Add(data2.CallDropedUser / count);
             table.Rows.Add(list3.ToArray());
         }
         dictionary.Clear();
         dictionary = null;
     }
     return table;
 }
示例#3
0
 private Dictionary<string, float[]> GetSiteDataDic(SimulationResult result, List<int> snapShotIndexs, int oneRowDataLength)
 {
     List<StaSimuSiteResult> statSimuSiteResultList = result.GetSnapShotStatData(snapShotIndexs[0], this.m_OtherSubSysInterface).StatSimuSiteResultList;
     Dictionary<string, float[]> dictionary = new Dictionary<string, float[]>();
     foreach (StaSimuSiteResult result2 in statSimuSiteResultList)
     {
         float[] numArray = new float[oneRowDataLength];
         dictionary.Add(result2.SiteName, numArray);
     }
     
     return dictionary;
 }
示例#4
0
 private List<string> GetServiceNameList(SimulationResult result)
 {
     List<string> list = new List<string>();
     foreach (StatSimuServiceResult result2 in result.MonteCarloResult.StatSimuServiceResultList)
     {
         list.Add(result2.ServiceName);
     }
     return list;
 }
示例#5
0
 public DataTable GetAllSitesStatData(SimulationResult result)
 {
     List<string> serviceNameList = this.GetServiceNameList(result);
     DataTable dt = new DataTable();
     dt.Columns.Add(SimulationResource.SIMULATION_SITE, typeof(string));
     dt.Columns.Add(SimulationResource.SIMULATION_TOTAL_THROUGHPUT_UL, typeof(float));
     dt.Columns.Add(SimulationResource.SIMULATION_TOTAL_APP_THROUGHPUT_UL, typeof(float));
     dt.Columns.Add(SimulationResource.SIMULATION_TOTAL_THROUGHPUT_DL, typeof(float));
     dt.Columns.Add(SimulationResource.SIMULATION_TOTAL_APP_THROUGHPUT_DL, typeof(float));
     foreach (string str in serviceNameList)
     {
         dt.Columns.Add(str + SimulationResource.SIMULATION_UL_KBPS, typeof(float));
         dt.Columns.Add(str + SimulationResource.SIMULATION_UL_APP_KBPS, typeof(float));
         dt.Columns.Add(str + SimulationResource.SIMULATION_DL_KBPS, typeof(float));
         dt.Columns.Add(str + SimulationResource.SIMULATION_DL_APP_KBPS, typeof(float));
     }
     List<int> snapshotIndexs = result.GetSnapshotIndexs();
     int count = snapshotIndexs.Count;
     if (count > 0)
     {
         int oneRowDataLength = (serviceNameList.Count * 4) + 5;
         Dictionary<string, float[]> statDataDic = this.GetSiteDataDic(result, snapshotIndexs, oneRowDataLength);
         this.CalculateTotalData(result, serviceNameList, snapshotIndexs, statDataDic);
         CalculateAvgData(dt, count, statDataDic);
         statDataDic.Clear();
         statDataDic = null;
     }
     return dt;
 }
示例#6
0
文件: SimGroup.cs 项目: xiaoyj/Space
 public void DeleteResultFile()
 {
     if (this.m_result != null)
     {
         this.m_result.DeleteResultFile(this.m_otherSubSysInterface);
         this.m_result = null;
     }
 }
示例#7
0
文件: SimGroup.cs 项目: xiaoyj/Space
 public void Run(ref bool isSimulateCanceled)
 {
     this.m_result = null;
     Coefficient coefficient = new Coefficient();
     SimulationInfo initinfo = new SimulationInfo();
     initinfo.Nsnapshot = Convert.ToInt16(this.m_param.NumOfSnapShot);
     SimulationConstant.IS_HARQ_ON = this.m_param.IsHARQ;
     SimulationConstant.IS_IRC_ON = this.m_param.IsIRC;
     SimulationConstant.FDD_ON = this.m_param.IsFDD;
     SimulationConstant.UL_TTI_BUNDLING_ON = this.m_param.IsTTIBundling;
     SimulationConstant.UL_VMIMO_ON = this.m_param.IsVMIMO;
     SimulationConstant.CONV_ULLOAD_THRESHOLD = this.m_param.ULLoadConThreshold;
     SimulationConstant.CONV_DLLOAD_THRESHOLD = this.m_param.DLLoadConThreshold;
     SimulationConstant.CONV_ULTH_THRESHOLD = this.m_param.ULThroughputConThreshold;
     SimulationConstant.CONV_DLTH_THRESHOLD = this.m_param.DLThroughputConThreshold;
     SimulationConstant.CONV_ULIOT_THRESHOLD = this.m_param.IOTConThreshold;
     initinfo.TtiWarmup = Convert.ToInt16((int)(this.m_param.NumOfTTI - SimulationConstant.DELTA_TTI));
     this.m_SnapShotNum = this.m_param.NumOfSnapShot;
     initinfo.NttiLmd = Convert.ToInt16(this.m_param.NumOfTTI);
     initinfo.Name = this.m_param.NameOfSimulation;
     coefficient.m_SiteCorr = this.m_param.SiteCorr;
     coefficient.m_CellCorr = this.m_param.CellCorr;
     coefficient.m_UserCorr = this.m_param.UserCorr;
     initinfo.Coefficientabc = coefficient;
     if (!this.GetCellCollection())
     {
         isSimulateCanceled = true;
         MessageBoxUtil.ShowError(SimulationResource.SIMULATION_CAL_IS_WRONG);
         this.m_calcCells.Clear();
     }
     else
     {
         initinfo.CalCells = this.m_calcCells;
         this.getCloneService();
         this.getCloneMobility();
         this.getCloneTerminal();
         this.m_GroupChildNodeStateImage = new Dictionary<short, List<short>>();
         CarrierManager.getInstance().Carriers = new List<LTECell>();
         foreach (Transceiver transceiver in this.m_calcCells)
         {
             foreach (IACell cell in transceiver.Cells)
             {
                 if ((cell is LTECell) && cell.Active)
                 {
                     CarrierManager.getInstance().Carriers.Add(cell as LTECell);
                 }
             }
         }
         UserManager.getInstance().UserBuilder = new UserManager.LTEUserBuilder(this.GenUsers);
         initinfo.SubSysInterface = this.m_otherSubSysInterface;
         this.m_otherSubSysInterface.SetProgressScope(initinfo.Name, 0, 100);
         this.m_otherSubSysInterface.ReportProgress(initinfo.Name, 0, SimulationResource.SIMULATION_INIT_4);
         #region 添加制式选择
         if (m_param .IsFDD )                                             
         {
             this.m_SimulateEngine = new SimulationEngine(initinfo);
         }
         else
         {
             this.m_SimulateEngine = new TDDSimulationEngine(initinfo);
         }
         #endregion
         this.m_SimulateEngine.Execute();
         if (this.m_SimulateEngine.IsSimulateCanceled)
         {
             this.m_otherSubSysInterface.ResetProgress(initinfo.Name);
             this.m_calcCells.Clear();
             isSimulateCanceled = true;
         }
         else
         {
             this.m_otherSubSysInterface.ReportProgress(initinfo.Name, 100, SimulationResource.SIMULATION_GENERATE_STATISTICS);
             this.m_result = this.m_SimulateEngine.Statistic();
             if (this.m_result == null)
             {
                 this.m_otherSubSysInterface.ResetProgress(initinfo.Name);
                 isSimulateCanceled = true;
                 this.m_calcCells.Clear();
             }
             else
             {
                 this.GetGraghResult();
                 this.m_otherSubSysInterface.ResetProgress(initinfo.Name);
                 this.m_calcCells.Clear();
             }
         }
     }
 }