Ejemplo n.º 1
0
        public static UMTSSimCell CreatUMTSSimCell(double x,double y)
        {
            IACell cell = new UMTSCell();
            Transceiver trans = new Transceiver();
            Site site = new Site();
            List<UMTSSimUser> serverdUserList = new List<UMTSSimUser>();
            serverdUserList.Add(MockUser.CreatUMTSPSUser());
            site.X = x;
            site.Y = y;
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 3;
            cell.Parent = trans;
            trans.Parent = site;

            UMTSSimCell simCell = new UMTSSimCell(cell);
            simCell.NECell.PilotPower = 33f;
            simCell.NECell.FreqBand.BandWidth = 3f;
            simCell.DlFrequency = 2100f;
            simCell.UlFrequency = 2000f;
            simCell.GSMInterfCells = InitialGSMInterfCell();
            simCell.TDInterfCells = InitialTDInterfCell();
            simCell.ServerdHSUPAUser = serverdUserList;
            simCell.ULCENum = 15;
            simCell.TotalNoiserThreshold = 10;
            return simCell;
        }
Ejemplo n.º 2
0
       //构造TDCarrier
       public static IACell CreatTDCarrier()
       {
           IACell cell = new TDSCDMACarrier();
           Transceiver trans = new Transceiver();
           Site site = new Site();

           site.X = 100;
           site.Y = 100;
           site.Equipment = new BtsEquipment();
           site.Equipment.NoiseFigure = 2;

           trans.Name = "Trans1";
           trans.Parent = site;
           trans.Cells.Add(cell);

           cell.Name = "TDCell1";
           cell.Parent = trans;
           cell.FreqBand = new FrequencyBand();
           cell.FreqBand.DLFrequency = 2010f;
           cell.FreqBand.ULFrequency = 2010f;

           AntConfig antConfig = new AntConfig();
           antConfig.OutdoorAntenna = new Huawei.UNet.Antenna.Entity.AntennaEntity();
           cell.Parent.AntConfiguration.Add(antConfig);
           cell.Parent.AntConfiguration[0].IsMainAnt = true;
           cell.Parent.AntConfiguration[0].DlTotalLoss = 3;
           cell.Parent.AntConfiguration[0].OutdoorAntenna.Gain = 18;
           cell.ID = 2;

           PropModelConfig propModelConfig = new PropModelConfig();
           propModelConfig.CalcRadius = 4000;
           propModelConfig.CalcResolution = 50;
           trans.Cells[0].PropModels.Add(propModelConfig);
           return cell;
       }
Ejemplo n.º 3
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();
        }
Ejemplo n.º 4
0
        public static List<IACell> CreateCellList(List<IACell> cellList, double[] x, double[] y)
        {
            for (int i = 0; i < cellList.Count; i++)
            {
                Transceiver trans = new Transceiver();
                Site site = new Site();
                site.X = x[i];
                site.Y = y[i];   
                site.Equipment = new BtsEquipment();
                site.Equipment.NoiseFigure = 2;

                trans.Name = "Trans" + i.ToString();
                trans.Parent = site;
                trans.Cells.Add(cellList[i]);

                cellList[i].Parent = trans;
                cellList[i].MaxPower = 39;

                AntConfig antConfig = new AntConfig();
                cellList[i].Parent.AntConfiguration.Add(antConfig);
                cellList[i].Parent.AntConfiguration[0].IsMainAnt = true;
                cellList[i].Parent.AntConfiguration[0].DlTotalLoss = i+1;
                antConfig.OutdoorAntenna = new AntennaEntity();
                cellList[i].ID = (short)i;

                PropModelConfig propModelConfig = new PropModelConfig();
                propModelConfig.CalcRadius = 4000;
                propModelConfig.CalcResolution = 50;
                trans.Cells[0].PropModels.Add(propModelConfig);
                
            }
            return cellList;   
        }
Ejemplo n.º 5
0
        public static IACell CreateCell(IACell cell)
        {
            Transceiver trans = new Transceiver();
            Site site = new Site();

            site.X = 100;
            site.Y = 100;
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 2;

            trans.Name = "Trans1";
            trans.Parent = site;
            trans.Cells.Add(cell);
                        
            cell.Parent = trans;
            cell.MaxPower = 39;

            AntConfig antConfig = new AntConfig();
            cell.Parent.AntConfiguration.Add(antConfig);
            cell.Parent.AntConfiguration[0].IsMainAnt = true;
            cell.Parent.AntConfiguration[0].DlTotalLoss = 2;
            antConfig.OutdoorAntenna = new AntennaEntity();
            cell.ID = 1;

            PropModelConfig propModelConfig = new PropModelConfig();
            propModelConfig.CalcRadius = 4000;
            propModelConfig.CalcResolution = 50;
            trans.Cells[0].PropModels.Add(propModelConfig);
            return cell;
        }
