Exemple #1
0
 public void CopyFrom(UnionPsService unionPsService)
 {
     this.m_BodyLoss = unionPsService.BodyLoss;
     this.m_DlActivity = unionPsService.DlActivity;
     this.m_DlAveThroughputDemand = unionPsService.DlAveThroughputDemand;
     this.m_DlMaxThroughputDemand = unionPsService.DlMaxThroughputDemand;
     this.m_DlMinThroughputDemand = unionPsService.DlMinThroughputDemand;
     this.m_DlTxEff = unionPsService.DlTxEff;
     this.UlOffset = unionPsService.UlOffset;
     this.DlOffset = unionPsService.DlOffset;
     this.m_Name = unionPsService.Name;
     this.UlAMRRate = unionPsService.UlAMRRate;
     this.DlAMRRate = unionPsService.DlAMRRate;
     this.m_PSServiceDic.Clear();
     foreach (KeyValuePair<NetWorkType, Service> pair in unionPsService.PSServiceDic)
     {
         this.m_PSServiceDic.Add(pair.Key, pair.Value);
     }
     this.m_Technology = unionPsService.Technology;
     this.m_Type = unionPsService.Type;
     this.m_UlActivity = unionPsService.UlActivity;
     this.m_UlAveThroughputDemand = unionPsService.UlAveThroughputDemand;
     this.m_UlMaxThroughputDemand = unionPsService.UlMaxThroughputDemand;
     this.m_UlMinThroughputDemand = unionPsService.UlMinThroughputDemand;
     this.m_UlTxEff = unionPsService.UlTxEff;
 }
Exemple #2
0
        //构造使用PS业务的用户
        public static User CreateUser_PS()
        {
            Mobility mobility = new Mobility("mobility", 30);
            int Priority = 1;
            #region 业务参数
            UnionPsService unionPsService = new UnionPsService();
            Dictionary<NetWorkType, Service> PSServiceDic = new Dictionary<NetWorkType, Service>();
            UMTSPsService umtsPsService = new UMTSPsService();
            umtsPsService.UmtsR99Bearer = new UMTSR99Bearer();
            PSServiceDic.Add(NetWorkType.UMTS, umtsPsService);
            unionPsService.PSServiceDic = PSServiceDic;
            #endregion

            #region 终端参数
            Terminal terminal = new Terminal();
            List<NetworkTerminal> NetterminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            NetterminalList.Add(tempTerminal);
            terminal.NetTerminalList = NetterminalList;
            User user = new User(mobility, unionPsService, terminal, LinkType.Uplink, Priority);
            return user;
            #endregion
        }
Exemple #3
0
        public void Init()
        {
            ProjectSingleton.CurrentProject = MockProject.Instance;
            ProjectSingleton.CurrentProject.AppContext.RegisterService(new MockPLCalcDataVstr());
            ProjectSingleton.CurrentProject.AppContext.RegisterService(new MockGeoProvider());
            List<User> m_UserList = new List<User>();

            List<IACell> m_CellList = new List<IACell>();

            Service Ser1 = new UnionPsService();
            Terminal Ter1 = new Terminal();
            User user1 = new User();
            user1.Id = 1;
            user1.X = 100;
            user1.Y = 100;
            user1.Service = Ser1;
            user1.Terminal = Ter1;
            User user2 = new User();
            user2.Id = 2;
            user2.X = 100;
            user2.Y = 100;
            user2.Service = Ser1;
            user2.Terminal = Ter1;
            m_UserList.Add(user1);
            m_UserList.Add(user2);

            IACell cell1;
            IACell cell2;
            InitCell(out cell1, out cell2);
            m_CellList.Add(cell1);
            m_CellList.Add(cell2);
            ICalcGain calcGain = new MockCalcGain();
            m_LinkLossGet = new LinkLossGet(m_UserList, m_CellList, calcGain, ProjectSingleton.CurrentProject.AppContext,75);
            
        }
