Exemplo n.º 1
0
        public void MyInitial()
        {
            m_IGetLinkloss = new MockIGetLinkloss();
            m_InterfCalc = new MockIInterfCalc();
            m_InterfPara = new InterfCalcPara();

        }
Exemplo n.º 2
0
        public void Initial()
        {
            cell = GSMMock.MockGsmSimTrx();
            user = GSMMock.MockGsmSimUser();
            gsmGetLinkLoss = new MockIGetLinkloss();

            #region 添加用户最佳服务载波的干扰载波
            List<ISimCellBase> interfCell = new List<ISimCellBase>();
            Transceiver tranc1 = GSMMock.MockTranceiver();
            user.BestServer.Cell = tranc1.Cells[0];//将tranc1设置为用户最佳服务载波所在的小区         
            //将用户同小区的载波加入到其干扰载波中
            foreach (IACell acell in tranc1.Cells)
            {
                if (acell != user.BestServer.Cell)
                {
                    ISimCellBase tempCell = new GSMSimTRX(acell);
                    tempCell.Parent = tranc1;
                    tempCell.Cell = acell;
                    interfCell.Add(tempCell);
                }
            }

            //在加入其它小区的载波
            Transceiver tranc2 = GSMMock.MockTranceiver();
            foreach (IACell acell in tranc2.Cells)
            {
                ISimCellBase tempCell = new GSMSimTRX(acell);
                tempCell.Cell = acell;
                tempCell.Parent = tranc2;
                interfCell.Add(tempCell);
            }
            user.BestServer.GSMInterCell = interfCell;
            #endregion
        }
Exemplo n.º 3
0
 /// <summary>
 /// 初始化
 /// 为了实现接口
 /// </summary>
 /// <param name="linkloss"></param>
 /// <param name="interfCalc"></param>
 /// <param name="orthogonalCoefficient">正交因子</param>
 public void Initialization(IGetLinkloss linkloss, IInterfCalc interfCalc, ISmartAntCalcGain param)
 {
     this.m_Linkloss = linkloss;
     this.m_InterfCalc = interfCalc;
     TDCalcCommonParam param1 = new TDCalcCommonParam();
     param1.SmartAntGain = param;
     this.m_SmartAntGain = new SmartAntGain(param1.SmartAntGain);
     m_GetTDLinkLoss = new TDLinkLossCalc(m_Linkloss);
 }
Exemplo n.º 4
0
 public void Inital()
 {
     m_User = MockGSMSimUser.CreateGSMSimUser();
     m_IGetLinkloss = new MockIGetLinkloss();
     totalLinkLoss = new TotalLossCalc(m_IGetLinkloss);
     interfPara = new InterfCalcPara();
     interfCalc = new MockIInterfCalc();
     m_TchCalc = new TCHInterfCalc();
 }
Exemplo n.º 5
0
 /// <summary>
 /// 计算用户到本制式所有小区的rscp
 /// </summary>
 /// <param name="user"></param>
 /// <param name="list"></param>
 private void CalcRscp(UMTSSimUser user, List<UMTSSimCell> cellList, IGetLinkloss linkLoss)
 {
     foreach (UMTSSimCell cell in cellList)
     {
         float pilotPower = cell.NECell.PilotPower;
         float dlLinkLoss = linkLoss.GetLinkLoss(NetWorkType.UMTS,cell.NECell.ID,user.TrafficUser.Id ,LinkType.Downlink);
         cell.Rscp = pilotPower - dlLinkLoss;
     }
 }
Exemplo n.º 6
0
 public void MyInitial()
 {
     m_IGetLinkloss = new MockIGetLinkloss();
     m_TotalLossCalc = new TotalLossCalc(m_IGetLinkloss);
     m_InterfCalc = new MockIInterfCalc();
     m_InterfPara = new InterfCalcPara();
     m_DlBCCHCIR = new DLBCCHCIR(m_IGetLinkloss, m_InterfPara, m_InterfCalc);
     //InitialUser();
     m_User = MockGSMSimUser.CreateGSMSimUser();
 }