Ejemplo n.º 6
0
 protected override void Add(Site site)
 {
     if (!base.m_GroupKeys.ContainsKey(string.Empty))
     {
         base.m_GroupKeys.Add(string.Empty, new List<short>());
     }
     base.m_GroupKeys[string.Empty].Add(site.ID);
 }
Ejemplo n.º 7
0
 public bool ConvertCoordinate(ref string info, Site site, ref double x, ref double y, ref double longitude, ref double latitude)
 {
     if ((double.IsNaN(site.X) || double.IsNaN(site.Y)) && this.m_GeoInfo.GeoProvider.HasProjection)
     {
         return this.ConvertBLToXY(ref info, site.Longitude, site.Latitude, ref x, ref y);
     }
     return this.ConvertXYToBL(ref info, site.X, site.Y, ref longitude, ref latitude);
 }
Ejemplo n.º 8
0
 private void ParseBL(Site site)
 {
     object longitude = site.Longitude;
     object latitude = site.Latitude;
     this.SetBLValue(ref longitude, ref latitude);
     site.Longitude = Convert.ToDouble(longitude);
     site.Latitude = Convert.ToDouble(latitude);
 }
Ejemplo n.º 9
0
 private static void ConvertBLToDXDY(AntConfig config, Site site, GeoInfoObserver geoInfo)
 {
     if (site != null)
     {
         double num;
         double num2;
         geoInfo.TransformBLToXY(config.Latitude, config.Longitude, out num, out num2);
         config.DX = (float) (num - site.X);
         config.DY = (float) (num2 - site.Y);
     }
 }