Exemple #4
0
        public void Init()
        {           
            matrix = new TrueFalseMatrix(10, 10, 0.0, 10.0, 1, true);
            cell = new MockCell();
            termianl = new Terminal();
            //termianl.Gain = 3f;
            CsService = new UnionCsService();
            CsService.BodyLoss = 5f;
            PsService = new UnionPsService();
            PsService.BodyLoss = 5f;

            AntConfig1 = new AntConfig();
            AntConfig1.IsMainAnt = true;
            AntConfig1.DlTotalLoss = 6f;
            AntConfig1.IsUserInput = false;
            AntConfig1.Feeder = new FeederEquipment();

            tran = new Transceiver();
            site = new Site();
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 4f;
            site.X = 1;
            site.Y = 1;

            tran.Parent = site;
            tran.addAntConfig(AntConfig1);

            cell.Parent = tran;

            LinkLossAssist.Init();
        }
Exemple #5
0
 public object Clone()
 {
     UnionPsService service = new UnionPsService();
     service.DlActivity = this.DlActivity;
     service.DlAveThroughputDemand = this.DlAveThroughputDemand;
     service.DlMaxThroughputDemand = this.DlMaxThroughputDemand;
     service.DlMinThroughputDemand = this.DlMinThroughputDemand;
     service.DlTxEff = this.DlTxEff;
     service.Name = this.Name;
     service.Technology = this.Technology;
     service.Type = this.Type;
     service.UlActivity = this.UlActivity;
     service.UlAveThroughputDemand = this.UlAveThroughputDemand;
     service.UlMaxThroughputDemand = this.UlMaxThroughputDemand;
     service.UlMinThroughputDemand = this.UlMinThroughputDemand;
     service.UlTxEff = this.UlTxEff;
     service.BodyLoss = this.BodyLoss;
     service.DlOffset = this.DlOffset;
     service.UlOffset = this.UlOffset;
     if (this.PSServiceDic != null)
     {
         service.PSServiceDic = this.PSServiceDic;
     }
     return service;
 }
Exemple #6
0
 public PsServiceDesc(UnionPsServiceManagement management, UnionPsService service, List<UnionPsService> excludeService) : this(management, service)
 {
     this.m_NewNames = new List<string>();
     foreach (UnionPsService service2 in excludeService)
     {
         this.m_NewNames.Add(service2.Name);
     }
 }
Exemple #7
0
 public bool CheckPServiceDataAndCommitData(UnionPsService unionPsService, string modServiceName, string change, ref string info)
 {
     if (!this.IsPsServicePropertyValid(unionPsService, modServiceName, change, ref info))
     {
         return false;
     }
     this.CommitPsData(unionPsService, change);
     return true;
 }
Exemple #8
0
 public ServiceControl(Service service, TrafficCollectionModel model, FormOpenType formOpenType)
 {
     this.m_UnionPsService = service as Huawei.UNet.Traffic.Interface.UnionPsService;
     this.m_Model = model;
     this.InitManagement();
     if (formOpenType == FormOpenType.New)
     {
         this.InitService();
     }
     this.m_LTEService = this.m_UnionPsService.PSServiceDic[NetWorkType.LTE] as Huawei.UNet.Traffic.LTEModel.LTEService;
 }
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "HSUPAPeakThroughCase";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new HSUPAPeakThroughCase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            #region group 业务 终端
            group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            group.UIParam.SpatialDivFactor = 0;
            group.UIParam.MaxSpatialDivFactor = 0;
            UnionPsService psService = new UnionPsService();
            UMTSService umtsService = new UMTSService();
            psService.PSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.PsService = psService;
            umtsService.EnableHsupa = true;

            group.TrafficTerminal = new Terminal();
            List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.NetType = NetWorkType.UMTS;
            tempTerminal.EnableHsupa = true;
            terminalList.Add(tempTerminal);
            group.TrafficTerminal.NetTerminalList = terminalList;
            #endregion

            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string absolutePathEPDSCHEcNt = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsEPDSCHEcNt);
            string relativePathEPDSCHEcNt = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsEPDSCHEcNt);
            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            ShortResultStruct srsCir = ShortResultStruct.DefaultMin;
            ShortResultStruct srsEPDSCH = ShortResultStruct.DefaultMin;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);
            m_EPDSCHEcNt = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathEPDSCHEcNt, relativePathEPDSCHEcNt, srsEPDSCH);
            m_BestServerID[0] = 0;

            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.UmtsBestServerCellID, m_BestServerID);
            m_Context.Add(ContextKeys.CellList, cellList);
            m_Context.Add(ContextKeys.UmtsEPDSCHEcNt, m_EPDSCHEcNt);
            m_Case.Name = m_Name;

        }
 public void CalculateUpLinkDetail_Test1()
 {
     Service psService = new UnionPsService();
     psService.CommonType = CommonServiceType.PSService;
     GSMService gsmService = new GSMService();
     ((UnionPsService)psService).PSServiceDic.Add(NetWorkType.GSM, gsmService);
     Mobility mobility = new Mobility();
     Terminal terminal = new Terminal();
     GSMTerminal gsmTerminal = new GSMTerminal();
     gsmTerminal.NetType = NetWorkType.GSM;
     terminal.NetTerminalList.Add(gsmTerminal);
     IDetail detail = m_GSMCellCalculator.CalculateUpLinkDetail(m_ModelList, m_Point, psService, terminal, mobility);
 }
