Ejemplo n.º 1
0
        internal void Add(Hour hour, BoardReport report)
        {
            if (_reports.ContainsKey(hour))
            {
                throw new InvalidOperationException("SimulationReports.Add: hour has already been recorded.");
            }

            _reports.Add(hour, report);
        }
Ejemplo n.º 2
0
        public void Run()
        {
            foreach (Hour hour in _timeSpan)
            {
                if (_arrivingCases.ContainsKey(hour))
                {
                    for (int i = 0; i < _arrivingCases[hour]; i++)
                    {
                        _board.ProcessNewCase(new AppealCase(), hour);
                    }
                }

                BoardReport report = _board.DoWork(hour);
                _reports.Add(hour, report);
            }
        }
Ejemplo n.º 3
0
        internal override BoardReport DoWork(Hour currentHour)
        {
            BoardReport boardReport = new BoardReport(_members);

            _registrar.DoWork(currentHour);

            foreach (Member member in _members)
            {
                //working
                AllocatedCase currentCase = _registrar.GetCurrentCase(currentHour, member);
                WorkReport    report      = _memberWork(currentHour, currentCase, member);
                boardReport.Add(member, report);

                //boardReport.Add(member, _memberWork(currentHour, member));
            }

            return(boardReport);
        }