Exemplo n.º 1
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;
       }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
 private object GetObjectValue(Repeater repeater, string propertyName)
 {
     PropModelConfig propModelConfig = new PropModelConfig();
     AntConfig antConfig = new AntConfig();
     if (this.IsMainPropModel(propertyName))
     {
         propModelConfig = repeater.PropModels[0];
         propertyName = propertyName.Substring("Main".Length);
         return this.GetPropModelValue(propModelConfig, propertyName);
     }
     if (this.IsExtPropModel(propertyName))
     {
         if (repeater.PropModels.Count == 2)
         {
             propModelConfig = repeater.PropModels[1];
         }
         propertyName = propertyName.Substring("Ext".Length);
         return this.GetPropModelValue(propModelConfig, propertyName);
     }
     if (!this.m_IsDonorSide)
     {
         antConfig = repeater.ConverageAntConfig;
         return this.GetAntConfigValue(antConfig, propertyName);
     }
     if (this.m_IsDonorSide)
     {
         antConfig = repeater.DonorAntConfig;
         return this.GetAntConfigValue(antConfig, propertyName);
     }
     return string.Empty;
 }
Exemplo 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;   
        }
Exemplo n.º 5
0
 private void CompareRadius(ref float radius, PropModelConfig pmcfg)
 {
     if (radius < pmcfg.CalcRadius)
     {
         radius = pmcfg.CalcRadius;
     }
 }
Exemplo n.º 6
0
 private object GetPropModelValue(PropModelConfig propModelConfig, string propertyName)
 {
     PropertyInfo property = propModelConfig.GetType().GetProperty(propertyName);
     object propNameByID = property.GetValue(propModelConfig, null);
     if (property.Name == "PropModelID")
     {
         propNameByID = NECommon.GetPropNameByID(Convert.ToInt32(propNameByID), this.m_PropaCollection.GetPropagationModelList());
     }
     return propNameByID;
 }
Exemplo n.º 7
0
 public void GetPropModelConfigTest()
 {
     cell1= new TDSCDMACarrier();
     
     PropModelConfig propmdcfg1 = new PropModelConfig();
     PropModelConfig propmdcfg2 = new PropModelConfig();
     PropModelConfig propmdcfg3 = new PropModelConfig();
     cell1.PropModels.Add(propmdcfg1);
     cell1.PropModels.Add(propmdcfg2);
     cell1.PropModels.Add(propmdcfg3);
     Assert.AreEqual(propmdcfg1, Tool.GetPropModelConfig(cell1));
 }
Exemplo n.º 8
0
 private bool GetPropModel(ref string info, PropModelConfig tempPropModel, ref PropModelConfig propModel)
 {
     if (tempPropModel != null)
     {
         int propIDByName = NECommon.GetPropIDByName(tempPropModel.PropModelName, this.m_PropList);
         string propNameByID = NECommon.GetPropNameByID(tempPropModel.PropModelID, this.m_PropList);
         if ((propIDByName != -1) || (propNameByID != "(None)"))
         {
             propModel = new PropModelConfig();
             propModel.PropModelID = (tempPropModel.PropModelID == -1) ? propIDByName : tempPropModel.PropModelID;
             propModel.CalcRadius = tempPropModel.CalcRadius;
             propModel.CalcResolution = tempPropModel.CalcResolution;
             return true;
         }
         info = NEResource.NE_PROPAGATION_MODEL + "(" + tempPropModel.PropModelName + ")" + NEResource.NE_NOT_EXISTS;
     }
     return false;
 }
Exemplo n.º 9
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);
 }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
0
Arquivo: Mock.cs Projeto: 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;
        }
Exemplo n.º 12
0
Arquivo: Mock.cs Projeto: xiaoyj/Space
        public static IACell CreateTDCell()
        {
            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.Parent.MaxPower = 39;

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

            PropModelConfig propModelConfig = new PropModelConfig();
            propModelConfig.CalcRadius = 4000;
            propModelConfig.CalcResolution = 50;
            trans.Cells[0].PropModels.Add(propModelConfig);
            return cell;
        }