Exemple #11
0
 public void CommitData(Huawei.UNet.Traffic.Interface.UnionPsService unionPsService, string oldName, string change)
 {
     if (change == this.ADDSTRING)
     {
         this.m_UnionPsManagement.AddUnionPsService(this, unionPsService);
         this.m_UnionPsService = unionPsService;
     }
     else if (change == this.MODIFYSTRING)
     {
         unionPsService.ID = this.m_UnionPsService.ID;
         this.m_UnionPsManagement.ModifyUnionPsService(this, unionPsService);
     }
 }
Exemple #12
0
 public void CommitPsData(UnionPsService unionPsService, string change)
 {
     if (change == this.ADDSTRING)
     {
         this.m_UnionPsManagement.AddUnionPsService(this, unionPsService);
         this.m_OldName = unionPsService.Name;
     }
     else
     {
         unionPsService.ID = this.m_UnionPsManagement.FindUnionPsServiceByName(this.m_OldName).ID;
         this.m_UnionPsManagement.ModifyUnionPsService(this, unionPsService);
         this.m_OldName = unionPsService.Name;
     }
 }
 [Test]  //测试clone
 public void Clonetest()
 {
     UMTSPredictionGroup group = InitialGroup();
     group.TrafficTerminal = new Terminal();
     UnionCsService csService = new UnionCsService();
     Service umtsCSService = new UMTSService();
     csService.CSServiceDic.Add(NetWorkType.UMTS, umtsCSService);
     group.CsService = csService;
     UnionPsService psService = new UnionPsService();
     Service umtsPSService = new UMTSService();
     psService.PSServiceDic.Add(NetWorkType.UMTS, umtsPSService);
     group.PsService = psService;
     group.TrafficMobility = new Mobility();
     Assert.AreEqual(group.GroupId, group.Clone().GroupId);
     Assert.AreEqual(group.HandoverAreaThreshold, group.Clone().HandoverAreaThreshold);
     Assert.AreEqual(group.InterferenceGate, group.Clone().InterferenceGate);
 }
        public void MyTestInitialize()
        {
            m_SatisificationCalculate = new SatisficationCalculate(m_currentTTI, m_sfCalTh);
            m_sfCalTh = new SatisficationThParam();
            m_VoiceUserList = new List<ISimulationUser>();
            m_UserList = new List<ISimulationUser>();
            m_VoiceUser = new SimulationUser();
            m_GBRUserList = new List<ISimulationUser>();
            m_DataUserList = new List<ISimulationUser>();
            m_NonGBRUserList = new List<ISimulationUser>();
            m_User = new SimulationUser();
            Service serv = new UnionPsService();
            m_User.LTEUser = new User();

            SimulationUser user1 = new SimulationUser();
            SimulationUser user2 = new SimulationUser();

            m_GBRUserList.Add(user1);
            m_GBRUserList.Add(user2);
            m_UserList.Add(m_User);
            m_DataUserList.Add(m_User);
            m_VoiceUserList.Add(m_User);

            m_User.AdmissionUserTag = new AdmissionControlUserTag();
            AdmissionControlUserTag tag2 = m_User.AdmissionUserTag as AdmissionControlUserTag;

            m_User.LTEUser.Service = serv;
            m_User.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            NetworkTerminal networkTerminal = new NetworkTerminal();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());


            m_UlMinThroughputDemand = new UnionPsService();
            m_UlTxEff = new UnionPsService();
            m_UlOffset = new UnionPsService();

            
            
            
        }
 [Test]  //测试clone的studyList
 public void Clonetest_study()
 {
     UMTSPredictionGroup group = InitialGroup();
     group.TrafficTerminal = new Terminal();
     UnionCsService csService = new UnionCsService();
     Service umtsCSService = new UMTSService();
     csService.CSServiceDic.Add(NetWorkType.UMTS, umtsCSService);
     group.CsService = csService;
     UnionPsService psService = new UnionPsService();
     Service umtsPSService = new UMTSService();
     psService.PSServiceDic.Add(NetWorkType.UMTS, umtsPSService);
     group.PsService = psService;
     group.TrafficMobility = new Mobility();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Clone();
     study2.Clone();
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(group.StudyList[0].Clone().Name, group.Clone().StudyList[0].Clone().Name);
 }
