public void UpdateInfo(IAdmissionCarrier iSourceCarrier, IAdmissionCarrier iTargetCarrier, IAdmissionUser user, int carrierIndex) { iSourceCarrier.IsDLLoadBalance = true; iTargetCarrier.IsDLLoadBalance = true; SimulationUser user2 = user as SimulationUser; SimulationCarrier carrier = iTargetCarrier as SimulationCarrier; AdmissionCellTag admissionCarrierTag = iSourceCarrier.AdmissionCarrierTag as AdmissionCellTag; AdmissionCellTag tag2 = iTargetCarrier.AdmissionCarrierTag as AdmissionCellTag; base.ExchangeServiceCarrier(iSourceCarrier, iTargetCarrier, user, carrierIndex); if (iTargetCarrier.Carrier.ID == user2.BestServiceCellBeforeHandOver.Carrier.Carrier.ID) { user2.IsEdgeUser = user2.IsEdgeUserBeforeHandOver; } else { user2.IsEdgeUser = true; } if (user.ServiceCount == 0) { admissionCarrierTag.DLHasOutThroughput += user.DlMacMinThroughputDemand; tag2.DLAcceptHOThroughput += user.DlMacMinThroughputDemand; } else { admissionCarrierTag.DLHasOutThroughput += user2.ActualAvgBr; tag2.DLAcceptHOThroughput += user2.ActualAvgBr; } tag2.DLAvailableHOThroughput = tag2.DLTotalHOThroughput - tag2.DLAcceptHOThroughput; base.UpdateHOUserInfo(user2, base.m_CurrentTTI); }
public override bool IsNgbAcceptUser(IAdmissionUser user, IAdmissionCarrier carrier) { AdmissionCellTag admissionCarrierTag = carrier.AdmissionCarrierTag as AdmissionCellTag; bool flag = false; double num = admissionCarrierTag.DLAcceptHOThroughput + user.DlMacMinThroughputDemand; if (num <= admissionCarrierTag.DLTotalHOThroughput) { flag = this.IsNgbSatisAcceptUser(user, carrier); } return flag; }
/// <summary> /// 判断目标邻小区是否可以接受预切换过来的用户 /// </summary> /// <param name="user"></param> /// <param name="carrier"></param> /// <returns></returns> public override bool IsNgbAcceptUser(IAdmissionUser user, IAdmissionCarrier carrier) { AdmissionCellTag admissionCarrierTag = carrier.AdmissionCarrierTag as AdmissionCellTag; bool flag = false; UnionPsService unionPsService = SimulationTools.GetUnionPsService(user.LTEUser.Service); double num = admissionCarrierTag.ULAcceptHOThroughput + unionPsService.UlMinThroughputDemand; if (num <= admissionCarrierTag.ULTotalHOThroughput) { flag = this.IsNgbSatisAcceptUser(carrier); } return flag; }
/// <summary> /// 判断该数据用户是否掉线,并进行用户状态设置 /// </summary> /// <param name="dataUser"></param> /// <param name="offLineUserList"></param> /// <param name="dataWaitUserList"></param> public void OfflineDataUser(IAdmissionUser dataUser, List<ISimulationUser> offLineUserList, List<ISimulationUser> dataWaitUserList) { bool flag = false; if (dataUser.ServiceCount == 0) { flag = (this.m_CurrentTTI - dataUser.AccessTti) >= this.m_OfflineThresholdParam.DataDropThreshold; } if (flag) { dataUser.State = State.OffLine; dataUser.PreScheduleTime = (short) this.m_CurrentTTI; dataUser.FailReason = FailReason.CallDrop; offLineUserList.Add(dataUser); dataWaitUserList.Remove(dataUser); } }
/// <summary> /// 判断该语音用户是否掉线,并进行用户状态设置 /// </summary> /// <param name="voiceUser"></param> /// <param name="offlineUserList"></param> /// <param name="waitUserList"></param> private void OfflineVoiceUser(IAdmissionUser voiceUser, List<ISimulationUser> offlineUserList, List<ISimulationUser> waitUserList) { bool flag = false; if (voiceUser.ServiceCount == 0) { flag = (this.m_CurrentTTI - voiceUser.AccessTti) >= this.m_OfflineThresholdParam.VoiceDropThreshold; } else if (voiceUser.VoiceMaxContinueLost > this.m_OfflineThresholdParam.VoiceDropLossThrshold) { flag = true; } if (flag) { voiceUser.State = State.OffLine; voiceUser.PreScheduleTime = (short) this.m_CurrentTTI; voiceUser.FailReason = FailReason.CallDrop; offlineUserList.Add(voiceUser); waitUserList.Remove(voiceUser); } }
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(); }
/// <summary> /// 交换服务小区 /// </summary> /// <param name="iSourceCarrier"></param> /// <param name="iTargetCarrier"></param> /// <param name="user"></param> /// <param name="targetCarrierIndex"></param> public void ExchangeServiceCarrier(IAdmissionCarrier iSourceCarrier, IAdmissionCarrier iTargetCarrier, IAdmissionUser user, int targetCarrierIndex) { SimulationUser simulationUser = user as SimulationUser; if (iSourceCarrier.Carrier.ID.Equals(simulationUser.BestServiceCarrier.Carrier.ID)) { simulationUser.CarrierListInComputeArea[0] = simulationUser.CarrierListInComputeArea[targetCarrierIndex]; simulationUser.CarrierListInComputeArea[1] = simulationUser.BestServiceCellBeforeHandOver; if (targetCarrierIndex != 1) { simulationUser.CarrierListInComputeArea[targetCarrierIndex] = simulationUser.StroNbrBeforeHandOver; } } else if (iSourceCarrier.Carrier.ID.Equals(simulationUser.StroNbrBeforeHandOver.Carrier.Carrier.ID)) { simulationUser.CarrierListInComputeArea[0] = simulationUser.CarrierListInComputeArea[targetCarrierIndex]; simulationUser.CarrierListInComputeArea[targetCarrierIndex] = simulationUser.StroNbrBeforeHandOver; } else if (iTargetCarrier.Carrier.ID.Equals(simulationUser.BestServiceCarrier.Carrier.ID)) { int carrierIndex = 0; short iD = simulationUser.StroNbrBeforeHandOver.Carrier.Carrier.ID; this.IsCarrierInUserNgbList(simulationUser, iD, out carrierIndex); simulationUser.CarrierListInComputeArea[carrierIndex] = simulationUser.CarrierListInComputeArea[0]; simulationUser.CarrierListInComputeArea[0] = simulationUser.BestServiceCellBeforeHandOver; simulationUser.CarrierListInComputeArea[1] = simulationUser.StroNbrBeforeHandOver; } else { CarrierTotalLoss loss = simulationUser.CarrierListInComputeArea[targetCarrierIndex]; simulationUser.CarrierListInComputeArea[targetCarrierIndex] = simulationUser.CarrierListInComputeArea[0]; simulationUser.CarrierListInComputeArea[0] = loss; } simulationUser.DlRsrp = simulationUser.CarrierListInComputeArea[0].Carrier.RSPower - SimulationTools.ConvertLineTodB(simulationUser.CarrierListInComputeArea[0].DlTotalLoss); simulationUser.UlRsLevel = ((simulationUser.LTEUser.Terminal.NetTerminalList[0] as LTETerminal).MaxTxPower - SimulationTools.ConvertLineTodB(12f)) - SimulationTools.ConvertLineTodB(simulationUser.CarrierListInComputeArea[0].UlTotalLoss); simulationUser.SfSbStroRsrp = simulationUser.CarrierListInComputeArea[1].Carrier.RSPower - SimulationTools.ConvertLineTodB(simulationUser.CarrierListInComputeArea[1].DlTotalLoss); }
public void MyTestInitialize() { m_VoicewaitUserList = new List<ISimulationUser>(); SimulationUser ue1 = new SimulationUser(); m_VoicewaitUserList.Add(ue1); m_OfflineUserList = new List<ISimulationUser>(); m_OfflineUserList.Add(ue1); m_OffLineVUService = new OfflineService(m_CurrentTTI, m_OfflineThresholdParam ); m_DataWaitUserList = new List<ISimulationUser>(); m_GBRUserList = new List<ISimulationUser>(); m_OfflineUserList = new List<ISimulationUser>(); m_DataWaitUserList.Add(ue1); m_GBRUserList.Add(ue1); m_OfflineUserList.Add(ue1); m_OffLineDUService = new OfflineService(m_CurrentTTI, m_OfflineThresholdParam); m_DataUser = new SimulationUser(); SimulationUser DU1 = new SimulationUser(); m_OfflineThresholdParam = new OfflineThresholdParam(); m_OfflineDU = new OfflineService(m_CurrentTTI, m_OfflineThresholdParam); m_CurrentTTI = 1000; }
/// <summary> /// 更新信息 /// </summary> /// <param name="iSourceCarrier"></param> /// <param name="iTargetCarrier"></param> /// <param name="user"></param> /// <param name="carrierIndex"></param> public void UpdateInfo(IAdmissionCarrier iSourceCarrier, IAdmissionCarrier iTargetCarrier, IAdmissionUser user, int carrierIndex) { iSourceCarrier.IsULLoadBalance = true; iTargetCarrier.IsULLoadBalance = true; SimulationUser simUser = user as SimulationUser; SimulationCarrier targetCarrier = iTargetCarrier as SimulationCarrier; CarrierTotalLoss loss = simUser.CarrierListInComputeArea[0]; base.ExchangeServiceCarrier(iSourceCarrier, iTargetCarrier, user, carrierIndex); if (iTargetCarrier.Carrier.ID == simUser.BestServiceCarrier.Carrier.ID) { simUser.IsEdgeUser = simUser.IsEdgeUserBeforeHandOver; } else { simUser.IsEdgeUser = true; } AdmissionCellTag admissionSourceCarrierTag = iSourceCarrier.AdmissionCarrierTag as AdmissionCellTag; AdmissionCellTag targetCarrierTag = iTargetCarrier.AdmissionCarrierTag as AdmissionCellTag; if (user.ServiceCount == 0) { admissionSourceCarrierTag.ULHasOutThroughput += user.UlMacMinThroughputDemand; targetCarrierTag.ULAcceptHOThroughput += user.UlMacMinThroughputDemand; } else { admissionSourceCarrierTag.ULHasOutThroughput += simUser.ActualAvgBr; targetCarrierTag.ULAcceptHOThroughput += simUser.ActualAvgBr; } targetCarrierTag.ULAvailableHOThroughput = targetCarrierTag.ULTotalHOThroughput - targetCarrierTag.ULAcceptHOThroughput; base.UpdateHOUserInfo(simUser, base.m_CurrentTTI); }
public void MyTestInitialize() { m_NgbCarrierList = new List<ISimulationCarrier>(); m_AdCarrier1 = new SimulationCarrier(); m_AdCarrier2 = new SimulationCarrier(); m_AdCarrier1.AdmissionCarrierTag = new AdmissionCellTag(); m_AdCarrier2.AdmissionCarrierTag = new AdmissionCellTag(); m_LbThresHoldParam = new LBThresholdParam(); m_SUser1 = new SimulationUser(); m_SUser2 = new SimulationUser(); m_SUser1.AdmissionUserTag = new SimulationUser(); m_SUser2.AdmissionUserTag = new SimulationUser(); m_AdmissionCarrier = new SimulationCarrier(); LTECell ltecarrier = new LTECell(); m_AdmissionCarrier.Carrier = ltecarrier; m_AdCarrier1.Carrier = ltecarrier; m_AdCarrier2.Carrier = ltecarrier; FrequencyBand freband = new FrequencyBand(); freband.BandWidth = 100; ltecarrier.FreqBand = freband; m_AdmissionCarrier.AdmissionCarrierTag = new AdmissionCellTag(); m_Lbth = new LBThresholdParam(); m_DLLB = new DlLoadBalancingService(m_CurrentTTI, m_Lbth); m_LbUserList = new List<ISimulationUser>(); m_User1 = new SimulationUser(); m_User2 = new SimulationUser(); m_LbUserList.Add(m_User1); m_LbUserList.Add(m_User2); m_DlDataWaitUserList = new List<ISimulationUser>(); m_DlDataWaitUserList.Add(m_SUser1); m_DlDataWaitUserList.Add(m_SUser2); m_AdmissionCarrier.DlDataWaitUserList = m_DlDataWaitUserList; m_DlVoiceWaitUserList = new List<ISimulationUser>(); m_DlVoiceWaitUserList.Add(m_SUser1); m_DlVoiceWaitUserList.Add(m_SUser2); m_AdmissionCarrier.DlVoiceWaitUserList = m_DlVoiceWaitUserList; m_NgbList = new List<ISimulationCarrier>(); RelayCell relaycarrier = new RelayCell(); LteAlgParam ltealgparam = new LteAlgParam(); m_AdmissionCarrier.Carrier = relaycarrier; m_AdCarrier1.Carrier = relaycarrier; m_AdCarrier2.Carrier = relaycarrier; m_DlUserList = new List<ISimulationUser>(); m_DlUserList.Add(m_SUser1); m_DlUserList.Add(m_SUser2); m_AdmissionCarrier.DlUserList = m_DlUserList; m_CarrierListInComputerArea = new CarrierTotalLoss(); List<CarrierTotalLoss> listcarrier1 = new List<CarrierTotalLoss>(); CarrierTotalLoss a = new CarrierTotalLoss(); CarrierTotalLoss b = new CarrierTotalLoss(); listcarrier1.Add(a); listcarrier1.Add(b); SimulationCarrier carrier = new SimulationCarrier(); ((SimulationUser)m_SUser1).CarrierListInComputeArea = listcarrier1.ToArray(); ((SimulationUser)m_SUser2).CarrierListInComputeArea = listcarrier1.ToArray(); ((SimulationUser)m_SUser1).CarrierListInComputeArea[0].Carrier = carrier; ((SimulationUser)m_SUser2).CarrierListInComputeArea[0].Carrier = carrier; ((SimulationUser)m_SUser1).CarrierListInComputeArea[1].Carrier = carrier; ((SimulationUser)m_SUser2).CarrierListInComputeArea[1].Carrier = carrier; ((SimulationUser)m_SUser1).CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier; ((SimulationUser)m_SUser2).CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier; ((SimulationUser)m_SUser1).CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier; ((SimulationUser)m_SUser2).CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier; m_User1.CarrierListInComputeArea = listcarrier1.ToArray(); m_User2.CarrierListInComputeArea = listcarrier1.ToArray(); m_User1.CarrierListInComputeArea[0].Carrier = carrier; m_User2.CarrierListInComputeArea[0].Carrier = carrier; m_User1.CarrierListInComputeArea[1].Carrier = carrier; m_User2.CarrierListInComputeArea[1].Carrier = carrier; m_User1.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier; m_User2.CarrierListInComputeArea[0].Carrier.Carrier = relaycarrier; m_User1.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier; m_User2.CarrierListInComputeArea[1].Carrier.Carrier = relaycarrier; m_User1.BestServiceCellBeforeHandOver = a; m_User1.StroNbrBeforeHandOver = b; m_User2.BestServiceCellBeforeHandOver = a; m_User2.StroNbrBeforeHandOver = b; m_CarrierListInComputerArea.Carrier = carrier; relaycarrier.RSPower = 100; }
private bool IsNgbSatisAcceptUser(IAdmissionUser user, IAdmissionCarrier carrier) { AdmissionCellTag admissionCarrierTag = carrier.AdmissionCarrierTag as AdmissionCellTag; return (((admissionCarrierTag.DLVoiceSatisfication > SimulationConstant.LBVoiceSatisfyTh) && (admissionCarrierTag.DLGBRSatisfication > SimulationConstant.LBGBRSatisfyTh)) && (admissionCarrierTag.DLNonGBRSatisfication > SimulationConstant.LBNonGBRSatisfyTh)); }
public abstract bool IsNgbAcceptUser(IAdmissionUser user, IAdmissionCarrier carrier);
/// <summary> /// 判断用户的参考信号的接收功率 /// </summary> /// <param name="iAdmissionUser"></param> /// <returns></returns> public bool JudgeUserRSRP(IAdmissionUser iAdmissionUser) { SimulationUser user = iAdmissionUser as SimulationUser; float strongNgbRSRP = this.GetStrongNgbRSRP(user.CarrierListInComputeArea); if (strongNgbRSRP < SimulationConstant.DLRSRP_ACCESS_THRESHOLD) { return false; } float num2 = user.CarrierListInComputeArea[0].Carrier.RSPower - SimulationTools.ConvertLineTodB(user.CarrierListInComputeArea[0].DlTotalLoss); return ((num2 - strongNgbRSRP) < SimulationConstant.MLBRSRPDiffTh); }
public abstract bool IsLBUser(IAdmissionUser iAdmissionUser);
/// <summary> /// 判断当前用户是不是需要负载均衡的用户 /// </summary> /// <param name="iAdmissionUser"></param> /// <returns></returns> public override bool IsLBUser(IAdmissionUser iAdmissionUser) { SimulationUser user = iAdmissionUser as SimulationUser; return (!(user.IsTTIBunlingUser || user.IsVMIMOUser) && base.JudgeUserRSRP(iAdmissionUser)); }