Boy_Scouts_Scheduler.GreedyAlgorithm.GreedyScheduler.scheduleGroupToStationAtDaySlot C# (CSharp) 메소드

scheduleGroupToStationAtDaySlot() 개인적인 정적인 메소드

private static scheduleGroupToStationAtDaySlot ( int groupSelected, int stationSelected, int Day, int Slot, int constraintIndex, int prefIndex ) : void
groupSelected int
stationSelected int
Day int
Slot int
constraintIndex int
prefIndex int
리턴 void
        private static void scheduleGroupToStationAtDaySlot(int groupSelected, int stationSelected, int Day, int Slot, int constraintIndex, int prefIndex)
        {
            // Group is busy in this slot
            isGroupBusy[Day, Slot, groupSelected] = true;
            // Increment group activites
            GroupAssignments[groupSelected]++;
            // Assign the Group to the station
            GroupStationAssignments[groupSelected, stationSelected]++;
            // Assign the Group's rank to the station
            GroupRankStationAssignments[AllGroups[groupSelected].Rank, stationSelected]++;

            StationSlotAssignmentsCounts[stationSelected, Day, Slot]++;
            StationAssignmentsCounts[stationSelected]++;

            if (constraintIndex != -1)
            {
                if (GroupStationAssignments[groupSelected, stationSelected] == AllConstraints[constraintIndex].nVisits)
                    ConstraintMet[constraintIndex] = true;
            }
            else if (prefIndex != -1)
            {
                AllGroups[groupSelected].nStationsPicked++;
                AllGroups[groupSelected].StationPicked[prefIndex] = true;
            }

            masterSchedule[Day, Slot].Add(groupSelected, stationSelected);

            lastDaySlotAssignedToStation[groupSelected, stationSelected] = new KeyValuePair<int, int>(Day, Slot);

            if (AllStations[stationSelected].isActivityPin)
            {
                isGroupBusy[Day, Slot + 1, groupSelected] = true;
                masterSchedule[Day, Slot + 1].Add(groupSelected, stationSelected);
                StationSlotAssignmentsCounts[stationSelected, Day, Slot + 1]++;
                lastDaySlotAssignedToPin[groupSelected] = new KeyValuePair<int, int>(Day, Slot);
            }
        }