Exemple #16
0
 //构造使用PS业务的用户
 public static User CreatUser_PS()
 {
     Mobility mobility = new Mobility("mobility", 30);
     //构造业务参数
     UnionPsService unionPsService = new UnionPsService();
     Dictionary<NetWorkType, Service> PSServiceDic = new Dictionary<NetWorkType, Service>();
     TDPsService tdPsService = new TDPsService();
     tdPsService.TDR99Bearer = new TDR99Bearer();
     PSServiceDic.Add(NetWorkType.TDSCDMA, tdPsService);
     unionPsService.PSServiceDic = PSServiceDic;
     //构造终端参数
     Terminal terminal = new Terminal();
     List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
     TDTerminal tempTerminal = new TDTerminal();
     tempTerminal.NoiseFigure = 2;
     tempTerminal.NetType = NetWorkType.TDSCDMA;
     tempTerminal.MinTxPower = 24;
     tempTerminal.MaxTxPower = 36;
     terminalList.Add(tempTerminal);
     terminal.NetTerminalList = terminalList;
     User user = new User(mobility, unionPsService, terminal, LinkType.Uplink, 1);
     user.Id = 1;
     return user;
 }
Exemple #17
0
 private Service GenAndInitPSService()
 {
     UnionPsService service = new UnionPsService();
     service.UlMaxThroughputDemand = 100f;
     service.DlMaxThroughputDemand = 100f;
     service.UlMinThroughputDemand = 12.2f;
     service.DlMinThroughputDemand = 12.2f;
     service.UlAveThroughputDemand = 64f;
     service.DlAveThroughputDemand = 64f;
     service.UlTxEff = 0.95f;
     service.DlTxEff = 0.95f;
     return service;
 }
 private void ModifyServiceToCollection(object sender, string oldName, string newName)
 {
     Service serviceByName = this.GetServiceByName(oldName);
     if (serviceByName.CommonType == CommonServiceType.CSService)
     {
         UnionCsService modService = new UnionCsService();
         modService.CopyFrom(serviceByName as UnionCsService);
         modService.ID = serviceByName.ID;
         modService.Name = newName;
         this.m_TrafficColModel.UnionCsServiceManagement.ModifyUnionCsService(sender, modService);
     }
     else
     {
         UnionPsService service3 = new UnionPsService();
         service3.CopyFrom(serviceByName as UnionPsService);
         service3.ID = serviceByName.ID;
         service3.Name = newName;
         this.m_TrafficColModel.UnionPsServiceManagement.ModifyUnionPsService(sender, service3);
     }
 }
Exemple #19
0
 public bool CheckPsServiceDataAndCommitData(UnionPsService service, string modelServiceName, string change, ref string info)
 {
     if (!IsPsServicePropertyValid(service, modelServiceName, change, ref info))
     {
         return false;
     }
     CommitPsData(service ,change );
     return true;
 }
Exemple #20
0
 private UnionPsService GeneratePsService()
 {
     UnionPsService service = new UnionPsService();
     service.DlAveThroughputDemand = (float) this.tbDlAveThroughput.Value;
     service.DlMaxThroughputDemand = (float) this.tbDlMaxThroughput.Value;
     service.DlMinThroughputDemand = (float) this.tbDlMinThroughput.Value;
     service.DlTxEff = (float) this.tbDlTxEff.Value;
     service.Name = this.GetServiceName();
     service.Technology = this.m_Type;
     service.Type = ServiceType.Data;
     service.UlAveThroughputDemand = (float) this.tbUlAveThroughput.Value;
     service.UlMaxThroughputDemand = (float) this.tbUlMaxThroughput.Value;
     service.UlMinThroughputDemand = (float) this.tbUlMinThroughput.Value;
     service.UlTxEff = (float) this.tbUlTxEff.Value;
     this.AddSingleServiceToUnionService(service.PSServiceDic, this.cmbGsm);
     this.AddSingleServiceToUnionService(service.PSServiceDic, this.cmbTd);
     this.AddSingleServiceToUnionService(service.PSServiceDic, this.cmbUmts);
     this.AddSingleServiceToUnionService(service.PSServiceDic, this.cmbLte);
     return service;
 }
