Exemplo n.º 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;
                 }
             }
         }
     }
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }