Esempio n. 1
0
 /// <summary>
 /// 得到相应的邻小区
 /// </summary>
 /// <param name="ngbRelation"></param>
 /// <param name="allSimulationCarrierlist"></param>
 /// <returns></returns>
 private ISimulationCarrier FindCarrierInList(IANeighbours ngbRelation, List<ISimulationCarrier> allSimulationCarrierlist)
 {
     foreach (ISimulationCarrier carrier in allSimulationCarrierlist)
     {
         if (carrier.Carrier.ID == ngbRelation.NeighborId)
         {
             return carrier;
         }
     }
     return null;
 }
        public void LoadBalancingProcess_Test1()
        {
            List<IANeighbours> intraNeighbours = new List<IANeighbours>();
            List<IANeighbours> interNeighbours = new List<IANeighbours>();
            IANeighbours IAneighbours = new IANeighbours();
            intraNeighbours.Add(IAneighbours);
            interNeighbours.Add(IAneighbours);
            m_AdmissionCarrier.Carrier.InterNeighbours = interNeighbours;
            m_AdCarrier1.Carrier.InterNeighbours = interNeighbours;
            m_AdCarrier2.Carrier.InterNeighbours = interNeighbours;
            m_AdmissionCarrier.Carrier.IntraNeighbours = intraNeighbours;
            m_AdCarrier1.Carrier.IntraNeighbours = intraNeighbours;
            m_AdCarrier2.Carrier.IntraNeighbours = intraNeighbours;
            
            SimulationCarrier carrier = m_AdmissionCarrier as SimulationCarrier;
            m_NgbList.Add(m_AdCarrier1);
            IAdmissionCarrier iAdmissionCarrier = m_AdCarrier1 as IAdmissionCarrier;
            AdmissionCellTag admissionCarrierTag = iAdmissionCarrier.AdmissionCarrierTag as AdmissionCellTag;
            carrier.DlActualLoad = 5000;

            m_DLLB.LoadBalanceingProcess(m_AdmissionCarrier, m_NgbList);
            Assert.AreEqual(m_NgbList.Count, 1);
        }