Exemple #21
0
 private void CommitPsData(UnionPsService service, string change)
 {
     if (change == ADDSTRING)
     {
         m_UnionPsServiceManagement.AddUnionPsService(this, service);
         m_OldName = service.Name;
     }
     else
     {
         service.ID = m_UnionPsServiceManagement.FindUnionPsServiceByName(service.Name).ID;
         m_UnionPsServiceManagement.ModifyUnionPsService(this, service);
         m_OldName = service.Name;
     }
 }
Exemple #22
0
 public bool ValidateDr(DataRow dr, List<Service> excludeService, int validateId)
 {
     this.m_ValidateId = validateId;
     UnionPsService service = new UnionPsService();
     UnionCsService service2 = new UnionCsService();
     IExtractor ex = new DataRowExtractor(dr);
     if ((this.m_CsServiceManagement.FindUnionCsServiceById(validateId) != null) || (dr.ItemArray[1].ToString() == CommonServiceType.CSService.ToString()))
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service2);
     }
     else if ((this.m_PsServiceManagement.FindUnionPsServiceById(validateId) != null) || (dr.ItemArray[1].ToString() == CommonServiceType.PSService.ToString()))
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service);
     }
     else if (this.m_PsServiceManagement.FindUnionPsServiceById(validateId) == null)
     {
         this.m_ServiceDesc = new ServiceDesc(this.m_CsServiceManagement, this.m_PsServiceManagement, service);
     }
     return this.Validate(ref this.m_Info, this.m_ServiceDesc, ex, validateId);
 }
Exemple #23
0
 public PsServiceDesc(UnionPsServiceManagement management, UnionPsService service)
 {
     this.m_Management = management;
     this.m_Entity = service;
 }
Exemple #24
0
        public void MyTestInitialize()
        {
            m_Index = 0;
            m_Name = "EPDSCHEcNtCase";
            m_Context = new Huawei.UNet.Prediction.CalculateInterface.Context();
            m_Case = new EPDSCHEcNtCase();
            cellList = new List<IACell>();
            TrueFalseMatrix matrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true);
            LinkLossAssist.Init();

            group = new UMTSPredictionGroup();
            group.Region = MockRegion.CreateRegion();
            group.Name = "UMTSPredictionGroup";
            group.UIParam.ULRakeEffiFactor = 0.6f;
            group.UIParam.ULDivGain = 0;
            UnionPsService psService = new UnionPsService();
            UMTSService umtsService = new UMTSService();
            umtsService.UmtsR99Bearer = new UMTSR99Bearer();
            umtsService.UmtsR99Bearer.ULNominalRate = 3.4f;
            umtsService.UseHandoff = true;
            umtsService.EnableHsupa = true;

            psService.PSServiceDic.Add(NetWorkType.UMTS, umtsService);
            group.PsService = psService;
            group.TrafficTerminal = new Terminal();
            List<NetworkTerminal> terminalList = new List<NetworkTerminal>();
            UMTSTerminal tempTerminal = new UMTSTerminal();
            tempTerminal.NoiseFigure = 2;
            tempTerminal.EnableHsupa = true;
            tempTerminal.NetType = NetWorkType.UMTS;
            terminalList.Add(tempTerminal);
            group.TrafficTerminal.NetTerminalList = terminalList;

            IProjectManager projectMgr = ServiceHelper.Lookup<MockIProjectManager>(ProjectSingleton.CurrentProject.AppContext);
            string absolutePathID = ResultFilePath.CreateFilePath(projectMgr.CurrentProjectLossPath, group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            string relativePathID = ResultFilePath.CreateRelativePath(group.Name, group.Region.Name, ContextKeys.UmtsBestServerCellID);
            ShortResultStruct srsID = ShortResultStruct.DefaultMax;
            m_BestServerID = ValueMatrixAssist.GenerateByTrueFalseMatrix(matrix, absolutePathID, relativePathID, srsID);


            for (int i = 0; i < 2; i++)
            {
                IACell cell = new UMTSCell();
                UMTSCell umtsCell = cell as UMTSCell;
                umtsCell.CellType = CarrierTypeOfUMTS.HSUPA;
                cell.FreqBand.BandWidth = 3.84f;
                cellList.Add(cell);
            }
            double[] x = new double[2] { 50, 100 };
            double[] y = new double[2] { 50, 100 };
            MockCellList.CreateCellList(cellList, x, y);
            m_BinMapCellsDic = new Dictionary<int, List<short>>();

            m_Context.Add(ContextKeys.TFMatrix, matrix);
            m_Context.Add(ContextKeys.CellList, cellList);
            m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext);
            m_Context.Add(ContextKeys.UmtsBestServerCellID, m_BestServerID);
            m_Context.Add(ContextKeys.UmtsBinMapCellDic, m_BinMapCellsDic);

            m_Case.Name = m_Name;

        }
