コード例 #1
0
        public void Init()
        {
            commonParam = new HSUPA_CommonParam(MockContext.CreatContext());
            updateData = new HSUPA_UpdateData();

            cellList = new List<UMTSSimCell>();
            UMTSSimCell cell = MockCell.CreatUMTSSimCell(0, 0);
            UMTSSimUser user = MockUser.CreatUMTSPSUser();
            user.HSUPA_EcNtList.Add(0.1f);
            user.HSUPA_ULThroughputList.Add(64000);
            user.HSUPA_ULTxPowerList.Add(10);
            cell.ServerdHSUPAUser[0] = user;
            cell.HSUPA_ThroughPutList.Add(64000);
            cell.RLCPeakRateList.Add(64000);
            cell.ScheduleUserListInTTI.Add("true");
            cell.CellType = CarrierTypeOfUMTS.HSUPA;
            
            cellList.Add(cell);
            commonParam.UserCol.AccessedUser.Add(user);
            commonParam.CellList = cellList;
            updateData.CommonParam = commonParam;
        }
コード例 #2
0
ファイル: HSUPA_TTISimulation.cs プロジェクト: xiaoyj/Space
        /// <summary>
        /// 计算UPA快照
        /// </summary>
        /// <returns></returns>
        public object Run()
        {
            InitUsers();
            InitParam();
            bool notNeedRun = m_CommonParams.CellList.Count == 0;
            if (notNeedRun)
            {
                return null;
            }
            notNeedRun = m_CommonParams.UserCol.PreAccessedUser.Count == 0;
            if (notNeedRun)
            {
                return m_Result;
            }  
            for (int i = 0; i < m_CommonParams.SimTTINumber; i++)
            {
                m_CommonParams.NewSimTTIStart(m_CommonParams.TTILength);
                PerformSchedule();               
                
                //Todo···
                //m_CommonParams.CoSimuParam.GotoNextTTI(m_CommonParams.TTILength * (m_CommonParams.CurTTIIndex + 1));
            }
            m_OutTTIResult.OutPutTTIResult();
            UpdateSnapResult();
            m_CommonParams.TTISimEnd();
            m_Result = new SnapResult(m_CommonParams);
            m_Result.GetExcelResult();

            HSUPA_UpdateData dataUpdate = new HSUPA_UpdateData();
            dataUpdate.CommonParam = m_CommonParams;
            dataUpdate.Execute();

            return m_Result; 
        }