Exemplo n.º 7
0
 /// <summary>
 /// 初始化下行用户的功率
 /// </summary>
 /// <param name="user"></param>
 private void InitDlPower(GSMSimUser user,IGetLinkloss linkLoss)
 {
     if (user.TrafficUser.Service.CommonType == CommonServiceType.CSService)
     {
         //InitCsDlPower(user,linkLoss);
     }
     else
     {
         InitPsDlPower(user);
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// 单个用户功率初始化
 /// </summary>
 /// <param name="users">已接入的单个用户</param>
 public void InitTxPower(GSMSimUser user,IGetLinkloss linkLoss)
 {
     if (user.TrafficUser.LinkType == LinkType.Uplink )
     {
         InitUlPower(user, linkLoss);
     }
     else 
     {
         InitDlPower(user,linkLoss);
     }
 }
Exemplo n.º 9
0
 public void Init(SnapshotContext gsmSnapshot)
 {
     m_ConvergenceResult = gsmSnapshot.Lookup<ConvergenceResult>(GsmContextkey.GSMConvergenceResult);
     m_SimTrxs = gsmSnapshot.Lookup<List<GSMSimTRX>>(GsmContextkey.GSMSimTRXs);
     m_ServedUsers = gsmSnapshot.Lookup<List<GSMSimUser>>(GsmContextkey.GSMServedUsers);
     m_AllUsers = gsmSnapshot.Lookup<List<GSMSimUser>>(GsmContextkey.AllUsers);
     m_AccessFailUsers = gsmSnapshot.Lookup<List<GSMSimUser>>(GsmContextkey.GSMAccessFails);
     m_ForAccessAgain = gsmSnapshot.Lookup<List<GSMSimUser>>(GsmContextkey.GSMForAccessAgain);
     m_LinkLossGet = gsmSnapshot.Lookup<IGetLinkloss>(GsmContextkey.GSMGetLinkloss);
     m_MaxIterNum = gsmSnapshot.Lookup<GSMUIParam>(GsmContextkey.GSMUIParam).MaxIterNum;
     m_ConvergenceJudge.Init(gsmSnapshot);
 }
Exemplo n.º 10
0
 /// <summary>
 /// 初始化成员变量
 /// </summary>
 /// <param name="context"></param>
 public void Init(SnapshotContext context)
 {
     m_InterfParam = context.Lookup<IInterfCalc>(GsmContextkey.GSMIInterfCalc);
     m_ServerdUsers = context.Lookup<List<GSMSimUser>>(GsmContextkey.GSMServedUsers);
     m_GetLinkLoss = context.Lookup<IGetLinkloss>(GsmContextkey.GSMGetLinkloss);
     m_InterfPara = context.Lookup<InterfCalcPara>(GsmContextkey.GSMIInterfParam);
     m_TchCir = new TCHCIR(m_GetLinkLoss, m_InterfPara, m_InterfParam);
     m_IsPowerCtrl = context.Lookup<GSMUIParam>(GsmContextkey.GSMUIParam).IspowerCtrl;
     m_PowerError = context.Lookup<GSMUIParam>(GsmContextkey.GSMUIParam).PowerError;
     m_Alpha = context.Lookup<GSMUIParam>(GsmContextkey.GSMUIParam).Alpha;
     m_Beta = context.Lookup<GSMUIParam>(GsmContextkey.GSMUIParam).Beta;
 }
Exemplo n.º 11
0
        public void Init(SnapshotContext context)
        {
            m_GetLinkLoss = context.Lookup<IGetLinkloss>(GsmContextkey.GSMGetLinkloss);
            m_InterfCalc = context.Lookup<IInterfCalc>(GsmContextkey.GSMIInterfCalc);
            m_InterfPara = context.Lookup<InterfCalcPara>(GsmContextkey.GSMIInterfParam);
            m_ForAccessAgain = context.Lookup<List<GSMSimUser>>(GsmContextkey.GSMForAccessAgain);
            m_ServerUser = context.Lookup<List<GSMSimUser>>(GsmContextkey.GSMServedUsers);

            m_TchCir = new TCHCIR(m_GetLinkLoss, m_InterfPara, m_InterfCalc);
            m_ThrptCalc = new ThroughputCalculate();
            context.AddKey(GsmContextkey.KickedUsers, m_KickedUsers);
            m_CsTable = context.Lookup<CodeSchemeTable>(GsmContextkey.CodeSchemeTable);
            
        }
Exemplo n.º 12
0
 public ResourceSchedule(SortUser sortUserTool, ICalcInterfere cInterfere, TDCalcCommonParam m_CommonParam,
     List<TDHSDPABearer> bearerList)
 {
     this.m_SortUser = sortUserTool;
     this.m_CalcInterfere = cInterfere;
     this.m_BearerList = bearerList;
     this.m_Linkloss = m_CommonParam.CalcLinkLoss;
     this.m_trafficpriority = m_CommonParam.TdUIParam.TrafficPriorityFactor;
     this.m_userpriority = m_CommonParam.TdUIParam.UEPriorityFactor;
     this.m_chpriority = m_CommonParam.TdUIParam.CHPriorityFactor;
     this.m_IsCDMAon = m_CommonParam.TdUIParam.IsCDMAon;
     this.m_ScheduleType = m_CommonParam.TdUIParam.HSPA_SheduleType;
     m_GetTDLinkLoss = new TDLinkLossCalc(m_Linkloss);
 }
Exemplo n.º 13
0
        public void Init()
        {
            calcIo = new HSUPA_CalcIo();
            context = MockContext.CreatContext();
            commonParam = new HSUPA_CommonParam(context);
            interfCalc = new MockInterfCalc();
            getLinkLoss = new MockGetLinkloss();
            bearerSelector = new HSUPA_BearerSelector(commonParam);
            calcIo.UMTSInterfCalc = new UMTSInterfCalc(interfCalc, getLinkLoss);
            cell = MockCell.CreatUMTSSimCell(0, 0);
            cell.CellType = CarrierTypeOfUMTS.HSUPA;

            user1 = MockUser.CreatUMTSPSUser();
            user1.MaxRSCPCell = cell;
            user1.MaxRSCPCell.UMTSInterfCells = new List<ISimCellBase>();
            user1.MaxRSCPCell.HSUPA_CurRxPower = 10;
            user1.MaxRSCPCell.HSUPA_UsedRxPower = 10;
            user1.IsScheduledInTTI = true;


            calcIo.CommonParams = commonParam;
        }
Exemplo n.º 14
0
 public void Init()
 {
     scheduler = new HSUPA_Scheduler();
     context = MockContext.CreatContext();
     commonParam = new HSUPA_CommonParam(context);
     commonParam.NewSimTTIStart(commonParam.TTILength);
     rateCtrl = new HSUPA_UserScheduleRateCtrl();
     calcIo = new HSUPA_CalcIo();
     interfCalc = new MockInterfCalc();
     getLinkLoss = new MockGetLinkloss();
     bearerSelector = new HSUPA_BearerSelector(commonParam);
     rateCtrl.CommonParams = commonParam;
     scheduler.CommonParams = commonParam;
     calcIo.CommonParams = commonParam;
     calcIo.UMTSInterfCalc = new UMTSInterfCalc(interfCalc, getLinkLoss);
     scheduler.HSUPA_CalcIo = calcIo;
     scheduler.RateCtrl = rateCtrl;
     cell = MockCell.CreatUMTSSimCell(0,0);
     user = MockUser.CreatUMTSPSUser();
     user.MaxRSCPCell = cell;
     rateCtrl.BearerSelector = bearerSelector;
     scheduler.HSUPA_BearerSelector = bearerSelector;
 }
Exemplo n.º 15
0
 /// <summary>
 /// 初始化链路损耗,,并添加至SnapshotContext
 /// </summary>
 private void InitialLinkloss()
 {
     ICalcGain calcGain = ServiceHelper.Lookup<ICalcGain>(m_AppContext);
     m_IGetLinkloss = new LinkLossGet(m_Users, m_Cells, calcGain, m_AppContext,m_UIParam.CellEdgeCovProb);
     m_SnapshotContext.AddKey(ContextKeys.IGetLinkloss, m_IGetLinkloss);
 }
Exemplo n.º 16
0
 public HSDPA_LinkLoss(HSDPA_CommonParam param)
 {
     m_CommonParam = param;
     this.m_LinkLoss = param.ServiceProvider.LinkLossCalc;
 }
Exemplo n.º 17
0
 public void Initialization(IGetLinkloss linkloss, Huawei.UNet.CalcCommon.IInterfCalc interfCalc, ISmartAntCalcGain param)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 18
0
        /// <summary>
        /// 仿真器其它初始化工作
        /// </summary>
        /// <param name="context"></param>
        private void SnapshotInit(SnapshotContext context)
        {
            FailedThreshold thresold = context.Lookup<FailedThreshold>(ContextKeys.FailedThreshold);
            FailNumThreshold = thresold.Threshold;
            //获得用户集合
            m_GSMPreAccessUsers = context.Lookup<List<User>>(ContextKeys.PreAccessUsers);
            //m_GSMFailAccessUsers = context.Lookup<List<User>>(ContextKeys.AccessFailedUsers);

            m_AppContext = context.Lookup<IApplicationContext>(ContextKeys.AppContext);
            m_GSMGetLinkLoss = context.Lookup<IGetLinkloss>(ContextKeys.IGetLinkloss);
            m_GSMContext.AddKey(GsmContextkey.GSMGetLinkloss, m_GSMGetLinkLoss);


            m_UIParam = context.Lookup<GSMUIParam>(ContextKeys.GSMUIParam);
            m_GSMContext.AddKey(GsmContextkey.GSMUIParam, m_UIParam);
            InitCalcPara();
            m_GSMContext.AddKey(GsmContextkey.GSMIInterfParam, m_InterfCalcPara);
            m_InterfCalc = context.Lookup<IInterfCalc>(ContextKeys.IIterfCalc);
            m_GSMContext.AddKey(GsmContextkey.GSMIInterfCalc, m_InterfCalc);


            //初始化CodeSchemeTable
            TrafficAdaptorAssist taa = TrafficAdaptorAssist.Instance;
            List<GSMCodeSchemeModel> gSMBearer = taa.GSMCodeSchemeList;
            m_CSTable = new CodeSchemeTable(gSMBearer);
            m_GSMContext.AddKey(GsmContextkey.CodeSchemeTable, m_CSTable);

            //初始化接入控制
            m_GSMContext.AddKey(GsmContextkey.Access, m_Access);
            m_Access.Init(m_GSMContext);

            m_LoadStatus.Init(context);
            context.AddKey(ContextKeys.GSMLoadStatus, m_LoadStatus);

            m_GSMContext.AddKey(GsmContextkey.AllUsers, m_GSMSimUserList);
            m_GSMContext.AddKey(GsmContextkey.GSMForAccess, m_GSMForAccess);

        }
Exemplo n.º 19
0
        public void Initial()
        {        
            allUsers = GSMMock.MockGsmSimUserList();
            allUsers[0].TrafficUser.LinkType = LinkType.Uplink;
            allUsers[0].TrafficUser.Id = 0;
            allUsers[2].Access = true;
            allUsers[1].TrafficUser.LinkType = LinkType.Downlink;
            allUsers[1].TrafficUser.Id = 1;
            allUsers[2].TrafficUser.LinkType = LinkType.Uplink;
            allUsers[2].TrafficUser.Id = 2;
            allUsers[3].TrafficUser.LinkType = LinkType.Downlink;
            allUsers[3].TrafficUser.Id = 4;
            allUsers[4].TrafficUser.LinkType = LinkType.Downlink;
            allUsers[4].TrafficUser.Terminal.GetNetWorkTerminal(NetWorkType.GSM).MaxTxPower = -30f;
            allUsers[4].TrafficUser.Id = 5;
            allUsers[5].TrafficUser.LinkType = LinkType.Downlink;
            allUsers[5].TrafficUser.Id = 6;
            //添3个BCCH载波,一个TCH载波,每个载波的位置分别为(0,0),(0,1000),(0,2000),(0,3000)          
            gsmCells = new List<GSMSimTRX>();
            Site[] sites = new Site[4];
            Transceiver[] trancs = new Transceiver[4];
            for (int i = 0; i < 4; i++)
            {
                sites[i] = new Site();
                sites[i].X = 0;
                sites[i].Y = i * 1000;
                trancs[i] = GSMMock.MockTranceiver();
                trancs[i].Parent = sites[i];
                trancs[i].ID = (short)i;
                GSMSimTRX trx = GSMMock.MockGsmSimTrx();
                trx.NeTRX.TRXType = TRXType.BCCH;
                trx.Cell.Parent = trancs[i];
                gsmCells.Add(trx);
            }
            gsmCells[3].NeTRX.TRXType = TRXType.TCH;
            allUsers[5].BestServer = null;
            #region 为前3个载波添加干扰载波
            for (int i = 0; i < 3; i++)
            {
                int j = 0;
                List<ISimCellBase> interfCell = new List<ISimCellBase>();
                //将trancs[i]设置为该载波所在的小区 
                gsmCells[i].Cell = trancs[i].Cells[0];
                //设置载波的发射功率
                gsmCells[i].NeTRX.TRXPower = 46 - i;
                //将该载波同小区的载波加入到其干扰载波中
                foreach (IACell acell in trancs[i].Cells)
                {
                    if (acell != gsmCells[i].Cell)
                    {
                        ISimCellBase tempCell = new GSMSimTRX(acell);
                        tempCell.Parent = trancs[i];
                        tempCell.Cell = acell;
                        //为干扰载波设置不同的发射功率
                        ((GSMSimTRX)tempCell).NeTRX.TRXPower = 44 + j;
                        j++;
                        interfCell.Add(tempCell);
                    }
                }

                //在加入其它小区的载波
                Transceiver tranc2 = GSMMock.MockTranceiver();
                foreach (IACell acell in tranc2.Cells)
                {
                    ISimCellBase tempCell = new GSMSimTRX(acell);
                    tempCell.Cell = acell;
                    tempCell.Parent = tranc2;
                    //为干扰载波设置不同的发射功率
                    ((GSMSimTRX)tempCell).NeTRX.TRXPower = 40 + j;
                    j++;
                    interfCell.Add(tempCell);
                }
                gsmCells[i].GSMInterCell = interfCell;
            }
            #endregion

            linkLossProvider = new MockIGetLinkloss();
            bestServer = new BestServer();
        }
Exemplo n.º 20
0
 /// <summary>
 ///  损耗计算接口赋值
 /// </summary>
 /// <param name="gsmLinkLoss"></param>
 public TotalLossCalc(IGetLinkloss gsmLinkLoss)
 {
     m_GetLinkLoss = gsmLinkLoss;
 }
Exemplo n.º 21
0
 public TCHCIR(IGetLinkloss gsmLinkLoss, InterfCalcPara interfPara, IInterfCalc interfCalc)
 {
     m_GetLinkLoss = gsmLinkLoss;
     m_InterfPara = interfPara;
     m_InterfCalc = interfCalc;
 }