Exemple #25
0
 private void SetServiceData(UnionPsService unionPsService, LTEService lteservice, ServiceType serviceType, float ulActivity, float dlActivity)
 {
     lteservice.Type = serviceType;
     unionPsService.Type = serviceType;
     unionPsService.UlActivity = ulActivity;
     unionPsService.DlActivity = dlActivity;
 }
        public void MyTestInitialize()
        {
            m_DlHOService = new DlHandOverService(m_CurretTti,m_Sfth );
            m_ISourceCarrier = new SimulationCarrier();
            m_ITargetCarrier = new SimulationCarrier();
            m_NgbCaiirer = new SimulationCarrier();
            m_Carrier = new SimulationCarrier();
            m_User = new SimulationUser();
            m_User.LTEUser = new User();
            Service serv = new UnionPsService();
            m_User.LTEUser.Service = serv;
            m_NgbCarrierList = new List<ISimulationCarrier>();

            m_ISourceCarrier.AdmissionCarrierTag = new AdmissionCellTag();
            AdmissionCellTag adCellTag = m_ISourceCarrier.AdmissionCarrierTag as AdmissionCellTag;
            adCellTag.ULSourceOutThroughput = 100;
            m_Carrier.AdmissionCarrierTag = new AdmissionCellTag();


            m_NgbCaiirer.AdmissionCarrierTag = new AdmissionCellTag();
            AdmissionCellTag ngbCellTag = m_NgbCaiirer.AdmissionCarrierTag as AdmissionCellTag;
            ngbCellTag.ULTotalHOThroughput = 50;
            SimulationCarrier temp = m_NgbCaiirer as SimulationCarrier;
            temp.Carrier = new LTECell();

            m_LbUserList = new List<ISimulationUser>();
            SimulationUser user1 = new SimulationUser();
            SimulationUser user2 = new SimulationUser();

            m_LbUserList.Add(user1);
            m_LbUserList.Add(user2);
            m_NgbCarrierList.Add(m_NgbCaiirer);

            m_DlHOVoiceUserList = new List<ISimulationUser>();
            SimulationUser VUser1 = new SimulationUser();
            SimulationUser VUser2 = new SimulationUser();
            m_DlHOVoiceUserList.Add(VUser1);
            m_DlHOVoiceUserList.Add(VUser2);

            CarrierTotalLoss a=new CarrierTotalLoss ();
            
            SimulationCarrier carrier = new SimulationCarrier();
            carrier.IsLTECell = true;
            LTECell lteCell = new LTECell();
            lteCell.RSPower = 15f;
            carrier.Carrier = lteCell;
            CarrierTotalLoss b = new CarrierTotalLoss(carrier, 100f, 100f);
            //SimulationCarrier carrier1 = new SimulationCarrier();
            //b.Carrier = carrier1;
            List<CarrierTotalLoss> listCarrier = new List<CarrierTotalLoss>();
            listCarrier.Add(a);
            listCarrier.Add(b);
            a.Carrier = new SimulationCarrier();
            carrier.IsLTECell = false;
            RelayCell relayCell1 = new RelayCell();
            relayCell1.RSPower = 16f;
            a.Carrier.Carrier = relayCell1;
            b.Carrier = new SimulationCarrier();
            carrier.IsLTECell = false;
            RelayCell relayCell2 = new RelayCell();
            relayCell1.RSPower = 17f;
            b.Carrier.Carrier = relayCell2;
            m_User.BestServiceCellBeforeHandOver = a;
            m_User.StroNbrBeforeHandOver = b;
            user1.BestServiceCellBeforeHandOver = a;
            user1.StroNbrBeforeHandOver = b;
            user2.BestServiceCellBeforeHandOver = a;
            user2.StroNbrBeforeHandOver = b;

            

            user1.CarrierListInComputeArea = listCarrier.ToArray();
            user2.CarrierListInComputeArea = listCarrier.ToArray();
            m_User.CarrierListInComputeArea = listCarrier.ToArray();

            


            List<ISimulationUser> list = new List<ISimulationUser>();
            list.AddRange(m_LbUserList);

            RelayCell relaycarrier = new RelayCell();

            ((SimulationCarrier)m_NgbCaiirer).Carrier = relaycarrier;          
            ((SimulationCarrier)m_ISourceCarrier).Carrier = relaycarrier;
            ((SimulationCarrier)m_ITargetCarrier).Carrier = relaycarrier;
            
            user1.CarrierListInComputeArea[0].Carrier = carrier;
            user1.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            user2.CarrierListInComputeArea[0].Carrier = carrier;
            user2.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            m_User.CarrierListInComputeArea[0].Carrier = carrier;
            m_User.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier;
            user1.CarrierListInComputeArea[1].Carrier = carrier;
            user1.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            user2.CarrierListInComputeArea[1].Carrier = carrier;
            user2.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            m_User.CarrierListInComputeArea[1].Carrier = carrier;
            m_User.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier;
            //m_User.StroNbrBeforeHandOver.Carrier = carrier;
            relaycarrier.RSPower = 100;



            //m_User.StroNbrBeforeHandOver.Carrier = carrier;
            //m_User.BestServiceCellBeforeHandOver.Carrier = carrier;




            Huawei.UNet.Traffic.Map.Interface.User lteuser = new Huawei.UNet.Traffic.Map.Interface.User();
            user1.LTEUser = lteuser;
            user1.ID = 1;

            Huawei.UNet.Traffic.Interface.Terminal terminal = new Huawei.UNet.Traffic.Interface.Terminal();
            user1.LTEUser.Terminal = terminal;

            List<Huawei.UNet.Traffic.Interface.NetworkTerminal> netterminallist = new List<NetworkTerminal>();
            NetworkTerminal networkTerminal = new NetworkTerminal();
            LTETerminal lteterminal = new LTETerminal();
            netterminallist.Add(lteterminal);
            user1.LTEUser.Terminal.NetTerminalList = netterminallist;


            user1.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user1.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user1.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());


            user2.LTEUser = lteuser;
            user2.LTEUser.Terminal = terminal;
            user2.ID = 2;
            netterminallist.Add(lteterminal);
            user2.LTEUser.Terminal.NetTerminalList = netterminallist;
            user2.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user2.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(user2.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());

            m_User.LTEUser = lteuser;
            m_User.ID = 0;
            m_User.LTEUser.Terminal = terminal;
            netterminallist.Add(lteterminal);
            m_User.LTEUser.Terminal.NetTerminalList = netterminallist;
            m_User.LTEUser.Service = new Huawei.UNet.Traffic.Interface.UnionPsService();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic = new Dictionary<Huawei.UNet.Frame.Interface.NetWorkType, Huawei.UNet.Traffic.Interface.Service>();
            ((Huawei.UNet.Traffic.Interface.UnionPsService)(m_User.LTEUser.Service)).PSServiceDic.Add(NetWorkType.LTE, new Huawei.UNet.Traffic.LTEModel.LTEService());

            //Service service = new Service();
            //UnionPsService psservice = SimulationTools.GetUnionPsService(service);

            //psservice.DlOffset = 0;
            //psservice.DlTxEff = 1;
            //psservice.DlMinThroughputDemand = 0;
            //user1.LTEUser.Service = psservice;

        }
