예제 #1
0
        //TODO: allow choice of chairs
        internal CaseBoard GetAllocation(
            AppealCase appealCase,
            Member chair,
            IEnumerable <Member> possibleRapporteurs,
            IEnumerable <Member> possibleSecondMembers)
        {
            Member rapporteur;
            Member second;

            rapporteur = _getMemberWithFewestAllocations(
                possibleRapporteurs
                .Where(x => x != chair));
            second = _getMemberWithFewestAllocations(
                possibleSecondMembers
                .Where(x => x != chair && x != rapporteur));

            _allocationCount[chair]++;
            _allocationCount[rapporteur]++;
            _allocationCount[second]++;


            return(new CaseBoard(
                       new ChairWorker(chair),
                       new RapporteurWorker(rapporteur),
                       new SecondWorker(second)
                       ));
        }
예제 #2
0
        internal override void ScheduleOP(Hour currentHour, AppealCase appealCase, CaseBoard workers)
        {
            WorkCase opCase = new OPCase(appealCase, workers);

            opCase.LogEnqueued(currentHour);
            _opSchedule.Schedule(currentHour, appealCase, workers);
        }
예제 #3
0
 internal WorkCaseCommon(AppealCase appealCase, CaseBoard workers)
 {
     _case      = appealCase ?? throw new ArgumentException("appealCase may not be null");
     _caseBoard = workers ?? throw new ArgumentException("workers may not be null");
     _setupWorkerQueue(workers);
     _setupWork();
 }
예제 #4
0
        internal override void ProcessNewCase(AppealCase appealCase, Hour currentHour)
        {
            CaseBoard allocation =
                _allocator.GetAllocation(
                    appealCase,
                    Chair,
                    Technicals,
                    _getSecondMemberChoices());

            WorkCase summonsCase = new SummonsCase(appealCase, allocation);

            _registrar.ProcessNewSummons(summonsCase);
            _registrar.CirculateCases(currentHour);
        }
예제 #5
0
 internal abstract void ProcessNewCase(AppealCase appealCase, Hour currentHour);
예제 #6
0
 public OPCase(AppealCase appealCase, CaseBoard workers)
     : base(appealCase, workers)
 {
 }
예제 #7
0
 public DecisionCase(AppealCase appealCase, CaseBoard workers)
     : base(appealCase, workers)
 {
 }
예제 #8
0
 internal SummonsCase(AppealCase appealCase, CaseBoard workers)
     : base(appealCase, workers)
 {
 }
예제 #9
0
 internal abstract void ScheduleOP(Hour currentHour, AppealCase appealCase, CaseBoard workers);
예제 #10
0
 internal abstract void Schedule(Hour startHour, AppealCase appealCase, CaseBoard caseBoard);