Exemplo n.º 13
0
 //Todo```
 public void CopyFrom(RelayCell cell)
 {
     m_Ams = cell.Ams;
     m_AmsThreshold = cell.AmsThreshold;
     base.CopyFrom(cell);
     this.m_TAC = cell.TAC;
     m_PhyID = cell.PhyID;
     m_RCToCellAnt = cell.RCToCellAnt;
     m_CellToUEAnt = cell.CellToUEAnt;
     m_RelayUEPropModelConfig = cell.RelayUEPropModelConfig;
     m_SchedulePolicy = cell.SchedulePolicy;
     m_HighSpeed = cell.HighSpeed;
     //m_parentRN = cell.ParentRN;
     m_RSPower = cell.RSPower;
     m_CellRadius = cell.CellRadius;
     m_DlActualTxPower = cell.DlActualTxPower;
     m_BCHPoffset = cell.BCHPoffset;
     m_BCHPower = cell.BCHPower;
     m_BestStartFrequency = cell.BestStartFrequency;
     m_RCellPriority = cell.RCellPriority;
     m_RCellRadius = cell.RCellRadius;
     m_PCFICHPoffset = cell.PCFICHPoffset;
     m_PDCCHPoffset = cell.PDCCHPoffset;
     m_PHICHPoffset = cell.PHICHPoffset; ;
     m_SCHPoffset = cell.SCHPoffset;
     m_SCHPower = cell.SCHPower;
     m_UlActualIoT = cell.UlActualIoT;
     m_RPUCCHPower = cell.RPUCCHPower; //Cal       
     m_RPUSCHPower = cell.RPUSCHPower;
     //add by xg 20100224
     m_RelayAlgParameter = cell.RelayAlgParameter;
     m_PB = cell.PB;
     m_ActualDlLoad = cell.ActualDlLoad;
     m_ActualUlLoad = cell.ActualUlLoad;
     m_PowerBias = cell.PowerBias;
     m_IsIndoor = cell.m_IsIndoor;
     m_DLRsSinrAccessThreshold = cell.DLRsSinrAccessThreshold;
 }
Exemplo n.º 14
0
 public RelayCell()
 {
     m_tran = new Transceiver();
     base.SetDefaultValue(NetWorkType.LTE);
     m_TAC = 0;
     m_PhyID = 0;
     m_RCToCellAnt = new AntConfig();
     m_CellToUEAnt = new AntConfig();
     m_CellToUEAnt.Height = 5f;
     m_RelayUEPropModelConfig = new PropModelConfig();
     m_SchedulePolicy = SchedulePolicy.PF;
     m_HighSpeed = HighSpeedType.LowSpeed;
     m_RSPower = 15f;
     m_RelayAlgParameter = new LteAlgParam();
     m_BCHPoffset = 0f;
     if (base.FreqBand != null)
     {
         this.m_BestStartFrequency = base.FreqBand.DLFrequency;
     }
     else
     {
         this.m_BestStartFrequency = 0f;
     }
     m_DlActualTxPower = 44.927f;
     m_RCellPriority = 0;
     m_RCellRadius = 0f;
     m_PCFICHPoffset = 0f;
     m_PDCCHPoffset = 0f;
     m_PHICHPoffset = 0f;
     m_SCHPoffset = 0f;
     m_UlActualIoT = 2f;
     m_RPUCCHPower = 0f;
     m_RPUSCHPower = 0f;
     m_AntList = new List<AntConfig>();
     m_AntList.Add(m_RCToCellAnt);
     m_AntList.Add(m_CellToUEAnt);
     m_PowerBias = 0f;
     m_IsIndoor = false;
     m_DLRsSinrAccessThreshold = -20f;
     this.m_ActualUlLoad = base.UlTargetLoad;
     this.m_ActualDlLoad = base.DlTargetLoad;
 }
Exemplo n.º 15
0
 public static PropModelConfig CreatLtePropModelCfg()
 {
     PropModelConfig propModelConfig = new PropModelConfig();
     propModelConfig.CalcRadius = 4000;
     propModelConfig.CalcResolution = 50;
     return propModelConfig;
 }