Exemple #27
0
 private UnionPsService GeneratePsService()
 {
     UnionPsService service = new UnionPsService();
     service.BodyLoss = (float) this.tbBodyLoss.Value;
     service.DlAveThroughputDemand = (float) this.tbDlAveThroughput.Value;
     service.DlMaxThroughputDemand = (float) this.tbDlMaxThroughput.Value;
     service.DlMinThroughputDemand = (float) this.tbDlMinThroughput.Value;
     service.DlTxEff = (float) this.tbDlTxEff.Value;
     service.Name = this.GetServiceName();
     service.Technology = NetWorkType.UMTS;
     service.Type = ServiceType.Data;
     service.UlAveThroughputDemand = (float) this.tbUlAveThroughput.Value;
     service.UlMaxThroughputDemand = (float) this.tbUlMaxThroughput.Value;
     service.UlMinThroughputDemand = (float) this.tbUlMinThroughput.Value;
     service.UlTxEff = (float) this.tbUlTxEff.Value;
     service.PSServiceDic.Add(NetWorkType.UMTS, this.GenerateUmtsService());
     return service;
 }
Exemple #28
0
 private bool IsPsServicePropertyValid(UnionPsService service, string modelServiceName, string change, ref string info)
 {
     string newName = service.Name;
     if (!IsNameValid(newName, modelServiceName, ref info))
     {
         return false;
     }
     PsServiceValid PsServiceValid = new PsServiceValid(service);
     if(!PsServiceValid.IsPsServiceValid(ref info) )
     {
         return false ;
     }
     return true;
 }