Ejemplo n.º 10
0
 protected override string GetValue(Site site)
 {
     List<ExtDefKeyValue> extDefines = site.ExtDefines;
     foreach (ExtDefKeyValue value2 in extDefines)
     {
         if (value2.Name == this.m_Name)
         {
             return value2.Value;
         }
     }
     return string.Empty;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 为下行用户分配CE
 /// </summary>
 /// <param name="tempList"></param>
 /// <param name="userNum"></param>
 /// <param name="site"></param>
 private void AssignDLCE(List<UMTSSimCell> tempList, int userNum, Site site)
 {
     if (userNum > 0)
     {
         foreach (UMTSSimCell cell in tempList)
         {
             float ratio = (float)GetServedUserNum(cell, LinkType.Downlink) / userNum;
             cell.DLCENum = (int)(site.DLCETotalNumOfUMTS * ratio);
             cell.DLCENumForSHO = (int)(site.SHODLCEPreservNum * ratio);
         }
     }
 }
Ejemplo n.º 12
0
 protected override void Modify(Site modifySite)
 {
     foreach (string str in base.m_GroupKeys.Keys)
     {
         base.m_GroupKeys[str].Remove(modifySite.ID);
     }
     string name = modifySite.Name;
     if (!base.m_GroupKeys.ContainsKey(name))
     {
         base.m_GroupKeys.Add(name, new List<short>());
     }
     base.m_GroupKeys[name].Add(modifySite.ID);
 }
Ejemplo n.º 13
0
 private void AddCells(Transceiver tran)
 {
     IASite  site = new Site();
     site.X = 1;
     site.Y = 1;
     tran.setParent(site);
     for (int i = 0; i < 3; i++)
     {
         IACell cell1 = new MockIACell();
         tran.addCarrier(cell1);
         cell1.setParent(tran, cell1);
     }
 }
Ejemplo n.º 14
0
 protected override void Modify(Site modifySite)
 {
     foreach (string str in base.m_GroupKeys.Keys)
     {
         base.m_GroupKeys[str].Remove(modifySite.ID);
     }
     string key = modifySite.Altitude.ToString();
     if (!base.m_GroupKeys.ContainsKey(key))
     {
         base.m_GroupKeys.Add(key, new List<short>());
     }
     base.m_GroupKeys[key].Add(modifySite.ID);
 }
Ejemplo n.º 15
0
        public void Init()
        {
            IProject project = new MockProject();
            ProjectSingleton.CurrentProject = project;
            IGeoProvider Geo = new MockGeoProvider();
            ProjectSingleton.CurrentProject.AppContext.RegisterService(Geo);
            m_Target = new CalcCellToCellLinkLoss(ProjectSingleton.CurrentProject.AppContext);

            m_CellFrom = new MockIACell();
            m_CellTo = new MockIACell();

            FrequencyBand fromBand = new FrequencyBand();
            fromBand.DLFrequency = 900;
            m_CellFrom.FreqBand = fromBand;

            Transceiver fromParent = new Transceiver();
            IASite fromSite = new Site();
            fromSite.X = 0;
            fromSite.Y = 0;
            fromParent.setParent(fromSite);

            //List<AntConfig> fromConfigs = new List<AntConfig>();
            AntConfig fromConfig1 = new AntConfig();
            fromConfig1.OutdoorAntenna = new AntennaEntity();
            fromConfig1.AntType = 1;
            fromConfig1.Height = 30;
            fromConfig1.SectorID = 0;
            //fromConfigs.Add(fromConfig1);
            fromParent.addAntConfig(fromConfig1);
            m_CellFrom.setParent(fromParent, m_CellFrom);

            FrequencyBand toBand = new FrequencyBand();
            toBand.DLFrequency = 905;
            m_CellTo.FreqBand = toBand;

            Transceiver toParent = new Transceiver();
            IASite toSite = new Site();
            toSite.X = 4;
            toSite.Y = 3;
            toParent.setParent(toSite);

            AntConfig toConfig = new AntConfig();
            toConfig.OutdoorAntenna = new AntennaEntity();
            toConfig.AntType = 1;
            toConfig.Height = 25;
            toConfig.SectorID = 0;
            toParent.addAntConfig(toConfig);
            m_CellTo.setParent(toParent, m_CellTo);

 
        }
Ejemplo n.º 16
0
 protected override void Add(Site site)
 {
     string key = site.Altitude.ToString();
     if (!base.m_GroupKeys.ContainsKey(key))
     {
         List<short> list2 = new List<short>();
         list2.Add(site.ID);
         List<short> list = list2;
         base.m_GroupKeys.Add(key, list);
     }
     else
     {
         base.m_GroupKeys[key].Add(site.ID);
     }
 }
Ejemplo n.º 17
0
 protected override void Add(Site site)
 {
     string name = site.Name;
     if (!base.m_GroupKeys.ContainsKey(name))
     {
         List<short> list2 = new List<short>();
         list2.Add(site.ID);
         List<short> list = list2;
         base.m_GroupKeys.Add(name, list);
     }
     else
     {
         base.m_GroupKeys[name].Add(site.ID);
     }
 }
Ejemplo n.º 18
0
 public static LTECell CreatLteCell()
 {
     LTECell lteCell = new LTECell();
     lteCell.Parent = new Transceiver();
     Site site = new Site();
     site.Equipment = new BtsEquipment();
     lteCell.Parent.Parent = site;
     lteCell.FreqBand = new FrequencyBand();
     lteCell.FreqBand.BandWidth = 20;
     lteCell.FreqBand.ID = 4;
     lteCell.PropModels.Add( MockPropModelCfg.CreatLtePropModelCfg());
     RelayNode relayNode = MockRelayNode.CreatRelayNode();
     lteCell.RNList.Add(relayNode);
     lteCell.ID = 1;
     //lteCell.RNList
     return lteCell;    
 }
Ejemplo n.º 19
0
 private List<ISimCellBase> InitialUmtsInterfCell()
 {
     List<ISimCellBase> umtsInterfCellList = new List<ISimCellBase>();
     Site site = new Site();
     BtsEquipment equipment = new BtsEquipment();
     equipment.NoiseFigure = 8f;
     site.Equipment = equipment;
     Transceiver tran = new Transceiver();
     tran.Parent = site;
     IACell aCell = new UMTSCell();
     aCell.Parent = tran;
     UMTSSimCell umtsInterfCell = new UMTSSimCell(aCell);
     umtsInterfCell.Cell.FreqBand.BandWidth = 5f;
     umtsInterfCell.DlFrequency = 1805.1f;
     umtsInterfCell.DlPower = 40;
     umtsInterfCellList.Add(umtsInterfCell);
     return umtsInterfCellList;
 }
Ejemplo n.º 20
0
 public void Initial()
 {
     cellCase = new MockCellCase();
     context = new Context();
     tfMatrix = new TrueFalseMatrix(20,20,10.0,30.0,1,true);
     context.Add(ContextKeys.TFMatrix, tfMatrix);
     cell = new MockCell();
     tran = new Transceiver();
     Site site = new Site();
     site.X = 10.0f;
     site.Y = 30.0f;
     tran.setParent(site);
     cell.Parent = tran;
     tran.addCarrier(cell);
     PropModelConfig config = new PropModelConfig();
     config.CalcRadius = 10;
     cell.PropModels.Add(config);
     context.Add(ContextKeys.CurrentCalcCell, cell);
 }
Ejemplo n.º 21
0
        private static void InitCell(out IACell cell1, out IACell cell2)
        {
            cell1 = new MockACell();
            cell1.ID = 1;
            FrequencyBand Fre1 = new FrequencyBand();
            Fre1.DLFrequency = 900;
            cell1.FreqBand = Fre1;
            Transceiver Trans1 = new Transceiver();
            IASite Site1 = new Site();
            Site1.X = 0;
            Site1.Y = 0;
            ((Site)Site1).Equipment = new BtsEquipment();
            Trans1.setParent(Site1);
            AntConfig Ant1 = new AntConfig();
            Ant1.OutdoorAntenna = new AntennaEntity();
            Ant1.AntType = 1;
            Ant1.Height = 25;
            Ant1.SectorID = 0;
            Ant1.IsMainAnt = true;
            Trans1.addAntConfig(Ant1);
            cell1.setParent(Trans1, cell1);

            cell2 = new MockACell();
            cell2.ID = 2;
            FrequencyBand Fre2 = new FrequencyBand();
            Fre2.DLFrequency = 925;
            cell2.FreqBand = Fre2;
            Transceiver Trans2 = new Transceiver();
            IASite Site2 = new Site();
            Site2.X = 10;
            Site2.Y = 10;
            ((Site)Site2).Equipment = new BtsEquipment();
            Trans2.setParent(Site2);
            AntConfig Ant2 = new AntConfig();
            Ant2.OutdoorAntenna = new AntennaEntity();
            Ant2.AntType = 1;
            Ant2.Height = 25;
            Ant2.SectorID = 0;
            Ant2.IsMainAnt = true;
            Trans2.addAntConfig(Ant2);
            cell2.setParent(Trans2, cell2);
        }
Ejemplo n.º 22
0
        public static Transceiver CreatTransceiver()
        {
            Transceiver trans = new Transceiver();
            AntConfig antConfig = new AntConfig();
            trans.AntConfiguration = new List<AntConfig>();
            Site site = new Site();
            site.Equipment = new BtsEquipment();
            trans.Parent = site;
            trans.Parent.X = 10;
            trans.Parent.Y = 10;
            trans.Cells.Add(MockLTECell.CreatLteCell());
             
            //LTECell cell = MockLTECell.CreatCell();
            //cell.FreqBand.ID = 5;
            //trans.Cells.Add(cell);

            antConfig.Parent = trans;
            trans.AntConfiguration.Add(antConfig);
            return trans;
        }
Ejemplo n.º 23
0
 protected override void Add(Site site)
 {
     foreach (ExtDefKeyValue value2 in site.ExtDefines)
     {
         if (value2.Name == this.m_Name)
         {
             string key = value2.Value;
             if (!base.m_GroupKeys.ContainsKey(key))
             {
                 List<short> list2 = new List<short>();
                 list2.Add(site.ID);
                 List<short> list = list2;
                 base.m_GroupKeys.Add(key, list);
             }
             else
             {
                 base.m_GroupKeys[key].Add(site.ID);
             }
         }
     }
 }
Ejemplo n.º 24
0
        public void GetNeighbourCellsTest()
        {
            List<ISimCellBase> cells = new List<ISimCellBase>();
            Site site1 = new Site();
            site1.X = 10;
            site1.Y = 10;

            Transceiver tranceiver1 = new Transceiver();
            tranceiver1.addCarrier(targetCell.Cell);

            PropModelConfig pmcfg = new PropModelConfig();
            pmcfg.CalcRadius = 1;
            targetCell.Cell.PropModels.Add(pmcfg);
            targetCell.Cell.setParent(tranceiver1, targetCell.Cell);
            tranceiver1.setParent(site1);
            tranceiver1.X = site1.X - tranceiver1.DeltaX;
            tranceiver1.Y = site1.Y - tranceiver1.DeltaY;

            //tranceiver1.Parent.X = site1.X;
            //tranceiver1.Parent.Y = site1.Y;

            cell.Add(cell1);
            Site site2 = new Site();
            site2.X = 0;
            site2.Y = 0;
            Transceiver tranceiver2 = new Transceiver();
            tranceiver2.addCarrier(cell1.Cell);
            cell1.Cell.setParent(tranceiver2, cell1.Cell);
            tranceiver2.setParent(site2);
            tranceiver2.X = site2.X - tranceiver2.DeltaX;
            tranceiver2.Y = site2.Y - tranceiver2.DeltaY;

            //foreach (PropModelConfig pmc in hometran1.PropModels)
            //{
            //    pmc.CalcRadius = 1;
            //};
            cells = simuRalatedCell.GetNeighbourCells(targetCell, cell, maxInterNum);
           // Assert.AreEqual(cells.Count, 1);
        }
Ejemplo n.º 25
0
Archivo: Mock.cs Proyecto: xiaoyj/Space
        public static IACell CreatGsmCell()
        {
            IACell cell = new GSMTRX();
            Site site = new Site();
            site.X = 100;
            site.Y = 100;
            site.Equipment = new BtsEquipment();
            site.Equipment.NoiseFigure = 4f;

            Transceiver trans = new Transceiver();
            trans.Name = "Tranceiver1";
            trans.Parent = site;
            trans.ID = 1;
            trans.Cells.Add(cell);

            cell.Name = "GSMCell1";
            cell.Parent = trans;

            AntConfig antConfig = new AntConfig();
            cell.Parent.AntConfiguration.Add(antConfig);
            cell.Parent.AntConfiguration[0].IsMainAnt = true;
            cell.Parent.AntConfiguration[0].DlTotalLoss = 3;
            cell.Parent.AntConfiguration[0].OutdoorAntenna = new AntennaEntity();
            cell.Parent.AntConfiguration[0].OutdoorAntenna.Gain = 0;
            cell.ID = 1;
            cell.FreqBand.BandWidth = 0.2f;
            ((GSMTRX)cell).TRXType = TRXType.BCCH;
            ((GSMTRX)cell).MaxPower = 46;
            ((GSMTRX)cell).TRXPower = 46;

            PropModelConfig propModelConfig = new PropModelConfig();
            propModelConfig.CalcRadius = 4000;
            propModelConfig.CalcResolution = 50;
            trans.Cells[0].PropModels.Add(propModelConfig);

            return cell;
        }
Ejemplo n.º 26
0
 public static void GetOneSite(string name, CollectionsModel model)
 {
     SiteCollection siteColl = model.SiteColl;
     List<int> siteIDList = new List<int>();
     Site siteByName = new Site();
     if (siteColl.GetSiteByName(name) != null)
     {
         siteByName = siteColl.GetSiteByName(name);
         int iD = siteByName.ID;
         siteIDList.Add(iD);
     }
     ViewNetEntityEventArgs args = new ViewNetEntityEventArgs(siteIDList, null, null,null);
     INetEntity gisINetEntity = model.GisINetEntity;
     if (siteIDList.Count > 0)
     {
         GeoXYPoint geoXYPoiny = new GeoXYPoint(siteByName.X, siteByName.Y);
         gisINetEntity.MoveMapTo(geoXYPoiny);
         gisINetEntity.MapRedraw();
     }
     else
     {
         gisINetEntity.MapRedraw();
     }
 }
Ejemplo n.º 27
0
 protected abstract void Modify(Site modifySite);
Ejemplo n.º 28
0
 protected abstract string GetValue(Site site);
Ejemplo n.º 29
0
 protected abstract void Add(Site site);
Ejemplo n.º 30
0
 public void UpdateData()
 {
     if (this.type == Huawei.UNet.NE.View.FormOpenType.New)
     {
         this.m_SiteCol.AddSite(this, this.site);
     }
     else
     {
         this.m_SiteCol.ModifySite(this, this.site);
     }
     this.site = (Site) this.site.Clone();
     this.type = Huawei.UNet.NE.View.FormOpenType.Property;
 }