private List<Transceiver> CreatTranceiverList() { List<Transceiver> trancList = new List<Transceiver>(); int count = 3; for (int i = 0; i < count;i++) { Transceiver temp = new Transceiver(); IACell cell = new GSMTRX(); temp.addCarrier(cell); trancList.Add(temp); } return trancList; }
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); } }
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); }
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); }