/// <summary> /// method to check if the total number of students is >= the capacity of the lokale /// </summary> /// <param name="room">a room</param> /// <param name="course">the current course to be scheduled</param> /// <returns>true if the room has enough space for the course and false otherwise</returns> public bool RoomHasCapacity(Lokale room, Kursus course) { List <int> holdCountList = HoldCount(course); int totalSumOfHold = holdCountList.Sum(); return(room.LokaleCapacity >= totalSumOfHold); //return room.LokaleCapacity >= course.HoldObjs.Select(h => h.HoldAntal).Sum(); }
public bool LokaleHarMangel(Lokale _lokale) { var _mangel = Mangler; foreach (var _fejl in _mangel) { if (_fejl.lokale == _lokale.lokale) { return(true); } } return(false); }