public Transact Leave() { Transact onExit = _queue.Pop(); onExit.AddLog(new TransactLog(_time, EventTypeEnum.LeaveQueue)); return(onExit); }
public void Enter(Transact transact) { transact.AddLog(new TransactLog(_time, EventTypeEnum.EnterServer)); IsFree = false; _currentTransact = transact; NextReleaseTime = new ModelTime() { Time = _time.Time + (_currentTransact.Type == TransactTypeEnum.Atype ? _aTypeGenerator.Next() : _bTypeGenerator.Next()) }; }
public Transact Leave() { _currentTransact.AddLog(new TransactLog(_time, EventTypeEnum.LeaveServer)); IsFree = true; return(_currentTransact); }
public void Enter(Transact transact) { transact.AddLog(new TransactLog(_time, EventTypeEnum.EnterQueue)); _queue.Push(transact); }
public void DrainTransact(Transact transact) { transact.AddLog(new TransactLog(_time, EventTypeEnum.Death)); DrainedTransacts.Add(transact); }