Exemplo n.º 16
0
 private string GetPropModelConfigString(PropModelConfig propaCfg)
 {
     return (this.m_PropagModelCollection.GetPropModelByID(propaCfg.PropModelID).ParameterToString() + propaCfg.CalcRadius.ToString() + propaCfg.CalcResolution.ToString());
 }
Exemplo n.º 17
0
 private void FillPropModleValue(PropModelConfig propModel, object value, string propertyName, string splitKey, CollectionsModel model)
 {
     if (propertyName.StartsWith(splitKey))
     {
         string name = propertyName.Split(new string[] { splitKey }, StringSplitOptions.RemoveEmptyEntries)[0];
         PropertyInfo property = propModel.GetType().GetProperty(name);
         object propIDByName = null;
         if (property.Name.EndsWith("ID"))
         {
             propIDByName = NECommon.GetPropIDByName(value.ToString(), model.PropagetionColl.GetPropagationModelList());
         }
         else
         {
             int result = 0;
             if (int.TryParse(this.IsCurrency(value.ToString()), out result))
             {
                 propIDByName = result;
             }
         }
         property.SetValue(propModel, propIDByName, null);
     }
 }
Exemplo n.º 18
0
        private void GetRelayNodeList(AlloteAddRelayNodeEventArgs args, List<RelayNode> rnList)
        {
            List<string> candidateSiteName = new List<string>();
            List<short> candidateSiteID = new List<short>();
            List<RelayCell> commitCarrierList = new List<RelayCell>();
            foreach (RelayNode rn in m_RNCollection.RNList)
            {
                candidateSiteName.Add(rn.Name);
            }
            List<double> listX = args.XList;
            List<double> listY = args.YList;
            for (int i = 0; i < listX.Count; i++)
            {
                double num4;
                double num5;
                LTECell parentCell;
                if (m_Model.LTECellColl.CellList == null || m_Model.LTECellColl.CellList.Count == 0)
                {
                    return ;
                }
                else
                {
                    List<LTECell> nearestLTECellList = new List<LTECell>();
                    float distance = float.MaxValue;
                    LTECell nearestLTECell = new LTECell();
                    foreach (LTECell cell in m_Model.LTECellColl.CellList)
                    {
                        double dic = Math.Pow((cell.Parent.X - listX[i]), 2) + Math.Pow((cell.Parent.Y - listY[i]), 2);
                        if (dic < distance)
                        {
                            distance = (float)dic;
                            nearestLTECell = cell;
                        }
                    }
                    foreach (LTECell cell in m_Model.LTECellColl.CellList)
                    {
                        double dic = Math.Pow((cell.Parent.X - listX[i]), 2) + Math.Pow((cell.Parent.Y - listY[i]), 2);
                        if (Math.Abs(dic - distance) / distance < 0.0001)
                        {
                            nearestLTECellList.Add(cell);
                        }
                    }
                    List<double> angleList = new List<double>();
                    foreach (LTECell cell in nearestLTECellList)
                    {
                        double rc_Angle = CalcAngle(listX[i] - cell.Parent.X, listY[i] - cell.Parent.Y);
                        double intersectionAngle = Math.Abs(rc_Angle - cell.Parent.AntConfiguration[0].Azimuth);
                        if (intersectionAngle > 180)
                        {
                            intersectionAngle = 360 - intersectionAngle;
                        }
                        angleList.Add(intersectionAngle);
                    }
                    LTECell[] cellArray = new LTECell[angleList.Count];
                    double[] angleArray = new double[angleList.Count];
                    for (int j = 0; j < angleList.Count; j++)
                    {
                        cellArray[j] = nearestLTECellList[j];
                        angleArray[j] = angleList[j];
                    }
                    Array.Sort(angleArray, cellArray);
                    parentCell = cellArray[0];

                }
                RelayNode rn = new RelayNode();
                rn.X = listX[i];
                rn.Y = listY[i];
                this.m_GeoObserver.TransformXYToBL(listX[i], listY[i], out num4, out num5);
                rn.Latitude = num4;
                rn.Longitude = num5;
                rn.Altitude = this.m_GeoObserver.GetDTM(rn.X, rn.Y);//获得海拔高度
                rn.Name = this.GetNewRelayNodeName(candidateSiteName);
                rn.Active = true;
                rn.Visible = true;
                rn.Equipment = this.m_BTSCol.BtsEquipmentList[0];
                rn.Parent = parentCell;
                rn.ID = this.GetNewRelayNodeID(candidateSiteID);
                parentCell.RNList.Add(rn);
                candidateSiteName.Add(rn.Name);
                candidateSiteID.Add(rn.ID);
                rnList.Add(rn);
                RelayCell rc = new RelayCell(rn);
                rc.Name = this.m_RCCollection.GetValidCellName(rn.Name);
                commitCarrierList.Add(rc);
                this.m_RCCollection.AddRelayCell("GIS", commitCarrierList, rn);
                rc.Reception = this.m_ReceptionEquip[0];
                rc.CellToUEAnt.OutdoorAntenna = m_Antenna.FindAntennaByName(m_tplRelayCol.TplRC.AntennaName);
                rc.RCToCellAnt.OutdoorAntenna = m_Antenna.FindAntennaByName(m_tplRelayCol.TplRN.AntennaName);
                PropModelConfig item = new PropModelConfig();
                item.CalcRadius = (int)(m_tplRelayCol.TplRC.MainCalcRidius);
                item.CalcResolution = (int)(m_tplRelayCol.TplRC.MainModelResolution);
                item.PropModelID = m_tplRelayCol.TplRC.MainPropagModelID;
                rc.FreqBand = rc.ParentRN.Parent.FreqBand;
                rc.ChannelIndex = rc.FreqBand.AvailableChIndexList[0];
                rc.PropModels.Clear();
                rc.PropModels.Add(item);
                rc.RelayUEPropModelConfig = rc.PropModels[0];
                commitCarrierList.Clear();
            }
        }
