public TimetableData(Block[] blocks, Course[] courses, Lecturer[] lecturers, Room[] rooms, Group[] groups)
            : base()
        {
            this.Blocks = blocks;
            this.Courses = courses;
            this.Lecturers = lecturers;
            this.Rooms = rooms;
            this.Groups = groups;

            Array.Sort(courses, SortCoursesByLength);
        }
Example #2
0
        public Course(string id, string name, Lecturer[] lecturers, Room roomPreference, Group group, bool needsLab, bool isDummy, /*int repeatsPerWeek,*/ int numberOfBlocks)
        {
            this.Id = id;
            this.Name = name;
            this.Lecturers = lecturers;
            this.RoomPreference = roomPreference;
            this.NeedsLab = needsLab;
            this.IsDummy = isDummy;
            this.NumberOfBlocks = numberOfBlocks;
            this.Group = group;

            Index = globalIndex;
            globalIndex++;
        }
 private static int GetExpectedCourseCountForGroup(Group group, TimetableData ttData)
 {
     int count = 0;
     for (int cIndex = 0; cIndex < ttData.Courses.Length; cIndex++)
     {
         if (ttData.Courses[cIndex].Group.Index == group.Index)
             count += ttData.Courses[cIndex].NumberOfBlocks;
     }
     return count;
 }