Пример #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="context"></param>
 public TDIntefCalculate(TDCalcCommonParam param)
 {
     m_TotalLoss = new TDLinkLossCalc(param.CalcLinkLoss);
     m_SmartAnt = new SmartAntGain(param.SmartAntGain);
     //m_IntefCalc = new InterfCalculate(param.IntefParam);
     m_CustomerParam = param.TdUIParam;
     m_IntefCalc = param.InterfCalc;
 }
Пример #2
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);
 }
Пример #3
0
 public void MyTestInitialize()
 {
     m_Param = new TDCalcCommonParam();
     TDUIParam tdUIParam = null;
     tdUIParam = new TDUIParam();
     m_Param.TdUIParam = tdUIParam;
     TDSnapResultParam SnapResultParam = null;
     SnapResultParam = new TDSnapResultParam();
     m_Param.SnapResultParam = SnapResultParam;
 }
Пример #4
0
 public void initial()
 {
     m_Param = new TDCalcCommonParam();
     m_Cells = new List<TDSimCell>();
     m_PreCells = new List<TDSimCell>();
     m_Cell = MockTDSimCell.CreatTDSimCell();
     m_Cells.Add(m_Cell);
     m_PreCells.Add(m_Cell);
     m_Param.R4Cells = m_Cells;
     m_Param.PreSimCells = m_PreCells;
     m_Reset = new ResetCellResource();
 }
Пример #5
0
 public void R4_ConvergenceJuge_Excute_Test4()
 {
     m_Param.TdUIParam.IsThroughputConv = true;
     m_Param.TdUIParam.PowerLimit = 0;
     m_Param.TdUIParam.ThroughLimit = 0;
     m_Param.TdUIParam.AveConvCoef = 1;
     m_Param.TdUIParam.DevConvCoef = 25;
     m_R4_ConvergenceJuge = new R4_ConvergenceJuge(m_Param);
     m_tdCells = MockTDSimCellList.CreatTDSimCellList();
     m_Param = m_R4_ConvergenceJuge.Param;
     bool actual = m_R4_ConvergenceJuge.Excute(2, m_tdCells);
     Assert.AreEqual(true, actual);
 }
Пример #6
0
        public void HARQ_Test()
        {
            IGetLinkloss linkloss = new MockIGetLinkloss();
            ICalcInterfere interfere = null;
            TDCalcCommonParam param = new TDCalcCommonParam();
            TDLinkLossCalc TDLinkLoss = new TDLinkLossCalc(linkloss);
            ISimUser simUser = new MockISimUserBase();
            ISimCellBase cellBase = new MockISimCellBase();
            TDLinkLoss.GetDLTotalLoss(simUser, cellBase);

            HSDPABearerManagement retainGain = new HSDPABearerManagement(NetWorkType.TDSCDMA);
            HARQ m_Harq = new HARQ(interfere, linkloss, retainGain);
            m_Harq.CalcInterfere = new MockICalcInterfere();
            TimeSlot slot1 = new TimeSlot();
            TimeSlot slot2 = new TimeSlot();
            List<TDSimCell> cellList = new List<TDSimCell>();
            TDSimCell cell1;
            cell1 = MockTDSimCell.CreatTDSimCell();
            //cell1.NeCell = new TDSCDMACarrier();
            TDSimCell cell2;
            cell2 = MockTDSimCell.CreatTDSimCell();
            //cell2.NeCell = new TDSCDMACarrier();

            TDSimUser user1;
            user1 = MockTDSimUser.CreatTDSimUser_CS();
            TDSimUser user2;
            user2 = MockTDSimUser.CreatTDSimUser_CS();
            user2.IsHSDPARetransmited = true;
            user2.HSDPARetransCount = 1;
            TDSimUser user3;
            user3 = MockTDSimUser.CreatTDSimUser_CS();
            user3.IsHSDPARetransmited = true;
            user3.HSDPARetransCount = 2;
            slot1.HSDPAScheduledUsers.Add(user1);
            slot2.HSDPAScheduledUsers.Add(user2);
            slot2.HSDPAScheduledUsers.Add(user3);


            cell1.HSDPATimeslot.Add(slot1);
            cell1.HSDPATimeslot.Add(slot2);

            cellList.Add(cell1);
            cellList.Add(cell2);


            m_Harq.Run(cellList);

            Assert.AreEqual(cellList[0].HSDPAAccessedUsers.Count, 0);

        }