Exemplo n.º 19
0
        public static GSMSimTRX MockGsmSimTrx()
        {
            IACell aCell = new GSMTRX();
            GSMSimTRX trx = new GSMSimTRX(aCell);
            trx.TSs[0].NETimeSlot.ChanType = Net.ChannelType.BCCH;
            trx.TSs[1].NETimeSlot.ChanType = Net.ChannelType.PDCH;
            trx.TSs[2].NETimeSlot.ChanType = Net.ChannelType.PDCH;
            trx.TSs[3].NETimeSlot.ChanType = Net.ChannelType.DPDCH;
            
            //添加载波的传播模型
            PropModelConfig propModel = new PropModelConfig();
            propModel.CalcRadius = 4000;//计算半径为4000
            trx.NeTRX.PropModels.Add(propModel);

            return trx;
        }
Exemplo n.º 20
0
 public bool IsValidateProModels(ref string info, List<PropModelConfig> propModels, out PropModelConfig mainProp, out PropModelConfig extendedProp)
 {
     return (this.IsValidateMainPro(ref info, propModels, out mainProp) & this.IsValidateExPro(ref info, propModels, out extendedProp));
 }
Exemplo n.º 21
0
 private bool IsValidateMainPro(ref string info, List<PropModelConfig> propModels, out PropModelConfig mainProp)
 {
     mainProp = null;
     return ((propModels != null) && this.GetPropModel(ref info, propModels[0], ref mainProp));
 }
Exemplo n.º 22
0
 private bool IsValidateExPro(ref string info, List<PropModelConfig> propModels, out PropModelConfig extProp)
 {
     extProp = null;
     if ((propModels != null) && (propModels.Count == 2))
     {
         return this.GetPropModel(ref info, propModels[1], ref extProp);
     }
     return true;
 }
Exemplo n.º 23
0
 private void SetPropaModel(IACell cell)
 {
     PropModelConfig item = new PropModelConfig();
     item.PropModelID = 0;
     item.CalcRadius = 0xfa0;
     item.CalcResolution = 50;
     cell.PropModels.Add(item);
 }
