Example #1
0
        public void SelectCandidateList_Test2()
        {
            TDSimUser user1;
            user1 = MockTDSimUser.CreatTDSimUser_CS();
            List<float> Ecio = new List<float>();
            Ecio.Add(1.0f);
            Ecio.Add(2.0f);
            Ecio.Add(3.0f);
            Ecio.Add(4.0f);
            user1.Ecios = Ecio;

            //TDHSDPABearerCollection bearerCollection1 = new TDHSDPABearerCollection();
            TDHSDPABearer bearer1 = new TDHSDPABearer();
            TDHSDPABearer bearer2 = new TDHSDPABearer();
            //bearerCollection1.BearerList.Add(bearer1);
            //bearerCollection1.BearerList.Add(bearer2);

            //TDHSDPABearerCollection bearerCollection2 = new TDHSDPABearerCollection();
            //List<TDHSDPABearerCollection> bearerCollectionList = new List<TDHSDPABearerCollection>();
            //bearerCollectionList.Add(bearerCollection1);
            //bearerCollectionList.Add(bearerCollection2);
            List<TDHSDPABearer> bearerList = new List<TDHSDPABearer>();
            bearerList.Add(bearer1);
            bearerList.Add(bearer2);
            IGetLinkloss linkLoss = null;
            m_Amc.Initialization(bearerList, linkLoss);

            m_Amc.SelectCandidateList(user1);
            Assert.AreEqual(user1.HSDPABearerCandidateList.Count,2);
        }
Example #2
0
 public void CopyFrom(TDHSDPABearer copyObj)
 {
     base.Technology = copyObj.Technology;
     this.m_BearerIndex = copyObj.m_BearerIndex;
     this.m_CI = copyObj.m_CI;
     this.m_MaxUserGrade = copyObj.m_MaxUserGrade;
     this.m_MinUserGrade = copyObj.m_MinUserGrade;
     this.m_Modulation = copyObj.Modulation;
     this.m_RTBS = copyObj.m_RTBS;
 }
Example #3
0
 public TDHSDPABearerDesc(TrafficCollectionModel trafficModel, TDHSDPABearer bearer)
 {
     this.m_TrafficModel = trafficModel;
     this.m_HSDPABearerManager = trafficModel.tdHSDPABearerManagement;
     this.m_Entity = bearer;
 }
Example #4
0
 public void Convert_BlockSizeInTTI_To_DataSpeed_Test()
 {
     TDHSDPABearer bearer = new TDHSDPABearer();
     bearer.RTBS = 10;
     Assert.AreEqual((int)(HSDPAConvertor.Convert_BlockSizeInTTI_To_DataSpeed(bearer)), 2000);
 }
Example #5
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);
        }