Пример #7
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);
 }
 public void initial()
 {
     user=MockTDSimUser.CreatTDSimUser_CSDL();
     m_AccessUsers = new List<TDSimUser>();
     m_PreUsers = new List<TDSimUser>();
     m_UnAccessUsers = new List<TDSimUser>();
     m_Param = new TDCalcCommonParam();
     m_AccessUsers.Add(user);
     m_PreUsers.Add(user);
     m_UnAccessUsers.Add(user);
     m_Param.R4AccessUsers=m_AccessUsers;
     m_Param.R4PreUsers=m_PreUsers;
     m_Param.R4UnAccessUsers=m_UnAccessUsers;
     m_Update=new UpdateDataForOneIteration(m_Param);
 }
Пример #9
0
        public void Initial()
        {
            m_Param = new TDCalcCommonParam();
            m_Param.CalcLinkLoss = new MockTDLinkLossCalc();
            m_Param.SmartAntGain = new MockSmartAntCalcGain();

            m_User = MockTDSimUser.CreatTDSimUser_CSDL();

            m_Cell = MockTDSimCell.CreatTDSimCell();
            m_Cell.IsMainCarrier = true;
            m_CellList = new List<TDSimCell>();
            m_CellList.Add(m_Cell);
            m_ActiveCellConfirm = new ActiveCellConfirm(m_CellList);

            m_ActiveCellConfirm.CommonParam = m_Param;
        }
Пример #10
0
        public void MyTestInitialize()
        {
            m_SimUser1=MockTDSimUser.CreatTDSimUser_CSDL();
            m_SimUser2 = MockTDSimUser.CreatTDSimUser_CSUL();
            m_IntefUser = MockTDSimUser.CreatTDSimUser_PSDL();
            m_Param = new TDCalcCommonParam();
            m_Param.SmartAntGain = new MockSmartAntCalcGain();
            m_Cell = MockTDSimCell.CreatTDSimCell();
            m_User = MockTDSimUser.CreatUser_CSDL();
            m_SmartAntGain = new SmartAntGain(m_Param.SmartAntGain);

            //LinkLossAssist.Init();
            //m_TDCalcCommonParam = new TDCalcCommonParam();
            //m_TDCalcCommonParam.SmartAntGain = new MockSmartAntCalcGain();
            //m_TDSimUser = MockTDSimUser.CreatTDSimUser_CS();
            //m_IntefUser = MockTDSimUser.CreatTDSimUser_PS();
            //m_TDSimCell = MockTDSimCell.CreatTDSimCell();
            //m_SmartAntGain = new SmartAntGain(m_TDCalcCommonParam.SmartAntGain);
        }
Пример #11
0
 public void Excute(TDCalcCommonParam param)
 {
     param.R4Cells.Clear();
     foreach (TDSimCell cell in param.PreSimCells)
     {
         if (cell.CarrType == CarrierTypeOfTD.R4 || cell.CarrType == CarrierTypeOfTD.R4AndHSDPA || cell.CarrType == CarrierTypeOfTD.R4AndHSPA)
         {
             param.R4Cells.Add(cell);
         }
     }
     param.PreSimCells.Clear();
     if (0 != param.R4Cells.Count)
     {
         foreach (TDSimCell cell in param.R4Cells)
         {
             cell.AccessedUsers.Clear();
             cell.ULSimUsers.Clear();
             cell.CurDlThrouAve = 0;
             cell.CurUlThrouAve = 0;
             cell.DlLoad = 0;
             cell.PreDlThrouAve = 0;
             cell.PreDlThrouDev = 0;
             cell.PreUlThrouAve = 0;
             cell.PreUlThrouDev = 0;
             cell.VirtulDLoad = 0;
             cell.VirtulULoad = 0;
             for (int index = 1; index < cell.Slots.Length; index++)
             {
                 if (index <= cell.SwitchPoint)
                 {
                     InitTransSlotParam(cell, index, cell.BackNoise_DB);
                     cell.ULTotalCodeNum += cell.Slots[index].AvailCodeNum;
                 }
                 else
                 {
                     InitTransSlotParam(cell, index, float.NegativeInfinity);
                     cell.DLTotalCodeNum += cell.Slots[index].AvailCodeNum;
                 }
             }
         }
     }
 }
Пример #12
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="param"></param>
 public R4_InitPower(TDCalcCommonParam param)
 {
     m_LossCalc = new TDLinkLossCalc(param.CalcLinkLoss);
     m_SmartGain = new SmartAntGain(param.SmartAntGain);
     m_PreUsers = param.R4PreUsers;
 }