Exemplo n.º 24
0
 private List<LTECell> ConvertXLSToCell(XlsTable xlsCellTable)
 {
     List<LTECell> list = new List<LTECell>();
     Dictionary<string, string> xlsNameToProper = new Dictionary<string, string>();
     XLSProConst.CellXlsToGeneralPro(xlsNameToProper);
     Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
     XLSProConst.CellXlsToObjPro(dictionary2);
     Dictionary<string, string> dictionary3 = new Dictionary<string, string>();
     XLSProConst.CellXlsToAlgParameterPro(dictionary3);
     Dictionary<string, string> dictionary4 = new Dictionary<string, string>();
     XLSProConst.CellXlsToPropPro(dictionary4);
     for (int i = 0; i < xlsCellTable.Data.Rows.Count; i++)
     {
         DataRow dr = xlsCellTable.Data.Rows[i];
         string colName = string.Empty;
         try
         {
             LTECell data = new LTECell();
             data.ID = 0;
             data.BCHPoffset = 0f;
             data.SCHPoffset = 0f;
             PropModelConfig item = new PropModelConfig();
             PropModelConfig config2 = new PropModelConfig();
             data.PropModels.Add(item);
             data.PropModels.Add(config2);
             LteAlgParam param = new LteAlgParam();
             data.LteAlgParameter = param;
             this.FillValue(xlsNameToProper, dr, data, ref colName);
             this.FillValue(dictionary3, dr, param, ref colName);
             foreach (string str2 in dictionary4.Keys)
             {
                 object obj2 = dr[str2];
                 string propertyName = dictionary4[str2];
                 this.FillPropModleValue(item, obj2, propertyName, "Main", this.m_Model);
                 this.FillPropModleValue(config2, obj2, propertyName, "Ext", this.m_Model);
             }
             foreach (string str4 in dictionary2.Keys)
             {
                 Predicate<ReceptionEquipment> match = null;
                 string value = dr[str4].ToString();
                 if (str4.Equals("Transceiver"))
                 {
                     Transceiver transceiver = new Transceiver();
                     transceiver.Name = value;
                     data.Parent = transceiver;
                 }
                 if (str4.Equals("Reception"))
                 {
                     if (match == null)
                     {
                         match = delegate (ReceptionEquipment re) {
                             return re.Name == value;
                         };
                     }
                     data.Reception = this.m_Model.TrafficForNetEntity.ReceptionEquipmentList.Find(match);
                 }
                 if (str4.Equals("FreqBand"))
                 {
                     FrequencyBand band = this.m_Model.LteFreBandCol.FindFrequencyBandByName(value);
                     data.FreqBand = band;
                 }
             }
             this.ReComPropModel(data);
             list.Add(data);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog(string.Concat(new object[] { "Cells: Rows=(", i, ")", colName, "Error" }), Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Warn(exception.Message);
         }
     }
     return list;
 }
Exemplo n.º 25
0
 private int UpdateCalcRadius(int calcRadius, PropModelConfig pmc)
 {
     if (calcRadius < pmc.CalcRadius)
     {
         calcRadius = pmc.CalcRadius;
     }
     return calcRadius;
 }
Exemplo n.º 26
0
 private void ConvertXLSToRepeater(SubsystemDataImple systemDateImple, XlsTable xlsNetWorkTable)
 {
     Dictionary<string, string> xlsNameToProper = new Dictionary<string, string>();
     XLSProConst.RepeatersToObj(xlsNameToProper);
     List<Repeater> list = new List<Repeater>();
     for (int i = 0; i < xlsNetWorkTable.Data.Rows.Count; i++)
     {
         DataRow row = xlsNetWorkTable.Data.Rows[i];
         try
         {
             Repeater item = new Repeater();
             item.Name = row["Name"].ToString();
             item.Active = bool.Parse(row["Active"].ToString());
             item.DX = double.Parse(row["DX(m)"].ToString());
             item.DY = double.Parse(row["DY(m)"].ToString());
             item.LinkType = (RepeaterLinkType) Enum.Parse(typeof(RepeaterLinkType), row["Link Type"].ToString());
             item.LinkLoss = float.Parse(row["Link Loss(dB)"].ToString());
             item.LinkDelay = float.Parse(row["Link Delay(dB)"].ToString());
             item.UlTotalGain = float.Parse(row["Upload Total Gain(dB)"].ToString());
             item.DlTotalGain = float.Parse(row["Download Total Gain(dB)"].ToString());
             item.Comments = row["Comment"].ToString();
             item.DonorAntConfig = new AntConfig();
             AntConfig config = new AntConfig();
             config.OutdoorAntenna = this.m_Model.Antennas.FindAntennaByName(row["Antenna Donor side"].ToString());
             config.Feeder = this.m_Model.FeederColl.FindFeederByName(row["Feeder Donor Side"].ToString());
             config.UlFeederLength = float.Parse(row["Feeder Length Tansmission(Donor)"].ToString());
             config.DlFeederLength = float.Parse(row["Feeder Length Reception(Donor)"].ToString());
             config.Height = float.Parse(row["Antenna Height(Donor)(m)"].ToString());
             config.Azimuth = float.Parse(row["Azimuth(Donor)"].ToString());
             config.Tilt = float.Parse(row["Mechanical Downtilt(Donor)"].ToString());
             item.DonorAntConfig = config;
             AntConfig config2 = new AntConfig();
             config2.OutdoorAntenna = this.m_Model.Antennas.FindAntennaByName(row["Antenna Coverage Side"].ToString());
             config2.Feeder = this.m_Model.FeederColl.FindFeederByName(row["Feeder Coverage Side"].ToString());
             config2.UlFeederLength = float.Parse(row["Feeder Length Transmission(Coverage)"].ToString());
             config2.DlFeederLength = float.Parse(row["Feeder Length Reception(Coverage)"].ToString());
             config2.Height = float.Parse(row["Antenna Height(Coverage)(m)"].ToString());
             config2.Azimuth = float.Parse(row["Azimuth(Coverage)"].ToString());
             config2.Tilt = float.Parse(row["Mechanical Downtilt(Coverage)"].ToString());
             item.ConverageAntConfig = config2;
             item.Equipment = this.m_Model.RepeaterEquipCollection.GetRepeaterEquipByName(row["Equipment"].ToString());
             item.PropModels = new List<PropModelConfig>();
             PropModelConfig config3 = new PropModelConfig();
             config3.PropModelID = NECommon.GetPropIDByName(row["Main propagation model"].ToString(), this.m_Model.PropagetionColl.GetPropagationModelList());
             config3.CalcRadius = int.Parse(row["Main calculation radius (m)"].ToString());
             config3.CalcResolution = int.Parse(row["Main resolution"].ToString());
             item.PropModels.Add(config3);
             if (row["Extended propagation model"].ToString() != string.Empty)
             {
                 PropModelConfig config4 = new PropModelConfig();
                 config4.PropModelID = NECommon.GetPropIDByName(row["Extended propagation model"].ToString(), this.m_Model.PropagetionColl.GetPropagationModelList());
                 config4.CalcRadius = int.Parse(row["Extended calculation radius (m)"].ToString());
                 config4.CalcResolution = int.Parse(row["Extended resolution"].ToString());
                 item.PropModels.Add(config4);
             }
             foreach (string str2 in xlsNameToProper.Keys)
             {
                 string str3 = row[str2].ToString();
                 if (str2.Equals("Donor Cell"))
                 {
                     Transceiver transceiver = new Transceiver();
                     transceiver.Name = str3;
                     item.Parent = transceiver;
                 }
             }
             list.Add(item);
         }
         catch (Exception exception)
         {
             this.m_Model.EventVierService.WriteLog("Repeaters Table's " + (i + 1) + "row import error", Huawei.UNet.Frame.Interface.LogLevel.Warning);
             WriteLog.Logger.Error(exception.StackTrace);
         }
     }
     systemDateImple.LTERepeater = list;
 }