Example #1
0
 public MonteCarloSnapResult Calculate(SimulationDataManager data, int start, int end)
 {
     MonteCarloSnapResult snapResult = new MonteCarloSnapResult();
     List<ISimulationUser> simulationUserList = data.SimulationUserList;
     snapResult.UserNum = simulationUserList.Count;
     snapResult.UlUserNum = data.UlUserNum;
     snapResult.DlUserNum = data.DlUserNum;
     Dictionary<string, List<SimulationUser>> serviceUserListDic = new Dictionary<string, List<SimulationUser>>();
     foreach (SimulationUser user in simulationUserList)
     {
         this.CaculateService(serviceUserListDic, user);
         this.CalculateUserInfo(user, snapResult, start, end);
     }
     snapResult.StatSimuServiceResultList = new StatSimuServiceCalculator(start, end).SnapshotCalculator(serviceUserListDic);
     return snapResult;
 }
Example #2
0
 private void InitUserState(ISimulationUser user, SimulationDataManager dataManager)
 {
     if (user.LTEUser.LinkType == LinkType.Uplink)
     {
         dataManager.UlUserNum++;
     }
     else
     {
         dataManager.DlUserNum++;
     }
     user.State = State.NoCover;
 }