Пример #13
0
 public FindBestRSCPCell(TDCalcCommonParam param)
 {
     m_Param = param;
     m_SmartAntGainCalc = new SmartAntGain(param.SmartAntGain);
 }
Пример #14
0
        public void Run_Test()
        {
            HSDPASimulization simulization = new HSDPASimulization();
            TDIterationBase tdIterationBase = new TDIteration();

            SnapshotContext context = new SnapshotContext();
            List<Transceiver> trans = new List<Transceiver>();
            TDSimCellCollection cellCollection = new TDSimCellCollection();

            TDSimCell cell;
            cell = MockTDSimCell.CreatTDSimCell();

            simulization.AccessControl = new Access();
            simulization.SimulizeTTICount = 50;

            IGetLinkloss linkloss = new MockIGetLinkloss();
            ICalcInterfere interfere = null;
            TDCalcCommonParam param = new TDCalcCommonParam();
            TDLinkLossCalc TDLinkLoss = new TDLinkLossCalc(linkloss);
            ISimUser simUser = new MockISimUserBase();
            ISimCellBase cellBase = new MockISimCellBase();
            TDLinkLoss.GetDLTotalLoss(simUser, cellBase);
            HSDPABearerManagement retainGain = new HSDPABearerManagement(NetWorkType.TDSCDMA);
            HARQ m_Harq = new HARQ(interfere, linkloss, retainGain);
            simulization.HarqArithmetic = new HARQ(interfere, linkloss, retainGain);
            simulization.HarqArithmetic.CalcInterfere = new MockICalcInterfere();

            SortUser sortUserTool = new SortUser();
            ICalcInterfere cInterfere = new MockICalcInterfere();
            TDCalcCommonParam m_CommonParam = new TDCalcCommonParam();
            List<TDHSDPABearer> bearerList = new List<TDHSDPABearer>();
            TDHSDPABearer bearer1 = new TDHSDPABearer();
            TDHSDPABearer bearer2 = new TDHSDPABearer();
            bearer1.RTBS = 50;
            bearer2.RTBS = 50;
            bearer2.CI = 2d;
            bearerList.Add(bearer1);
            bearerList.Add(bearer2);
            m_CommonParam.CalcLinkLoss = new MockIGetLinkloss();
            simulization.ResourceSchedule = new ResourceSchedule(sortUserTool, cInterfere, m_CommonParam, bearerList);
            simulization.SortUserTool = new SortUser();

            TDSimCell cell1;
            cell1 = MockTDSimCell.CreatTDSimCell();
            TDSimCell cell2;
            cell2 = MockTDSimCell.CreatTDSimCell();
            TDSimUser user3;
            user3 = MockTDSimUser.CreatTDSimUser_CS();
            TDSimUser user4;
            user4 = MockTDSimUser.CreatTDSimUser_CS();
            TDSimUser user1;
            user1 = MockTDSimUser.CreatTDSimUser_CS();
            user1.HSDPAThrowput = 100f;
            user1.IsHSDPARetransmited = true;
            TDSimUser user2;
            user2 = MockTDSimUser.CreatTDSimUser_PS();
            user2.HSDPAThrowput = 200f;
            cell2.HSDPAServedUserList.Add(user3);
            cell2.HSDPAServedUserList.Add(user4);
            cell2.HSDPAServedUserCount = 2;
            cell1.HSDPATimeslot[0].HSDPAScheduledUsers.Add(user1);
            cell1.HSDPATimeslot[0].HSDPAScheduledUsers.Add(user2);
            cell1.HSDPAAccessedUsers.Add(user1);
            cell1.HSDPAAccessedUsers.Add(user2);
            List<TDSimCell> cellList = new List<TDSimCell>();
            cellList.Add(cell1);
            cellList.Add(cell2);
            List<TDSimUser> userList = new List<TDSimUser>();
            userList.Add(user1);
            userList.Add(user2);
            simulization.TimeSlotSimulization = new TimeSlotSim(cellList, userList);

            cellCollection.TDCells.Add(cell1);
            cellCollection.TDCells.Add(cell2);

            context.AddKey(ContextKeys.TranceiverList, trans);
            context.AddKey(ContextKeys.TDSimCellCollection, cellCollection);

            simulization.InitCells(context);
            simulization.SimResultReport();

            DPAResult dpaResult =(DPAResult)simulization.Run();
            Assert.AreEqual(dpaResult.CellResult.Count, 2);
        }