Exemple #29
0
 private UnionPsService GenerateService()
 {
     UnionPsService unionPsService = new UnionPsService();
     unionPsService.Name = this.tbName.Text.Trim();
     unionPsService.UlMaxThroughputDemand = (float) this.tbUlMaxThroughput.Value;
     unionPsService.DlMaxThroughputDemand = (float) this.tbDlMaxThroughput.Value;
     unionPsService.UlMinThroughputDemand = (float) this.tbUlMinThroughput.Value;
     unionPsService.DlMinThroughputDemand = (float) this.tbDlMinThroughput.Value;
     unionPsService.UlAveThroughputDemand = (float) this.tbUlAveThroughput.Value;
     unionPsService.DlAveThroughputDemand = (float) this.tbDlAveThroughput.Value;
     unionPsService.UlTxEff = (float) this.tbUlTransEff.Value;
     unionPsService.DlTxEff = (float) this.tbDlTransEff.Value;
     unionPsService.UlOffset = (float) this.tbUlOffset.Value;
     unionPsService.DlOffset = (float) this.tbDlOffset.Value;
     unionPsService.BodyLoss = (float) this.tbBodyLoss.Value;
     unionPsService.DlAMRRate = float.Parse(this.cmbDlAmrRate.Text);
     unionPsService.UlAMRRate = float.Parse(this.cmbUlAmrRate.Text);
     unionPsService.Technology = NetWorkType.LTE;
     LTEService lteservice = new LTEService();
     lteservice.Name = this.tbName.Text;
     lteservice.Priority = (int) this.tbPriority.Value;
     lteservice.DLBLER = ((float) this.dlBLER.Value) / 100f;
     lteservice.ULBLER = ((float) this.ulBLER.Value) / 100f;
     lteservice.IsGBR = this.chkGBR.Checked;
     if (this.cmbType.Text == ServiceType.Voice.ToString())
     {
         this.SetServiceData(unionPsService, lteservice, ServiceType.Voice, (float) this.tbUlActivity.Value, (float) this.tbDlActivity.Value);
     }
     else
     {
         this.SetServiceData(unionPsService, lteservice, ServiceType.Data, 0f, 0f);
     }
     unionPsService.PSServiceDic = new Dictionary<NetWorkType, Service>();
     unionPsService.PSServiceDic.Add(NetWorkType.LTE, lteservice);
     return unionPsService;
 }
Exemple #30
0
 private void InitServiceProperty(Service service)
 {
     if (service.CommonType == CommonServiceType.PSService)
     {
         m_UnionPsService = service as UnionPsService;
         m_UnionPsService.Technology = NetWorkType.TDSCDMA;
         m_TDService = m_UnionPsService.PSServiceDic[NetWorkType.TDSCDMA] as TDService;
     }
     else
     {
         m_CommonServiceType = CommonServiceType.CSService;
         m_UnionCsService = service as UnionCsService;
         m_UnionCsService.Technology = NetWorkType.TDSCDMA;
         m_TDService = m_UnionCsService.CSServiceDic[NetWorkType.TDSCDMA] as TDService;
     }
 }