Beispiel #1
0
        private void UserMobilityReader(int index,UserMobilityBinding umb, bool isFixure)
        {
            int i, count;
            UserProfile u = new UserProfile();
            u.CopyFrom(umb.m_UserProfile);
            count = u.ServiceDemand.Count;
            if (index == 0)
            {
                for (i = 0; i < count; i++)
                {
                    foreach (ServiceUsage usage in u.ServiceDemand)
                    {
                        if (usage.Service.Name.Substring(0, 3) != "FDD")
                        {
                            u.ServiceDemand.Remove(usage);
                            break;
                        }
                    }
                }

            }
            else if (index == 1)
            {
                for (i = 0; i < count; i++)
                {
                    foreach (ServiceUsage usage in u.ServiceDemand)
                    {
                        if (usage.Service.Name.Substring(0, 3) != "TDD")
                        {
                            u.ServiceDemand.Remove(usage);
                            break;
                        }
                    }
                }
            }
            else
            {
                for (i = 0; i < count; i++)
                {
                    foreach (ServiceUsage usage in u.ServiceDemand)
                    {
                        if (usage.Service.Name.Substring(0, 2) != "E-")
                        {
                            u.ServiceDemand.Remove(usage);
                            break;
                        }
                    }
                }
            }
           

            PolygonUserCalculator calculator = new PolygonUserCalculator(this.m_Poly, umb.Density, this.m_ScalingFactor, !isFixure);
            foreach (ServiceUsage usage in u.ServiceDemand)
            {
                UserNumber number = calculator.CalculateUserPerService(usage);
                this.UserObjectGen(umb, usage, LinkType.Uplink, number.ULUsersNumber);
                this.UserObjectGen(umb, usage, LinkType.Downlink, number.DLUsersNumber);
            }
        }
Beispiel #2
0
 private void UserMobilityReader(UserMobilityBinding umb, bool isFixure)
 {          
     PolygonUserCalculator calculator = new PolygonUserCalculator(this.m_Poly, umb.Density, this.m_ScalingFactor, !isFixure);
     foreach (ServiceUsage usage in umb.UserProfile.ServiceDemand)
     {
         UserNumber number = calculator.CalculateUserPerService(usage);
         this.UserObjectGen(umb, usage, LinkType.Uplink, number.ULUsersNumber);
         this.UserObjectGen(umb, usage, LinkType.Downlink, number.DLUsersNumber);
     }
 }