You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(275) |
Jul
(81) |
Aug
(19) |
Sep
(26) |
Oct
(190) |
Nov
(118) |
Dec
(16) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(9) |
Feb
(318) |
Mar
(251) |
Apr
(354) |
May
(209) |
Jun
(261) |
Jul
(226) |
Aug
(136) |
Sep
(156) |
Oct
(30) |
Nov
(5) |
Dec
(13) |
| 2009 |
Jan
(26) |
Feb
(35) |
Mar
(63) |
Apr
(21) |
May
(26) |
Jun
(33) |
Jul
(55) |
Aug
(71) |
Sep
(23) |
Oct
(40) |
Nov
(18) |
Dec
(13) |
| 2010 |
Jan
(17) |
Feb
(98) |
Mar
(39) |
Apr
(25) |
May
(107) |
Jun
(257) |
Jul
(270) |
Aug
(206) |
Sep
(237) |
Oct
(187) |
Nov
(302) |
Dec
(187) |
| 2011 |
Jan
(63) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Nightly B. <no...@un...> - 2010-12-15 23:51:09
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-15 23:33:26
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21142/JavaSource/org/unitime/timetable/action Modified Files: SolutionChangesAction.java Log Message: Changes page (course timetabling solver) - check both assignments for rooms - this fixes the problem when selected solution had no room assigned (no room change was shown even when the new solution had a room assigned) Index: SolutionChangesAction.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/action/SolutionChangesAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SolutionChangesAction.java 1 Dec 2010 11:10:47 -0000 1.4 --- SolutionChangesAction.java 15 Dec 2010 23:33:18 -0000 1.5 *************** *** 158,165 **** String rooms = ""; String link = (before==null?null:"id="+before.getClazz().getClassId()+"&days="+before.getTime().getDays()+"&slot="+before.getTime().getStartSlot()+"&pattern="+before.getTime().getPatternId()); ! for (int i=0;i<(before==null?(after.getRoom()==null?0:after.getRoom().length):(before.getRoom()==null?0:before.getRoom().length));i++) { if (i>0) rooms += ", "; ! rooms += (ClassAssignmentDetails.dispRoom2((before==null || before.getRoom().length<=i?null:before.getRoom()[i]),(after==null || after.getRoom().length<=i?null:after.getRoom()[i]))); ! if (before!=null) link += "&room"+i+"="+before.getRoom()[i].getId(); } --- 158,168 ---- String rooms = ""; String link = (before==null?null:"id="+before.getClazz().getClassId()+"&days="+before.getTime().getDays()+"&slot="+before.getTime().getStartSlot()+"&pattern="+before.getTime().getPatternId()); ! int nrRooms = Math.max(before == null || before.getRoom() == null ? 0 : before.getRoom().length, after == null || after.getRoom() == null ? 0 : after.getRoom().length); ! for (int i=0;i<nrRooms;i++) { if (i>0) rooms += ", "; ! rooms += (ClassAssignmentDetails.dispRoom2( ! (before==null || before.getRoom()==null || before.getRoom().length<=i ? null : before.getRoom()[i]), ! (after==null || after.getRoom()==null || after.getRoom().length<=i ? null : after.getRoom()[i]))); ! if (before!=null && before.getRoom()!=null && before.getRoom().length>i) link += "&room"+i+"="+before.getRoom()[i].getId(); } |
|
From: Tomas M. <to...@us...> - 2010-12-15 23:31:47
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20821/JavaSource/org/unitime/timetable/model Modified Files: TimePatternModel.java Log Message: getNormalizePreferences - ignore days that are completely prohibited Index: TimePatternModel.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/TimePatternModel.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TimePatternModel.java 1 Dec 2010 11:10:39 -0000 1.6 --- TimePatternModel.java 15 Dec 2010 23:31:39 -0000 1.7 *************** *** 344,352 **** --- 344,355 ---- for (int i = 0; i < iDays.length; i++) { double nrOfPreferencesThisDay = 0; + boolean prohibitedDay = true; for (int j = 0; j < iMinutes.length; j++) { String p = iPreferences[i][j]; if (PreferenceLevel.sRequired.equalsIgnoreCase(p)) continue; + if (!PreferenceLevel.sProhibited.equalsIgnoreCase(p)) prohibitedDay = false; if (PreferenceLevel.sProhibited.equalsIgnoreCase(p) || Integer.parseInt(p)!=0) nrOfPreferencesThisDay+=increment; } + if (prohibitedDay) continue; nrOfPreferences = Math.max(nrOfPreferences,nrOfPreferencesThisDay); } |
|
From: Tomas M. <to...@us...> - 2010-12-15 19:34:20
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2966/WebContent/help Modified Files: Release-Notes.xml Log Message: added recent changes Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Release-Notes.xml 3 Dec 2010 19:46:51 -0000 1.74 --- Release-Notes.xml 15 Dec 2010 19:34:12 -0000 1.75 *************** *** 28,32 **** <release-date>@release.date@</release-date> <category> ! <title>Bug fixes and improvements</title> <item> <name>Instructional Offering Cross Lists</name> --- 28,32 ---- <release-date>@release.date@</release-date> <category> ! <title>User interface</title> <item> <name>Instructional Offering Cross Lists</name> *************** *** 41,49 **** </item> <item> ! <name>Course Timetabling -- Suggestions</name> <description> ! <line>In computation of suggestions -- check that the tested value is not among conflicting ! <line>This may happen with the recent improvement of meet with constraint as for instance the class cannot be assigned into a room that is not big enough for all the meet with classes</line> ! </line> </description> </item> --- 41,54 ---- </item> <item> ! <name>Class Assignment</name> <description> ! <line>Check instructor conflicts using actual class instructors (not what is saved with the committed solution)</line> ! <line>When application property tmtbl.classAssign.allowUnassignment is set to false (defaults to true ~ current behavior), it is not allowed to leave a class unassigned</line> ! </description> ! </item> ! <item> ! <name>Room (allocation) report</name> ! <description> ! <line>If a class can be assigned in rooms of different types, do not count the class as must / should in both room types (rather not count it at all)</line> </description> </item> *************** *** 55,58 **** --- 60,93 ---- </item> </category> + <category> + <title>Data Exchange</title> + <item> + <name>Buildings page, Update Data operation</name> + <description> + <line>Added ability to update existing rooms and buildings (when unitime.external.room.update.existing is set to true, defaults to false). + <line>Global room features are reset when unitime.external.room.update.existing.features is true (defaults to false)</line> + <line>Room department relations from external data are added when unitime.external.room.update.existing.departments is true (defaults to false)</line> + </line> + </description> + </item> + <item> + <name>Course Offering, Course Timetable exports</name> + <description> + <line>Timetable export: fixed the issue when a class was exported multiple times (need to start from top classes only)</line> + <line>Timetable export: class suffix -- use class suffix when present, section number otherwise (course offering export already did that correctly)</line> + <line>Both exports (time element -- export date pattern name, if not default)</line> + </description> + </item> + </category> + <category> + <title>Constraint Solver</title> + <item> + <name>Course Timetabling Solver</name> + <description> + <line>Added ability to automatically spread classes of each subject area in time.</line> + <line>Database loader: added ability to change message level of various messages (mostly warning now)</line> + </description> + </item> + </category> </release> |
|
From: Tomas M. <to...@us...> - 2010-12-15 13:34:46
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/dataexchange In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18562/JavaSource/org/unitime/timetable/dataexchange Modified Files: CourseOfferingExport.java CourseTimetableExport.java Log Message: Course Offering, Course Timetable exports - timetable export: fixed the issue when a class was exported multiple times (need to start from top classes only) - timetable export: class suffix -- use class suffix when present, section number otherwise (course offering export already did that correctly) - both export (time element -- export date pattern name, if not default) Index: CourseTimetableExport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/dataexchange/CourseTimetableExport.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CourseTimetableExport.java 1 Dec 2010 11:10:35 -0000 1.2 --- CourseTimetableExport.java 15 Dec 2010 13:34:38 -0000 1.3 *************** *** 51,55 **** List classes = getHibSession().createQuery( "select distinct c from Class_ as c where " + ! "c.schedulingSubpart.instrOfferingConfig.instructionalOffering.session.uniqueId=:sessionId"). setLong("sessionId",session.getUniqueId().longValue()). setFetchSize(1000).list(); --- 51,55 ---- List classes = getHibSession().createQuery( "select distinct c from Class_ as c where " + ! "c.schedulingSubpart.instrOfferingConfig.instructionalOffering.session.uniqueId=:sessionId and c.parentClass is null"). setLong("sessionId",session.getUniqueId().longValue()). setFetchSize(1000).list(); *************** *** 71,75 **** classElement.addAttribute("courseNbr", course.getCourseNbr()); classElement.addAttribute("type", clazz.getItypeDesc().trim()); ! classElement.addAttribute("suffix", clazz.getSectionNumberString()); for (Iterator i=clazz.getChildClasses().iterator();i.hasNext();) { Class_ childClazz = (Class_)i.next(); --- 71,75 ---- classElement.addAttribute("courseNbr", course.getCourseNbr()); classElement.addAttribute("type", clazz.getItypeDesc().trim()); ! classElement.addAttribute("suffix", (clazz.getClassSuffix()!=null?clazz.getClassSuffix():clazz.getSectionNumberString())); for (Iterator i=clazz.getChildClasses().iterator();i.hasNext();) { Class_ childClazz = (Class_)i.next(); Index: CourseOfferingExport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/dataexchange/CourseOfferingExport.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CourseOfferingExport.java 1 Dec 2010 11:10:35 -0000 1.12 --- CourseOfferingExport.java 15 Dec 2010 13:34:38 -0000 1.13 *************** *** 337,340 **** --- 337,343 ---- timeElement.addAttribute("startTime", startSlot2startTime(time.getStartSlot())); timeElement.addAttribute("endTime", timeLocation2endTime(time)); + DatePattern dp = assignment.getDatePattern(); + if (dp != null && !dp.isDefault()) + timeElement.addAttribute("datePattern", dp.getName()); } } |
|
From: Nightly B. <no...@un...> - 2010-12-14 23:51:23
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-14 19:58:28
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24149/JavaSource/org/unitime/timetable/model Modified Files: DepartmentalInstructor.java Log Message: code cleanup Index: DepartmentalInstructor.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/DepartmentalInstructor.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** DepartmentalInstructor.java 14 Dec 2010 19:44:02 -0000 1.14 --- DepartmentalInstructor.java 14 Dec 2010 19:58:20 -0000 1.15 *************** *** 329,346 **** */ public static List<DepartmentalInstructor> getAllForInstructor(DepartmentalInstructor di, Long sessionId) { - ArrayList<DepartmentalInstructor> ret = new ArrayList<DepartmentalInstructor>(); - if (di == null) return ret; if (di.getExternalUniqueId() == null || di.getExternalUniqueId().trim().isEmpty()) { ret.add(di); return ret; } ! ret.addAll( ! DepartmentalInstructorDAO.getInstance().getSession().createQuery( ! "from DepartmentalInstructor where externalUniqueId=:puid and department.session.uniqueId=:sessionId") .setString("puid", di.getExternalUniqueId()) .setLong("sessionId", sessionId) ! .setCacheable(true).list() ! ); ! return ret; } --- 329,343 ---- */ public static List<DepartmentalInstructor> getAllForInstructor(DepartmentalInstructor di, Long sessionId) { if (di.getExternalUniqueId() == null || di.getExternalUniqueId().trim().isEmpty()) { + ArrayList<DepartmentalInstructor> ret = new ArrayList<DepartmentalInstructor>(1); ret.add(di); return ret; } ! return (List<DepartmentalInstructor>)DepartmentalInstructorDAO.getInstance().getSession().createQuery( ! "from DepartmentalInstructor where externalUniqueId=:puid and " + ! "department.session.uniqueId=:sessionId") .setString("puid", di.getExternalUniqueId()) .setLong("sessionId", sessionId) ! .setCacheable(true).list(); } |
|
From: Tomas M. <to...@us...> - 2010-12-14 19:49:10
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/course/ui In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22629/JavaSource/org/unitime/timetable/solver/course/ui Modified Files: ClassInfoModel.java Log Message: Class Assignment page - check instructor conflicts using actual class instructors (not what is saved with the committed solution) - this is slower, but more precise - when application property tmtbl.classAssign.allowUnassignment is set to false (defaults to true ~ current behavior), it is not allowed to leave a class unassigned Index: ClassInfoModel.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/course/ui/ClassInfoModel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ClassInfoModel.java 1 Dec 2010 11:10:49 -0000 1.11 --- ClassInfoModel.java 14 Dec 2010 19:49:02 -0000 1.12 *************** *** 60,66 **** --- 60,68 ---- import org.unitime.timetable.model.Building; import org.unitime.timetable.model.BuildingPref; + import org.unitime.timetable.model.ClassInstructor; import org.unitime.timetable.model.Class_; import org.unitime.timetable.model.DatePattern; import org.unitime.timetable.model.Department; + import org.unitime.timetable.model.DepartmentalInstructor; import org.unitime.timetable.model.Event; import org.unitime.timetable.model.ExactTimeMins; *************** *** 149,152 **** --- 151,180 ---- if (assignment.getInstructors()!=null) for (ClassInstructorInfo instructor : assignment.getInstructors()) { if (!instructor.isLead()) continue; + // check all departmental instructors with the same external id + for (DepartmentalInstructor di: DepartmentalInstructor.getAllForInstructor(instructor.getInstructor().getInstructor())) { + for (ClassInstructor ci : di.getClasses()) { + if (ci.equals(instructor.getInstructor())) continue; + Assignment a = ci.getClassInstructing().getCommittedAssignment(); + if (a == null) continue; + if (assignment.getTime().overlaps(new ClassTimeInfo(a,0))) { + if (iChange.getCurrent(a.getClassId())==null && iChange.getConflict(a.getClassId())==null) + iChange.getConflicts().add(new ClassAssignment(a)); + } + } + } + /* + // Potential speed-up #1) only check the current department instructors + for (ClassInstructor ci : instructor.getInstructor().getInstructor().getClasses()) { + if (ci.equals(instructor.getInstructor())) continue; + Assignment a = ci.getClassInstructing().getCommittedAssignment(); + if (a == null) continue; + if (assignment.getTime().overlaps(new ClassTimeInfo(a,0))) { + if (iChange.getCurrent(a.getClassId())==null && iChange.getConflict(a.getClassId())==null) + iChange.getConflicts().add(new ClassAssignment(a)); + } + } + */ + /* + // Potential speed-up #2) use instructor assignments from the solution for (Assignment a : instructor.getInstructor().getInstructor().getCommitedAssignments()) { if (assignment.getTime().overlaps(new ClassTimeInfo(a,0))) { *************** *** 155,158 **** --- 183,187 ---- } } + */ } } *************** *** 212,215 **** --- 241,247 ---- public String assign(Long sessionId) { if (iChange==null) return "Nothing to assign."; + if (!"true".equalsIgnoreCase(ApplicationProperties.getProperty("tmtbl.classAssign.allowUnassignment", "true"))) + if (!iChange.getConflicts().isEmpty()) + return "It is not allowed to keep a class unassigned."; sLog.info("About to be assigned: "+iChange); org.hibernate.Session hibSession = Class_DAO.getInstance().getSession(); *************** *** 245,248 **** --- 277,282 ---- for (ClassAssignment assignment : iChange.getAssignments()) if (!assignment.isValid()) return false; + if (!"true".equalsIgnoreCase(ApplicationProperties.getProperty("tmtbl.classAssign.allowUnassignment", "true"))) + if (!iChange.getConflicts().isEmpty()) return false; return true; } |
|
From: Tomas M. <to...@us...> - 2010-12-14 19:44:10
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21755/JavaSource/org/unitime/timetable/model Modified Files: DepartmentalInstructor.java Log Message: code cleanup Index: DepartmentalInstructor.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/DepartmentalInstructor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** DepartmentalInstructor.java 1 Dec 2010 11:10:39 -0000 1.13 --- DepartmentalInstructor.java 14 Dec 2010 19:44:02 -0000 1.14 *************** *** 328,351 **** * @return */ ! public static List getAllForInstructor(DepartmentalInstructor di, Long sessionId) { ! if (di == null || di.getExternalUniqueId()==null || di.getExternalUniqueId().trim().length()==0 ){ ! ArrayList list1 = new ArrayList(); ! list1.add(di); ! return(list1); ! } ! ! DepartmentalInstructorDAO ddao = new DepartmentalInstructorDAO(); ! String query = "from DepartmentalInstructor where externalUniqueId=:puid and department.session.uniqueId=:sessionId"; ! Query q = ddao.getSession().createQuery(query); ! q.setString("puid", di.getExternalUniqueId()); ! q.setLong("sessionId", sessionId.longValue()); ! List list = q.list(); ! ! if(list == null) { ! list = new ArrayList(); ! list.add(di); } ! ! return list; } --- 328,350 ---- * @return */ ! public static List<DepartmentalInstructor> getAllForInstructor(DepartmentalInstructor di, Long sessionId) { ! ArrayList<DepartmentalInstructor> ret = new ArrayList<DepartmentalInstructor>(); ! if (di == null) return ret; ! if (di.getExternalUniqueId() == null || di.getExternalUniqueId().trim().isEmpty()) { ! ret.add(di); ! return ret; } ! ret.addAll( ! DepartmentalInstructorDAO.getInstance().getSession().createQuery( ! "from DepartmentalInstructor where externalUniqueId=:puid and department.session.uniqueId=:sessionId") ! .setString("puid", di.getExternalUniqueId()) ! .setLong("sessionId", sessionId) ! .setCacheable(true).list() ! ); ! return ret; ! } ! ! public static List<DepartmentalInstructor> getAllForInstructor(DepartmentalInstructor di) { ! return getAllForInstructor(di, di.getDepartment().getSessionId()); } |
|
From: Nightly B. <no...@un...> - 2010-12-13 23:57:56
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-13 21:36:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26080/JavaSource/org/unitime/timetable/model Modified Files: Room.java Log Message: Buildings page, Update Data operation - added ability to update existing rooms and buildings (when unitime.external.room.update.existing is set to true, defaults to false) - global room features are reset when unitime.external.room.update.existing.features is true (defaults to false) - room department relations from external data are added when unitime.external.room.update.existing.departments is true (defaults to false) Index: Room.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/Room.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Room.java 1 Dec 2010 11:10:39 -0000 1.9 --- Room.java 13 Dec 2010 21:36:48 -0000 1.10 *************** *** 20,23 **** --- 20,24 ---- package org.unitime.timetable.model; + import java.util.HashSet; import java.util.Iterator; import java.util.List; *************** *** 27,35 **** import org.unitime.timetable.ApplicationProperties; import org.unitime.timetable.model.base.BaseRoom; - import org.unitime.timetable.model.dao.BuildingDAO; import org.unitime.timetable.model.dao.ExternalRoomDAO; import org.unitime.timetable.model.dao.RoomDAO; import org.unitime.timetable.model.dao.RoomDeptDAO; - import org.unitime.timetable.util.LocationPermIdGenerator; --- 28,34 ---- *************** *** 140,149 **** } ! public static void addNewExternalRoomsToSession(Session session){ ! ExternalRoomDAO erDao = new ExternalRoomDAO(); ! BuildingDAO bDao = new BuildingDAO(); ! RoomDAO rDao = new RoomDAO(); ! String query = "from ExternalRoom er where er.building.session.uniqueId=:sessionId "; ! query += " and er.externalUniqueId not in (select r.externalUniqueId from Room r where r.session.uniqueId =:sessionId)"; String classifications = ApplicationProperties.getProperty("unitime.external.room.update.classifications"); if (classifications != null) { --- 139,149 ---- } ! public static void addNewExternalRoomsToSession(Session session) { ! String query = "from ExternalRoom er where er.building.session.uniqueId=:sessionId"; ! boolean updateExistingRooms = "true".equalsIgnoreCase(ApplicationProperties.getProperty("unitime.external.room.update.existing", "false")); ! if (!updateExistingRooms) ! query += " and er.externalUniqueId not in (select r.externalUniqueId from Room r where r.session.uniqueId =:sessionId)"; ! boolean resetRoomFeatures = "true".equalsIgnoreCase(ApplicationProperties.getProperty("unitime.external.room.update.existing.features", "false")); ! boolean resetRoomDepartments = "true".equalsIgnoreCase(ApplicationProperties.getProperty("unitime.external.room.update.existing.departments", "false")); String classifications = ApplicationProperties.getProperty("unitime.external.room.update.classifications"); if (classifications != null) { *************** *** 157,179 **** query += " and er.classification in (" + classificationsQuery + ")"; } ! List l = erDao.getQuery(query).setLong("sessionId", session.getUniqueId()).list(); ! if (l != null){ ! ExternalRoom er = null; ! Room r = null; ! Building b = null; ! for (Iterator erIt = l.iterator(); erIt.hasNext();){ ! er = (ExternalRoom) erIt.next(); ! b = Building.findByExternalIdAndSession(er.getBuilding().getExternalUniqueId(), session); ! ! if (b == null){ ! b = new Building(); ! b.setAbbreviation(er.getBuilding().getAbbreviation()); ! b.setCoordinateX(er.getBuilding().getCoordinateX()); ! b.setCoordinateY(er.getBuilding().getCoordinateY()); ! b.setExternalUniqueId(er.getBuilding().getExternalUniqueId()); ! b.setName(er.getBuilding().getDisplayName()); ! b.setSession(session); ! bDao.saveOrUpdate(b); ! } r = new Room(); r.setBuilding(b); --- 157,185 ---- query += " and er.classification in (" + classificationsQuery + ")"; } ! org.hibernate.Session hibSession = ExternalRoomDAO.getInstance().getSession(); ! for (ExternalRoom er: (List<ExternalRoom>)hibSession.createQuery(query).setLong("sessionId", session.getUniqueId()).list()) { ! Building b = Building.findByExternalIdAndSession(er.getBuilding().getExternalUniqueId(), session); ! if (b == null) { ! b = new Building(); ! b.setAbbreviation(er.getBuilding().getAbbreviation()); ! b.setCoordinateX(er.getBuilding().getCoordinateX()); ! b.setCoordinateY(er.getBuilding().getCoordinateY()); ! b.setExternalUniqueId(er.getBuilding().getExternalUniqueId()); ! b.setName(er.getBuilding().getDisplayName()); ! b.setSession(session); ! hibSession.saveOrUpdate(b); ! } else if (updateExistingRooms) { ! b.setAbbreviation(er.getBuilding().getAbbreviation()); ! b.setCoordinateX(er.getBuilding().getCoordinateX()); ! b.setCoordinateY(er.getBuilding().getCoordinateY()); ! b.setName(er.getBuilding().getDisplayName()); ! hibSession.saveOrUpdate(b); ! } ! Room r = (Room)hibSession.createQuery( ! "from Room r where r.building.session.uniqueId = :sessionId and r.externalUniqueId = :externalId") ! .setLong("sessionId", session.getUniqueId()) ! .setString("externalId", er.getExternalUniqueId()) ! .uniqueResult(); ! if (r == null) { r = new Room(); r.setBuilding(b); *************** *** 190,219 **** r.setRoomType(er.getRoomType()); r.setSession(session); ! LocationPermIdGenerator.setPermanentId(r); ! if (er.getRoomFeatures() != null){ ! ExternalRoomFeature erf = null; ! GlobalRoomFeature grf = null; ! for (Iterator erfIt = er.getRoomFeatures().iterator(); erfIt.hasNext();){ ! erf = (ExternalRoomFeature) erfIt.next(); ! grf = GlobalRoomFeature.findGlobalRoomFeatureForLabel(erf.getValue()); ! if (grf != null){ ! r.addTofeatures(grf); ! } else { grf = GlobalRoomFeature.findGlobalRoomFeatureForAbbv(erf.getName()); ! if (grf != null) ! r.addTofeatures(grf); ! } } } ! rDao.saveOrUpdate(r); ! ExternalRoomDepartment toExternalRoomDept = null; ! for(Iterator erdIt = er.getRoomDepartments().iterator(); erdIt.hasNext();){ ! toExternalRoomDept = (ExternalRoomDepartment) erdIt.next(); ! r.addExternalRoomDept(toExternalRoomDept, er.getRoomDepartments()); ! } } } ! } --- 196,241 ---- r.setRoomType(er.getRoomType()); r.setSession(session); ! r.setFeatures(new HashSet<RoomFeature>()); ! for (ExternalRoomFeature erf: er.getRoomFeatures()) { ! GlobalRoomFeature grf = GlobalRoomFeature.findGlobalRoomFeatureForLabel(erf.getValue()); ! if (grf == null) ! grf = GlobalRoomFeature.findGlobalRoomFeatureForAbbv(erf.getName()); ! if (grf != null) ! r.getFeatures().add(grf); ! } ! for (ExternalRoomDepartment erd: er.getRoomDepartments()) ! r.addExternalRoomDept(erd, er.getRoomDepartments()); ! hibSession.saveOrUpdate(r); ! } else if (updateExistingRooms) { ! r.setBuilding(b); ! r.setCapacity(er.getCapacity()); ! r.setExamCapacity(er.getExamCapacity()); ! r.setClassification(er.getClassification()); ! r.setCoordinateX(er.getCoordinateX()); ! r.setCoordinateY(er.getCoordinateY()); ! r.setDisplayName(er.getDisplayName()); ! r.setRoomNumber(er.getRoomNumber()); ! r.setRoomType(er.getRoomType()); ! if (resetRoomFeatures) { ! for (Iterator<RoomFeature> i = r.getFeatures().iterator(); i.hasNext();) { ! RoomFeature rf = i.next(); ! if (rf instanceof GlobalRoomFeature) i.remove(); ! } ! for (ExternalRoomFeature erf: er.getRoomFeatures()) { ! GlobalRoomFeature grf = GlobalRoomFeature.findGlobalRoomFeatureForLabel(erf.getValue()); ! if (grf == null) grf = GlobalRoomFeature.findGlobalRoomFeatureForAbbv(erf.getName()); ! if (grf != null) ! r.getFeatures().add(grf); } } ! if (resetRoomDepartments) { ! for (ExternalRoomDepartment erd: er.getRoomDepartments()) ! r.addExternalRoomDept(erd, er.getRoomDepartments()); } + hibSession.saveOrUpdate(r); } } ! hibSession.flush(); } |
|
From: Nightly B. <no...@un...> - 2010-12-10 23:50:36
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-10 22:25:48
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv18308/JavaSource/org/unitime/timetable/solver Modified Files: TimetableDatabaseLoader.java Log Message: Added ability to automatically spread classes of each subject area in time. Index: TimetableDatabaseLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableDatabaseLoader.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** TimetableDatabaseLoader.java 10 Dec 2010 04:19:13 -0000 1.20 --- TimetableDatabaseLoader.java 10 Dec 2010 22:25:40 -0000 1.21 *************** *** 148,151 **** --- 148,152 ---- private boolean iDeptBalancing = true; + private boolean iSubjectBalancing = false; private boolean iMppAssignment = true; private boolean iInteractiveMode = false; *************** *** 203,206 **** --- 204,208 ---- iDeptBalancing = getModel().getProperties().getPropertyBoolean("General.DeptBalancing",iDeptBalancing); + iSubjectBalancing = getModel().getProperties().getPropertyBoolean("General.SubjectBalancing",iSubjectBalancing); iSpread = getModel().getProperties().getPropertyBoolean("General.Spread",iSpread); iAutoSameStudents = getModel().getProperties().getPropertyBoolean("General.AutoSameStudents",iAutoSameStudents); *************** *** 2884,2887 **** --- 2886,2909 ---- } + if (iSubjectBalancing) { + iProgress.setPhase("Creating subject spread constraints ...",getModel().variables().size()); + Hashtable<Long, SpreadConstraint> subjectSpreadConstraints = new Hashtable<Long, SpreadConstraint>(); + for (Lecture lecture: getModel().variables()) { + Class_ clazz = iClasses.get(lecture.getClassId()); + if (clazz == null) continue; + for (CourseOffering co: clazz.getSchedulingSubpart().getInstrOfferingConfig().getInstructionalOffering().getCourseOfferings()) { + Long subject = co.getSubjectArea().getUniqueId(); + SpreadConstraint subjectSpreadConstr = subjectSpreadConstraints.get(subject); + if (subjectSpreadConstr==null) { + subjectSpreadConstr = new SpreadConstraint(getModel().getProperties(), co.getSubjectArea().getSubjectAreaAbbreviation()); + subjectSpreadConstraints.put(subject, subjectSpreadConstr); + getModel().addConstraint(subjectSpreadConstr); + } + subjectSpreadConstr.addVariable(lecture); + } + iProgress.incProgress(); + } + } + purgeInvalidValues(); |
|
From: Tomas M. <to...@us...> - 2010-12-10 22:25:11
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/widgets In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17838/JavaSource/org/unitime/timetable/gwt/client/widgets Added Files: UniTimeTabPanel.java Removed Files: UniTimeTabPabel.java Log Message: corrected a typo --- UniTimeTabPabel.java DELETED --- --- NEW FILE: UniTimeTabPanel.java --- /* * UniTime 3.2 (University Timetabling Application) * Copyright (C) 2010, UniTime LLC, and individual contributors * as indicated by the @authors tag. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. * */ package org.unitime.timetable.gwt.client.widgets; import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.TabPanel; import com.google.gwt.user.client.ui.Widget; /** * {@link TabPanel} wrapper to avoid deprecation warnings. * To be used only for pages not based on LayoutPanel (and preferably avoided in the future development). */ @SuppressWarnings("deprecation") public class UniTimeTabPanel extends TabPanel { public UniTimeTabPanel() { super(); } public void add(Widget w, String tabText, boolean asHTML) { super.add(w, tabText, asHTML); } public void insert(Widget widget, String tabText, boolean asHTML, int beforeIndex) { super.insert(widget, tabText, asHTML, beforeIndex); } public void setDeckSize(String width, String height) { getDeckPanel().setSize(width, height); } public void setDeckStyleName(String style) { getDeckPanel().setStyleName(style); } public void selectTab(int index) { super.selectTab(index); } public HandlerRegistration addSelectionHandler(SelectionHandler<Integer> handler) { return super.addSelectionHandler(handler); } public int getTabCount() { return getTabBar().getTabCount(); } public int getSelectedTab() { return getTabBar().getSelectedTab(); } } |
|
From: Tomas M. <to...@us...> - 2010-12-10 22:25:11
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17838/JavaSource/org/unitime/timetable/gwt/client/sectioning Modified Files: CourseSelectionBox.java StudentSectioningWidget.java Log Message: corrected a typo Index: CourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/CourseSelectionBox.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CourseSelectionBox.java 1 Dec 2010 11:10:50 -0000 1.2 --- CourseSelectionBox.java 10 Dec 2010 22:25:03 -0000 1.3 *************** *** 25,29 **** import org.unitime.timetable.gwt.client.ToolBox; import org.unitime.timetable.gwt.client.widgets.UniTimeDialogBox; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPabel; import org.unitime.timetable.gwt.client.widgets.Validator; import org.unitime.timetable.gwt.client.widgets.WebTable; --- 25,29 ---- import org.unitime.timetable.gwt.client.ToolBox; import org.unitime.timetable.gwt.client.widgets.UniTimeDialogBox; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPanel; import org.unitime.timetable.gwt.client.widgets.Validator; import org.unitime.timetable.gwt.client.widgets.WebTable; *************** *** 112,116 **** private Label iFreeTimeError = null, iCoursesTip, iFreeTimeTip; ! private UniTimeTabPabel iTabPanel, iCourseDetailsTabPanel = null; private HTML iCourseDetails; --- 112,116 ---- private Label iFreeTimeError = null, iCoursesTip, iFreeTimeTip; ! private UniTimeTabPanel iTabPanel, iCourseDetailsTabPanel = null; private HTML iCourseDetails; *************** *** 361,365 **** }); ! iTabPanel = new UniTimeTabPabel(); if (ie) { iCoursesPanel.setSize("780px", "400px"); --- 361,365 ---- }); ! iTabPanel = new UniTimeTabPanel(); if (ie) { iCoursesPanel.setSize("780px", "400px"); *************** *** 371,375 **** iTabPanel.add(iClassesPanel, MESSAGES.courseSelectionClasses(), true); } else { ! iCourseDetailsTabPanel = new UniTimeTabPabel(); iCourseDetailsTabPanel.setDeckSize("780", "200"); iCourseDetailsTabPanel.setDeckStyleName("unitime-TabPanel"); --- 371,375 ---- iTabPanel.add(iClassesPanel, MESSAGES.courseSelectionClasses(), true); } else { ! iCourseDetailsTabPanel = new UniTimeTabPanel(); iCourseDetailsTabPanel.setDeckSize("780", "200"); iCourseDetailsTabPanel.setDeckStyleName("unitime-TabPanel"); Index: StudentSectioningWidget.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/StudentSectioningWidget.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StudentSectioningWidget.java 1 Dec 2010 11:10:50 -0000 1.2 --- StudentSectioningWidget.java 10 Dec 2010 22:25:03 -0000 1.3 *************** *** 26,30 **** import org.unitime.timetable.gwt.client.sectioning.TimeGrid.Meeting; import org.unitime.timetable.gwt.client.widgets.ImageLink; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPabel; import org.unitime.timetable.gwt.client.widgets.WebTable; import org.unitime.timetable.gwt.resources.StudentSectioningConstants; --- 26,30 ---- import org.unitime.timetable.gwt.client.sectioning.TimeGrid.Meeting; import org.unitime.timetable.gwt.client.widgets.ImageLink; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPanel; import org.unitime.timetable.gwt.client.widgets.WebTable; import org.unitime.timetable.gwt.resources.StudentSectioningConstants; *************** *** 85,89 **** private Button iPrev, iNext, iEnroll, iPrint, iExport, iSave; private HTML iErrorMessage; ! private UniTimeTabPabel iAssignmentPanel; private FocusPanel iAssignmentPanelWithFocus; private ImageLink iCalendar; --- 85,89 ---- private Button iPrev, iNext, iEnroll, iPrint, iExport, iSave; private HTML iErrorMessage; ! private UniTimeTabPanel iAssignmentPanel; private FocusPanel iAssignmentPanelWithFocus; private ImageLink iCalendar; *************** *** 224,228 **** )); ! iAssignmentPanel = new UniTimeTabPabel(); iAssignmentPanel.add(iAssignments, MESSAGES.tabClasses(), true); iAssignmentPanel.selectTab(0); --- 224,228 ---- )); ! iAssignmentPanel = new UniTimeTabPanel(); iAssignmentPanel.add(iAssignments, MESSAGES.tabClasses(), true); iAssignmentPanel.selectTab(0); |
|
From: Tomas M. <to...@us...> - 2010-12-10 22:25:10
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/curricula In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17838/JavaSource/org/unitime/timetable/gwt/client/curricula Modified Files: CurriculaCourseSelectionBox.java Log Message: corrected a typo Index: CurriculaCourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/curricula/CurriculaCourseSelectionBox.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CurriculaCourseSelectionBox.java 1 Dec 2010 11:10:48 -0000 1.2 --- CurriculaCourseSelectionBox.java 10 Dec 2010 22:25:03 -0000 1.3 *************** *** 26,30 **** import org.unitime.timetable.gwt.client.ToolBox; import org.unitime.timetable.gwt.client.widgets.UniTimeDialogBox; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPabel; import org.unitime.timetable.gwt.client.widgets.Validator; import org.unitime.timetable.gwt.client.widgets.WebTable; --- 26,30 ---- import org.unitime.timetable.gwt.client.ToolBox; import org.unitime.timetable.gwt.client.widgets.UniTimeDialogBox; ! import org.unitime.timetable.gwt.client.widgets.UniTimeTabPanel; import org.unitime.timetable.gwt.client.widgets.Validator; import org.unitime.timetable.gwt.client.widgets.WebTable; *************** *** 112,116 **** private CourseCurriculaTable iCurricula; ! private UniTimeTabPabel iCourseDetailsTabPanel; private HTML iCourseDetails; --- 112,116 ---- private CourseCurriculaTable iCurricula; ! private UniTimeTabPanel iCourseDetailsTabPanel; private HTML iCourseDetails; *************** *** 304,308 **** iCoursesPanel.setStyleName("unitime-ScrollPanel"); ! iCourseDetailsTabPanel = new UniTimeTabPabel(); iCourseDetails = new HTML("<table width='100%'></tr><td class='unitime-TableEmpty'>" + MESSAGES.courseSelectionNoCourseSelected() + "</td></tr></table>"); --- 304,308 ---- iCoursesPanel.setStyleName("unitime-ScrollPanel"); ! iCourseDetailsTabPanel = new UniTimeTabPanel(); iCourseDetails = new HTML("<table width='100%'></tr><td class='unitime-TableEmpty'>" + MESSAGES.courseSelectionNoCourseSelected() + "</td></tr></table>"); |
|
From: Tomas M. <to...@us...> - 2010-12-10 04:19:23
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv9856/JavaSource/org/unitime/timetable/solver Modified Files: TimetableDatabaseLoader.java EnrollmentCheck.java Log Message: Course solver loader - added ability to change message level of various messages (mostly warning now) Index: EnrollmentCheck.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/EnrollmentCheck.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EnrollmentCheck.java 1 Dec 2010 11:10:51 -0000 1.3 --- EnrollmentCheck.java 10 Dec 2010 04:19:13 -0000 1.4 *************** *** 49,55 **** private static java.text.DecimalFormat sDoubleFormat = new java.text.DecimalFormat("0.##",new java.text.DecimalFormatSymbols(Locale.US)); private TimetableModel iModel = null; ! public EnrollmentCheck(TimetableModel model) { iModel = model; } --- 49,76 ---- private static java.text.DecimalFormat sDoubleFormat = new java.text.DecimalFormat("0.##",new java.text.DecimalFormatSymbols(Locale.US)); private TimetableModel iModel = null; + private int iMessageLevel = Progress.MSGLEVEL_WARN; + private int iMessageLowerLevel = Progress.MSGLEVEL_INFO; ! public EnrollmentCheck(TimetableModel model, int msgLevel) { iModel = model; + setMessageLevel(msgLevel); + } + + public void setMessageLevel(int messageLevel) { + iMessageLevel = messageLevel; + switch (iMessageLevel) { + case Progress.MSGLEVEL_FATAL: + iMessageLowerLevel = Progress.MSGLEVEL_ERROR; break; + case Progress.MSGLEVEL_ERROR: + iMessageLowerLevel = Progress.MSGLEVEL_WARN; break; + case Progress.MSGLEVEL_WARN: + iMessageLowerLevel = Progress.MSGLEVEL_INFO; break; + case Progress.MSGLEVEL_INFO: + iMessageLowerLevel = Progress.MSGLEVEL_DEBUG; break; + case Progress.MSGLEVEL_DEBUG: + iMessageLowerLevel = Progress.MSGLEVEL_TRACE; break; + case Progress.MSGLEVEL_TRACE: + iMessageLowerLevel = Progress.MSGLEVEL_TRACE; break; + } } *************** *** 106,115 **** if (s.getLectures().contains(lecture)) { if (enrolled!=null) ! p.warn("Student "+s.getId()+" enrolled in multiple classes of the same subpart "+getClassLabel(enrolled)+", "+getClassLabel(lecture)+"."); enrolled = lecture; } } if (enrolled==null) { ! p.warn("Student "+s.getId()+" not enrolled in any class of subpart "+getSubpartLabel(subpartId)+"."); } else if (enrolled.hasAnyChildren()) { for (Long sid: enrolled.getChildrenSubpartIds()) { --- 127,136 ---- if (s.getLectures().contains(lecture)) { if (enrolled!=null) ! p.message(iMessageLevel, "Student "+s.getId()+" enrolled in multiple classes of the same subpart "+getClassLabel(enrolled)+", "+getClassLabel(lecture)+"."); enrolled = lecture; } } if (enrolled==null) { ! p.message(iMessageLevel, "Student "+s.getId()+" not enrolled in any class of subpart "+getSubpartLabel(subpartId)+"."); } else if (enrolled.hasAnyChildren()) { for (Long sid: enrolled.getChildrenSubpartIds()) { *************** *** 184,200 **** p.setStatus("Student Enrollments Check"); if (iModel.getViolatedStudentConflicts()!=iModel.countViolatedStudentConflicts()) { ! p.warn("Inconsistent number of student conflits (counter="+iModel.getViolatedStudentConflicts()+", actual="+iModel.countViolatedStudentConflicts()+")."); } if (iModel.getHardStudentConflicts()!=iModel.countHardStudentConflicts()) { ! p.warn("Inconsistent number of hard student conflits (counter="+iModel.getHardStudentConflicts()+", actual="+iModel.countHardStudentConflicts()+")."); } if (iModel.getStudentDistanceConflicts()!=iModel.countStudentDistanceConflicts()) { ! p.warn("Inconsistent number of distance student conflits (counter="+iModel.getStudentDistanceConflicts()+", actual="+iModel.countStudentDistanceConflicts()+")."); } if (iModel.getCommittedStudentConflictsCounter().get() != iModel.countCommitedStudentConflicts(false)) { ! p.warn("Inconsistent number of committed student conflits (counter="+iModel.getCommitedStudentConflicts()+", actual="+iModel.countCommitedStudentConflicts(false)+")."); } if (iModel.getViolatedCommitttedStudentConflictsCounter().get() != iModel.countCommitedStudentConflicts(true) - iModel.countCommitedStudentConflicts(false)) { ! p.warn("Inconsistent number of committed student course conflits (counter="+iModel.getCommitedStudentConflicts()+ ", actual="+(iModel.countCommitedStudentConflicts(true) - iModel.countCommitedStudentConflicts(false))+")."); } --- 205,221 ---- p.setStatus("Student Enrollments Check"); if (iModel.getViolatedStudentConflicts()!=iModel.countViolatedStudentConflicts()) { ! p.message(iMessageLevel, "Inconsistent number of student conflits (counter="+iModel.getViolatedStudentConflicts()+", actual="+iModel.countViolatedStudentConflicts()+")."); } if (iModel.getHardStudentConflicts()!=iModel.countHardStudentConflicts()) { ! p.message(iMessageLevel, "Inconsistent number of hard student conflits (counter="+iModel.getHardStudentConflicts()+", actual="+iModel.countHardStudentConflicts()+")."); } if (iModel.getStudentDistanceConflicts()!=iModel.countStudentDistanceConflicts()) { ! p.message(iMessageLevel, "Inconsistent number of distance student conflits (counter="+iModel.getStudentDistanceConflicts()+", actual="+iModel.countStudentDistanceConflicts()+")."); } if (iModel.getCommittedStudentConflictsCounter().get() != iModel.countCommitedStudentConflicts(false)) { ! p.message(iMessageLevel, "Inconsistent number of committed student conflits (counter="+iModel.getCommitedStudentConflicts()+", actual="+iModel.countCommitedStudentConflicts(false)+")."); } if (iModel.getViolatedCommitttedStudentConflictsCounter().get() != iModel.countCommitedStudentConflicts(true) - iModel.countCommitedStudentConflicts(false)) { ! p.message(iMessageLevel, "Inconsistent number of committed student course conflits (counter="+iModel.getCommitedStudentConflicts()+ ", actual="+(iModel.countCommitedStudentConflicts(true) - iModel.countCommitedStudentConflicts(false))+")."); } *************** *** 209,215 **** if (lecture.nrWeightedStudents()-w>FinalSectioning.sEps+lecture.classLimit()) { if (hasSubpartMixedOwnership(lecture)) ! p.info("Class limit exceeded for class "+getClassLabel(lecture)+" ("+sDoubleFormat.format(lecture.nrWeightedStudents())+">"+lecture.classLimit()+")."); else ! p.warn("Class limit exceeded for class "+getClassLabel(lecture)+" ("+sDoubleFormat.format(lecture.nrWeightedStudents())+">"+lecture.classLimit()+")."); } } --- 230,236 ---- if (lecture.nrWeightedStudents()-w>FinalSectioning.sEps+lecture.classLimit()) { if (hasSubpartMixedOwnership(lecture)) ! p.message(iMessageLowerLevel, "Class limit exceeded for class "+getClassLabel(lecture)+" ("+sDoubleFormat.format(lecture.nrWeightedStudents())+">"+lecture.classLimit()+")."); else ! p.message(iMessageLevel, "Class limit exceeded for class "+getClassLabel(lecture)+" ("+sDoubleFormat.format(lecture.nrWeightedStudents())+">"+lecture.classLimit()+")."); } } *************** *** 222,226 **** Lecture lecture = (Lecture)j.next(); if (!student.canEnroll(lecture)) ! p.info("Student "+student.getId()+" enrolled to invalid class "+getClassLabel(lecture)+"."); } if (student.getConfigurations().size()!=student.getOfferings().size()) { --- 243,247 ---- Lecture lecture = (Lecture)j.next(); if (!student.canEnroll(lecture)) ! p.message(iMessageLowerLevel, "Student "+student.getId()+" enrolled to invalid class "+getClassLabel(lecture)+"."); } if (student.getConfigurations().size()!=student.getOfferings().size()) { *************** *** 230,234 **** got.add(cfg.getOfferingId()); } ! p.warn("Student "+student.getId()+" demands offerings "+getOfferingsLabel(student.getOfferings())+", but got "+getOfferingsLabel(got)+"."); } for (Iterator j=student.getConfigurations().iterator();j.hasNext();) { --- 251,255 ---- got.add(cfg.getOfferingId()); } ! p.message(iMessageLevel, "Student "+student.getId()+" demands offerings "+getOfferingsLabel(student.getOfferings())+", but got "+getOfferingsLabel(got)+"."); } for (Iterator j=student.getConfigurations().iterator();j.hasNext();) { Index: TimetableDatabaseLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableDatabaseLoader.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** TimetableDatabaseLoader.java 1 Dec 2010 11:10:51 -0000 1.19 --- TimetableDatabaseLoader.java 10 Dec 2010 04:19:13 -0000 1.20 *************** *** 183,187 **** Load, Compute}; ! public TimetableDatabaseLoader(TimetableModel model) { super(model); --- 183,187 ---- Load, Compute}; ! public TimetableDatabaseLoader(TimetableModel model) { super(model); *************** *** 234,238 **** iStudentCourseDemands = (StudentCourseDemands)studentCourseDemandsClass.getConstructor(DataProperties.class).newInstance(getModel().getProperties()); } catch (Exception e) { ! iProgress.warn("Failed to load custom student course demands class, using last-like course demands instead.",e); iStudentCourseDemands = new LastLikeStudentCourseDemands(getModel().getProperties()); } --- 234,238 ---- iStudentCourseDemands = (StudentCourseDemands)studentCourseDemandsClass.getConstructor(DataProperties.class).newInstance(getModel().getProperties()); } catch (Exception e) { ! iProgress.message(msglevel("badStudentCourseDemands", Progress.MSGLEVEL_WARN), "Failed to load custom student course demands class, using last-like course demands instead.",e); iStudentCourseDemands = new LastLikeStudentCourseDemands(getModel().getProperties()); } *************** *** 252,255 **** --- 252,267 ---- } + public int msglevel(String type, int defaultLevel) { + String level = ApplicationProperties.getProperty("unitime.solver.log.level." + type); + if (level == null) return defaultLevel; + if ("warn".equalsIgnoreCase(level)) return Progress.MSGLEVEL_WARN; + if ("error".equalsIgnoreCase(level)) return Progress.MSGLEVEL_ERROR; + if ("fatal".equalsIgnoreCase(level)) return Progress.MSGLEVEL_FATAL; + if ("info".equalsIgnoreCase(level)) return Progress.MSGLEVEL_INFO; + if ("debug".equalsIgnoreCase(level)) return Progress.MSGLEVEL_DEBUG; + if ("trace".equalsIgnoreCase(level)) return Progress.MSGLEVEL_TRACE; + return defaultLevel; + } + private String getClassLabel(Class_ clazz) { return "<A href='classDetail.do?cid="+clazz.getUniqueId()+"'>"+clazz.getClassLabel()+"</A>"; *************** *** 513,517 **** List<RoomLocation> roomLocations = new ArrayList<RoomLocation>(); ! iProgress.debug("loading class "+getClassLabel(clazz)); Department dept = clazz.getControllingDept(); --- 525,529 ---- List<RoomLocation> roomLocations = new ArrayList<RoomLocation>(); ! iProgress.message(msglevel("loadingClass", Progress.MSGLEVEL_DEBUG), "loading class "+getClassLabel(clazz)); Department dept = clazz.getControllingDept(); *************** *** 538,542 **** if (timePrefs.isEmpty()) { if (clazz.getSchedulingSubpart().getMinutesPerWk().intValue()!=0) ! iProgress.warn("Class "+getClassLabel(clazz)+" has no time pattern selected (class not loaded). <i>If not changed, this class will be treated as Arrange "+Math.round(clazz.getSchedulingSubpart().getMinutesPerWk().intValue()/50.0)+" Hours.</i>"); return null; } --- 550,554 ---- if (timePrefs.isEmpty()) { if (clazz.getSchedulingSubpart().getMinutesPerWk().intValue()!=0) ! iProgress.message(msglevel("noTimePattern", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" has no time pattern selected (class not loaded). <i>If not changed, this class will be treated as Arrange "+Math.round(clazz.getSchedulingSubpart().getMinutesPerWk().intValue()/50.0)+" Hours.</i>"); return null; } *************** *** 546,550 **** DatePattern datePattern = clazz.effectiveDatePattern(); if (datePattern==null) { ! iProgress.warn("Class "+getClassLabel(clazz)+" has no date pattern selected (class not loaded)."); return null; } --- 558,562 ---- DatePattern datePattern = clazz.effectiveDatePattern(); if (datePattern==null) { ! iProgress.message(msglevel("noDatePattern", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" has no date pattern selected (class not loaded)."); return null; } *************** *** 772,781 **** if (roomLocations.isEmpty() || roomLocations.size()<(clazz.getNbrRooms()==null?1:clazz.getNbrRooms().intValue())) { ! iProgress.warn("Class "+getClassLabel(clazz)+" has no available room"+(clazz.getNbrRooms()!=null && clazz.getNbrRooms().intValue()>1?"s":"")+" (class not loaded)."); return null; } } else { if (!groupPrefs.isEmpty() || !roomPrefs.isEmpty() || !bldgPrefs.isEmpty() || !featurePrefs.isEmpty()) ! iProgress.warn("Class "+getClassLabel(clazz)+" requires no room (number of rooms is set to zero), but it contains some room preferences."); } --- 784,793 ---- if (roomLocations.isEmpty() || roomLocations.size()<(clazz.getNbrRooms()==null?1:clazz.getNbrRooms().intValue())) { ! iProgress.message(msglevel("noRoom", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" has no available room"+(clazz.getNbrRooms()!=null && clazz.getNbrRooms().intValue()>1?"s":"")+" (class not loaded)."); return null; } } else { if (!groupPrefs.isEmpty() || !roomPrefs.isEmpty() || !bldgPrefs.isEmpty() || !featurePrefs.isEmpty()) ! iProgress.message(msglevel("zeroRoomsButPref", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" requires no room (number of rooms is set to zero), but it contains some room preferences."); } *************** *** 813,817 **** if (clazz.getSchedulingSubpart().getMinutesPerWk().intValue()!=pattern.getMinPerMtg()*pattern.getNrMeetings()) { ! iProgress.warn("Class "+getClassLabel(clazz)+" has "+clazz.getSchedulingSubpart().getMinutesPerWk()+" minutes per week, but "+pattern.getName()+" time pattern selected."); minPerWeek = pattern.getMinPerMtg()*pattern.getNrMeetings(); if (iFixMinPerWeek) --- 825,829 ---- if (clazz.getSchedulingSubpart().getMinutesPerWk().intValue()!=pattern.getMinPerMtg()*pattern.getNrMeetings()) { ! iProgress.message(msglevel("noTimePattern", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" has "+clazz.getSchedulingSubpart().getMinutesPerWk()+" minutes per week, but "+pattern.getName()+" time pattern selected."); minPerWeek = pattern.getMinPerMtg()*pattern.getNrMeetings(); if (iFixMinPerWeek) *************** *** 888,892 **** if (timeLocations.isEmpty()) { ! iProgress.warn("Class "+getClassLabel(clazz)+" has no available time (class not loaded)."); return null; } --- 900,904 ---- if (timeLocations.isEmpty()) { ! iProgress.message(msglevel("noTime", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(clazz)+" has no available time (class not loaded)."); return null; } *************** *** 920,924 **** } if (estNrValues>1000000) { ! iProgress.error("Class "+getClassLabel(lecture)+" has too many possible placements ("+estNrValues+"). " + "The class was not loaded in order to prevent out of memory exception. " + "Please restrict the number of available rooms and/or times for this class."); --- 932,936 ---- } if (estNrValues>1000000) { ! iProgress.message(msglevel("hugeDomain", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(lecture)+" has too many possible placements ("+estNrValues+"). " + "The class was not loaded in order to prevent out of memory exception. " + "Please restrict the number of available rooms and/or times for this class."); *************** *** 928,932 **** return null; } else if (estNrValues>10000) { ! iProgress.warn("Class "+getClassLabel(lecture)+" has quite a lot of possible placements ("+estNrValues+"). " + "Solver may run too slow. " + "If possible, please restrict the number of available rooms and/or times for this class."); --- 940,944 ---- return null; } else if (estNrValues>10000) { ! iProgress.message(msglevel("bigDomain", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(lecture)+" has quite a lot of possible placements ("+estNrValues+"). " + "Solver may run too slow. " + "If possible, please restrict the number of available rooms and/or times for this class."); *************** *** 935,939 **** if (lecture.values().isEmpty()) { if (!iInteractiveMode) { ! iProgress.warn("Class "+getClassLabel(lecture)+" has no available placement (class not loaded)."); for (DepartmentalInstructor instructor: instructors) { getInstructorConstraint(instructor,hibSession).removeVariable(lecture); --- 947,951 ---- if (lecture.values().isEmpty()) { if (!iInteractiveMode) { ! iProgress.message(msglevel("noPlacement", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(lecture)+" has no available placement (class not loaded)."); for (DepartmentalInstructor instructor: instructors) { getInstructorConstraint(instructor,hibSession).removeVariable(lecture); *************** *** 941,945 **** return null; } else ! iProgress.warn("Class "+getClassLabel(lecture)+" has no available placement."); } iLectures.put(clazz.getUniqueId(),lecture); --- 953,957 ---- return null; } else ! iProgress.message(msglevel("noPlacement", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(lecture)+" has no available placement."); } iLectures.put(clazz.getUniqueId(),lecture); *************** *** 972,976 **** } warn+="<br> in constraint "+c; ! iProgress.warn(warn); } } --- 984,988 ---- } warn+="<br> in constraint "+c; ! iProgress.message(msglevel("cannotAssignCommitted", Progress.MSGLEVEL_WARN), warn); } } *************** *** 994,998 **** warn += "<br> "+p.getNotValidReason(); } ! iProgress.warn(warn); } if (!iInteractiveMode) { --- 1006,1010 ---- warn += "<br> "+p.getNotValidReason(); } ! iProgress.message(msglevel("noPlacementAfterCommit", Progress.MSGLEVEL_WARN), warn); } if (!iInteractiveMode) { *************** *** 1067,1071 **** } } ! iProgress.warn("Unable to assign "+getClassLabel(lecture)+" ← "+sb+" (placement not valid)"); return; } --- 1079,1083 ---- } } ! iProgress.message(msglevel("placementNotValid", Progress.MSGLEVEL_WARN), "Unable to assign "+getClassLabel(lecture)+" ← "+sb+" (placement not valid)"); return; } *************** *** 1100,1104 **** } } ! iProgress.warn("Unable to assign "+getClassLabel(lecture)+" ← "+initialPlacement.getLongName()+(reason.length()==0?".":":"+reason)); } else { if (iMppAssignment) lecture.setInitialAssignment(initialPlacement); --- 1112,1116 ---- } } ! iProgress.message(msglevel("cannotAssign", Progress.MSGLEVEL_WARN), "Unable to assign "+getClassLabel(lecture)+" ← "+initialPlacement.getLongName()+(reason.length()==0?".":":"+reason)); } else { if (iMppAssignment) lecture.setInitialAssignment(initialPlacement); *************** *** 1115,1119 **** } warn += "<br> in constraint "+c; ! iProgress.warn(warn); } } --- 1127,1131 ---- } warn += "<br> in constraint "+c; ! iProgress.message(msglevel("cannotAssign", Progress.MSGLEVEL_WARN), warn); } } *************** *** 1282,1306 **** gc = new MinimizeNumberOfUsedRoomsConstraint(getModel().getProperties()); else ! iProgress.info("Minimize number of used rooms constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(10x1h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"10x1h",MinimizeNumberOfUsedGroupsOfTime.sGroups10of1h); else ! iProgress.info("Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(5x2h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"5x2h",MinimizeNumberOfUsedGroupsOfTime.sGroups5of2h); else ! iProgress.info("Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(3x3h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"3x3h",MinimizeNumberOfUsedGroupsOfTime.sGroups3of3h); else ! iProgress.info("Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(2x5h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"2x5h",MinimizeNumberOfUsedGroupsOfTime.sGroups2of5h); else ! iProgress.info("Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else { gc = new GroupConstraint(pref.getUniqueId(),pref.getDistributionType().getReference(),pref.getPrefLevel().getPrefProlog()); --- 1294,1318 ---- gc = new MinimizeNumberOfUsedRoomsConstraint(getModel().getProperties()); else ! iProgress.message(msglevel("constraintNotUsed", Progress.MSGLEVEL_INFO), "Minimize number of used rooms constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(10x1h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"10x1h",MinimizeNumberOfUsedGroupsOfTime.sGroups10of1h); else ! iProgress.message(msglevel("constraintNotUsed", Progress.MSGLEVEL_INFO), "Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(5x2h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"5x2h",MinimizeNumberOfUsedGroupsOfTime.sGroups5of2h); else ! iProgress.message(msglevel("constraintNotUsed", Progress.MSGLEVEL_INFO), "Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(3x3h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"3x3h",MinimizeNumberOfUsedGroupsOfTime.sGroups3of3h); else ! iProgress.message(msglevel("constraintNotUsed", Progress.MSGLEVEL_INFO), "Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else if ("MIN_GRUSE(2x5h)".equals(pref.getDistributionType().getReference())) { if (!iInteractiveMode) gc = new MinimizeNumberOfUsedGroupsOfTime(getModel().getProperties(),"2x5h",MinimizeNumberOfUsedGroupsOfTime.sGroups2of5h); else ! iProgress.message(msglevel("constraintNotUsed", Progress.MSGLEVEL_INFO), "Minimize number of used groups of time constraint not loaded due to the interactive mode of the solver."); } else { gc = new GroupConstraint(pref.getUniqueId(),pref.getDistributionType().getReference(),pref.getPrefLevel().getPrefProlog()); *************** *** 1311,1317 **** private void errorAddGroupConstraintNotFound(DistributionPref pref, Class_ clazz) { if (pref.getOwner()!=null && pref.getOwner() instanceof DepartmentalInstructor) ! iProgress.info("Lecture "+getClassLabel(clazz)+" not found/loaded, but used in distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()); else ! iProgress.warn("Lecture "+getClassLabel(clazz)+" not found/loaded, but used in distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()); } --- 1323,1329 ---- private void errorAddGroupConstraintNotFound(DistributionPref pref, Class_ clazz) { if (pref.getOwner()!=null && pref.getOwner() instanceof DepartmentalInstructor) ! iProgress.message(msglevel("notLoadedInInstrPref", Progress.MSGLEVEL_INFO), "Lecture "+getClassLabel(clazz)+" not found/loaded, but used in distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()); else ! iProgress.message(msglevel("notLoadedInDistPref", Progress.MSGLEVEL_WARN), "Lecture "+getClassLabel(clazz)+" not found/loaded, but used in distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()); } *************** *** 1428,1432 **** } } else { ! iProgress.warn("Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } --- 1440,1444 ---- } } else { ! iProgress.message(msglevel("badDistributionObj", Progress.MSGLEVEL_WARN), "Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } *************** *** 1461,1469 **** } } else { ! iProgress.warn("Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } if (lectures.size()<2) { ! iProgress.warn("Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to less than two classes"); } else { for (int idx1=0;idx1<lectures.size()-1;idx1++) { --- 1473,1481 ---- } } else { ! iProgress.message(msglevel("badDistributionObj", Progress.MSGLEVEL_WARN), "Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } if (lectures.size()<2) { ! iProgress.message(msglevel("distrPrefIncomplete", Progress.MSGLEVEL_WARN), "Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to less than two classes"); } else { for (int idx1=0;idx1<lectures.size()-1;idx1++) { *************** *** 1513,1517 **** } } else { ! iProgress.warn("Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } --- 1525,1529 ---- } } else { ! iProgress.message(msglevel("badDistributionObj", Progress.MSGLEVEL_WARN), "Distribution preference "+pref.getDistributionType().getLabel()+pref.getGroupingSufix()+" refers to unsupported object "+distributionObject.getPrefGroup()); } } *************** *** 1670,1674 **** tx.commit(); } catch (Exception e) { ! iProgress.fatal("Unable to load input data, reason:"+e.getMessage(),e); tx.rollback(); } finally { --- 1682,1686 ---- tx.commit(); } catch (Exception e) { ! iProgress.message(msglevel("loadFailed", Progress.MSGLEVEL_FATAL), "Unable to load input data, reason:"+e.getMessage(),e); tx.rollback(); } finally { *************** *** 1910,1914 **** private void checkReservation(CourseOffering course, Set<Lecture> cannotAttendLectures, List<Configuration> configurations) { if (canAttendConfigurations(cannotAttendLectures, configurations)) return; ! iProgress.warn("Inconsistent course reservations for course "+getOfferingLabel(course)); } --- 1922,1926 ---- private void checkReservation(CourseOffering course, Set<Lecture> cannotAttendLectures, List<Configuration> configurations) { if (canAttendConfigurations(cannotAttendLectures, configurations)) return; ! iProgress.message(msglevel("badCourseReservation", Progress.MSGLEVEL_WARN), "Inconsistent course reservations for course "+getOfferingLabel(course)); } *************** *** 2062,2066 **** iSolverGroup[i] = dao.get(iSolverGroupId[i], hibSession); if (iSolverGroup[i]==null) { ! iProgress.fatal("Unable to load solver group "+iSolverGroupId[i]+"."); return; } --- 2074,2078 ---- iSolverGroup[i] = dao.get(iSolverGroupId[i], hibSession); if (iSolverGroup[i]==null) { ! iProgress.message(msglevel("loadFailed", Progress.MSGLEVEL_FATAL), "Unable to load solver group "+iSolverGroupId[i]+"."); return; } *************** *** 2069,2073 **** } if (iSolverGroup==null || iSolverGroup.length==0) { ! iProgress.fatal("No solver group loaded."); return; } --- 2081,2085 ---- } if (iSolverGroup==null || iSolverGroup.length==0) { ! iProgress.message(msglevel("loadFailed", Progress.MSGLEVEL_FATAL), "No solver group loaded."); return; } *************** *** 2090,2094 **** Solution solution = (new SolutionDAO()).get(iSolutionId[i], hibSession); if (solution==null) { ! iProgress.fatal("Unable to load solution "+iSolutionId[i]+"."); return; } --- 2102,2106 ---- Solution solution = (new SolutionDAO()).get(iSolutionId[i], hibSession); if (solution==null) { ! iProgress.message(msglevel("loadFailed", Progress.MSGLEVEL_FATAL), "Unable to load solution "+iSolutionId[i]+"."); return; } *************** *** 2115,2119 **** iSession = (new SessionDAO()).get(iSessionId, hibSession); if (iSession==null) { ! iProgress.fatal("No session loaded."); return; } --- 2127,2131 ---- iSession = (new SessionDAO()).get(iSessionId, hibSession); if (iSession==null) { ! iProgress.message(msglevel("loadFailed", Progress.MSGLEVEL_FATAL), "No session loaded."); return; } *************** *** 2132,2136 **** } if (iAllClasses==null || iAllClasses.isEmpty()) { ! iProgress.fatal("No classes to load."); return; } --- 2144,2148 ---- } if (iAllClasses==null || iAllClasses.isEmpty()) { ! iProgress.message(msglevel("noClasses", Progress.MSGLEVEL_FATAL), "No classes to load."); return; } *************** *** 2409,2413 **** courseLimit = offering.getLimit(); else { ! iProgress.warn("Cross-listed course "+getOfferingLabel(course)+" does not have any course reservation."); if (course.getProjectedDemand() != null) courseLimit = course.getProjectedDemand(); --- 2421,2425 ---- courseLimit = offering.getLimit(); else { ! iProgress.message(msglevel("crossListWithoutReservation", Progress.MSGLEVEL_WARN), "Cross-listed course "+getOfferingLabel(course)+" does not have any course reservation."); if (course.getProjectedDemand() != null) courseLimit = course.getProjectedDemand(); *************** *** 2425,2432 **** if (totalCourseLimit < offering.getLimit()) ! iProgress.warn("Total number of course reservations is below the offering limit for instructional offering "+getOfferingLabel(offering)+" ("+totalCourseLimit+"<"+offering.getLimit().intValue()+")."); if (totalCourseLimit > offering.getLimit().intValue()) ! iProgress.info("Total number of course reservations exceeds the offering limit for instructional offering "+getOfferingLabel(offering)+" ("+totalCourseLimit+">"+offering.getLimit().intValue()+")."); if (totalCourseLimit == 0) continue; --- 2437,2444 ---- if (totalCourseLimit < offering.getLimit()) ! iProgress.message(msglevel("courseReservationsBelowLimit", Progress.MSGLEVEL_WARN), "Total number of course reservations is below the offering limit for instructional offering "+getOfferingLabel(offering)+" ("+totalCourseLimit+"<"+offering.getLimit().intValue()+")."); if (totalCourseLimit > offering.getLimit().intValue()) ! iProgress.message(msglevel("courseReservationsOverLimit", Progress.MSGLEVEL_INFO), "Total number of course reservations exceeds the offering limit for instructional offering "+getOfferingLabel(offering)+" ("+totalCourseLimit+">"+offering.getLimit().intValue()+")."); if (totalCourseLimit == 0) continue; *************** *** 2462,2471 **** if (studentIds == null || studentIds.isEmpty()) { ! iProgress.info("No student enrollments for offering "+getOfferingLabel(course)+"."); continue; } if (courseLimit == 0) { ! iProgress.warn("No reserved space for students of offering "+getOfferingLabel(course)+"."); } --- 2474,2483 ---- if (studentIds == null || studentIds.isEmpty()) { ! iProgress.message(msglevel("offeringWithoutDemand", Progress.MSGLEVEL_INFO), "No student enrollments for offering "+getOfferingLabel(course)+"."); continue; } if (courseLimit == 0) { ! iProgress.message(msglevel("noCourseReservation", Progress.MSGLEVEL_WARN), "No reserved space for students of offering "+getOfferingLabel(course)+"."); } *************** *** 2501,2505 **** if (courseLimit >= limit) { if (courseLimit > limit) ! iProgress.warn("Too little space reserved in "+getSubpartLabel(subpart)+" for course "+getOfferingLabel(course)+" ("+limit+"<"+courseLimit+")."); for (CourseOffering co: offering.getCourseOfferings()) { if (co.equals(course)) continue; --- 2513,2517 ---- if (courseLimit >= limit) { if (courseLimit > limit) ! iProgress.message(msglevel("insufficientCourseReservation", Progress.MSGLEVEL_WARN), "Too little space reserved in "+getSubpartLabel(subpart)+" for course "+getOfferingLabel(course)+" ("+limit+"<"+courseLimit+")."); for (CourseOffering co: offering.getCourseOfferings()) { if (co.equals(course)) continue; *************** *** 2587,2591 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); if (iCommittedStudentConflictsMode == CommittedStudentConflictsMode.Load && !iStudentCourseDemands.isMakingUpStudents()) --- 2599,2603 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); if (iCommittedStudentConflictsMode == CommittedStudentConflictsMode.Load && !iStudentCourseDemands.isMakingUpStudents()) *************** *** 2595,2599 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); Hashtable<Student, Set<Lecture>> iPreEnrollments = new Hashtable<Student, Set<Lecture>>(); --- 2607,2611 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); Hashtable<Student, Set<Lecture>> iPreEnrollments = new Hashtable<Student, Set<Lecture>>(); *************** *** 2634,2638 **** iProgress.incProgress(); } ! iProgress.info("Loaded " + totalEnrollments + " enrollments of " + iPreEnrollments.size() + " students."); } else { // Load enrollments from selected / committed solutions --- 2646,2650 ---- iProgress.incProgress(); } ! iProgress.message(msglevel("enrollmentsLoaded", Progress.MSGLEVEL_INFO), "Loaded " + totalEnrollments + " enrollments of " + iPreEnrollments.size() + " students."); } else { // Load enrollments from selected / committed solutions *************** *** 2719,2728 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); if (hasRoomAvailability()) loadRoomAvailability(RoomAvailability.getInstance()); if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); iProgress.setPhase("Initial sectioning ...", iOfferings.size()); --- 2731,2740 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); if (hasRoomAvailability()) loadRoomAvailability(RoomAvailability.getInstance()); if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); iProgress.setPhase("Initial sectioning ...", iOfferings.size()); *************** *** 2753,2757 **** for (Lecture lecture: lectures) { if (!lecture.students().contains(student)) { ! iProgress.warn("Student " + student.getId() + " is supposed to be enrolled to " + getClassLabel(lecture)); } } --- 2765,2769 ---- for (Lecture lecture: lectures) { if (!lecture.students().contains(student)) { ! iProgress.message(msglevel("studentNotEnrolled", Progress.MSGLEVEL_WARN), "Student " + student.getId() + " is supposed to be enrolled to " + getClassLabel(lecture)); } } *************** *** 2765,2771 **** } if (instead != null) ! iProgress.warn("Student " + student.getId() + " is NOT supposed to be enrolled to " + getClassLabel(lecture) + ", he/she should have " + getClassLabel(instead) + " instead."); else ! iProgress.info("Student " + student.getId() + " is NOT supposed to be enrolled to " + getClassLabel(lecture) + "."); } } --- 2777,2783 ---- } if (instead != null) ! iProgress.message(msglevel("studentEnrolled", Progress.MSGLEVEL_WARN), "Student " + student.getId() + " is NOT supposed to be enrolled to " + getClassLabel(lecture) + ", he/she should have " + getClassLabel(instead) + " instead."); else ! iProgress.message(msglevel("studentEnrolled", Progress.MSGLEVEL_INFO), "Student " + student.getId() + " is NOT supposed to be enrolled to " + getClassLabel(lecture) + "."); } } *************** *** 2774,2778 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); iProgress.setPhase("Computing jenrl ...",iStudents.size()); --- 2786,2790 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); iProgress.setPhase("Computing jenrl ...",iStudents.size()); *************** *** 2802,2806 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); if (solutions!=null) { --- 2814,2818 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); if (solutions!=null) { *************** *** 2827,2831 **** if (!hibSession.isOpen()) ! iProgress.fatal("Hibernate session not open."); if (iSpread) { --- 2839,2843 ---- if (!hibSession.isOpen()) ! iProgress.message(msglevel("hibernateFailure", Progress.MSGLEVEL_FATAL), "Hibernate session not open."); if (iSpread) { *************** *** 2849,2853 **** } if (spread.variables().isEmpty()) ! iProgress.warn("No class for course "+getSubpartLabel(subpart)); else getModel().addConstraint(spread); --- 2861,2865 ---- } if (spread.variables().isEmpty()) ! iProgress.message(msglevel("courseWithNoClasses", Progress.MSGLEVEL_WARN), "No class for course "+getSubpartLabel(subpart)); else getModel().addConstraint(spread); *************** *** 2892,2896 **** Student s = (Student)i.next(); if (!s.canEnroll(lecture)) ! iProgress.info("Invalid student enrollment of student "+s.getId()+" in class "+getClassLabel(lecture)+" found."); } --- 2904,2908 ---- Student s = (Student)i.next(); if (!s.canEnroll(lecture)) ! iProgress.message(msglevel("badStudentEnrollment", Progress.MSGLEVEL_INFO), "Invalid student enrollment of student "+s.getId()+" in class "+getClassLabel(lecture)+" found."); } *************** *** 2906,2914 **** if (p1.canShareRooms(p2) && p1.sameRooms(p2)) continue; if (p1.getTimeLocation().hasIntersection(p2.getTimeLocation())) { ! iProgress.warn("Same instructor and overlapping time required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); } else if (ic.getDistancePreference(p1,p2)==PreferenceLevel.sIntLevelProhibited && lecture.roomLocations().size()==1 && other.roomLocations().size()==1) { ! iProgress.warn("Same instructor, back-to-back time and rooms too far (distance="+Math.round(10.0*Placement.getDistanceInMeters(getModel().getDistanceMetric(),p1,p2))+"m) required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); --- 2918,2926 ---- if (p1.canShareRooms(p2) && p1.sameRooms(p2)) continue; if (p1.getTimeLocation().hasIntersection(p2.getTimeLocation())) { ! iProgress.message(msglevel("reqInstructorOverlap", Progress.MSGLEVEL_WARN), "Same instructor and overlapping time required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); } else if (ic.getDistancePreference(p1,p2)==PreferenceLevel.sIntLevelProhibited && lecture.roomLocations().size()==1 && other.roomLocations().size()==1) { ! iProgress.message(msglevel("reqInstructorBackToBack", Progress.MSGLEVEL_WARN), "Same instructor, back-to-back time and rooms too far (distance="+Math.round(10.0*Placement.getDistanceInMeters(getModel().getDistanceMetric(),p1,p2))+"m) required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); *************** *** 2925,2929 **** Placement p2 = other.values().get(0); if (p1.shareRooms(p2) && p1.getTimeLocation().hasIntersection(p2.getTimeLocation()) && !p1.canShareRooms(p2)) { ! iProgress.warn("Same room and overlapping time required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); --- 2937,2941 ---- Placement p2 = other.values().get(0); if (p1.shareRooms(p2) && p1.getTimeLocation().hasIntersection(p2.getTimeLocation()) && !p1.canShareRooms(p2)) { ! iProgress.message(msglevel("reqRoomOverlap", Progress.MSGLEVEL_WARN), "Same room and overlapping time required:"+ "<br> "+getClassLabel(lecture)+" ← "+p1.getLongName()+ "<br> "+getClassLabel(other)+" ← "+p2.getLongName()); *************** *** 2962,2966 **** } } ! iProgress.warn("Class "+getClassLabel(lecture)+" requires an invalid placement "+placement.getLongName()+(reason.length()==0?".":":"+reason)); } else if (iAssignSingleton && getModel().conflictValues(placement).isEmpty()) lecture.assign(0, placement); --- 2974,2978 ---- } } ! iProgress.message(msglevel("reqInvalidPlacement", Progress.MSGLEVEL_WARN), "Class "+getClassLabel(lecture)+" requires an invalid placement "+placement.getLongName()+(reason.length()==0?".":":"+reason)); } else if (iAssignSingleton && getModel().conflictValues(placement).isEmpty()) lecture.assign(0, placement); *************** *** 2969,2973 **** if (getModel().getProperties().getPropertyBoolean("General.EnrollmentCheck", true)) ! new EnrollmentCheck(getModel()).checkStudentEnrollments(iProgress); if (getModel().getProperties().getPropertyBoolean("General.SwitchStudents",true) && !getModel().assignedVariables().isEmpty() && !iLoadStudentEnrlsFromSolution) --- 2981,2985 ---- if (getModel().getProperties().getPropertyBoolean("General.EnrollmentCheck", true)) ! new EnrollmentCheck(getModel(), msglevel("enrollmentCheck", Progress.MSGLEVEL_WARN)).checkStudentEnrollments(iProgress); if (getModel().getProperties().getPropertyBoolean("General.SwitchStudents",true) && !getModel().assignedVariables().isEmpty() && !iLoadStudentEnrlsFromSolution) *************** *** 2975,2979 **** iProgress.setPhase("Done",1);iProgress.incProgress(); ! iProgress.info("Model successfully loaded."); } --- 2987,2991 ---- iProgress.setPhase("Done",1);iProgress.incProgress(); ! iProgress.message(msglevel("allDone", Progress.MSGLEVEL_INFO), "Model successfully loaded."); } *************** *** 3001,3005 **** } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.warn("Unable to access room availability service, reason:"+e.getMessage()); return false; } --- 3013,3017 ---- } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.message(msglevel("roomAvailabilityFailure", Progress.MSGLEVEL_WARN), "Unable to access room availability service, reason:"+e.getMessage()); return false; } *************** *** 3016,3020 **** } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.warn("Unable to access room availability service, reason:"+e.getMessage()); } } --- 3028,3032 ---- } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.message(msglevel("roomAvailabilityFailure", Progress.MSGLEVEL_WARN), "Unable to access room availability service, reason:"+e.getMessage()); } } *************** *** 3112,3116 **** } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.warn("Unable to access room availability service, reason:"+e.getMessage()); } if (!iRoomAvailabilityTimeStampIsSet) { --- 3124,3128 ---- } catch (Exception e) { sLog.error(e.getMessage(),e); ! iProgress.message(msglevel("roomAvailabilityFailure", Progress.MSGLEVEL_WARN), "Unable to access room availability service, reason:"+e.getMessage()); } if (!iRoomAvailabilityTimeStampIsSet) { *************** *** 3118,3124 **** if (ts!=null) { getModel().getProperties().setProperty("RoomAvailability.TimeStamp", ts); ! iProgress.info("Using room availability that was updated on "+ts+"."); } else { ! iProgress.error("Room availability is not available."); } } --- 3130,3136 ---- if (ts!=null) { getModel().getProperties().setProperty("RoomAvailability.TimeStamp", ts); ! iProgress.message(msglevel("roomAvailabilityUpdated", Progress.MSGLEVEL_INFO), "Using room availability that was updated on "+ts+"."); } else { ! iProgress.message(msglevel("roomAvailabilityFailure", Progress.MSGLEVEL_ERROR), "Room availability is not available."); } } |
|
From: Nightly B. <no...@un...> - 2010-12-09 23:51:31
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-09 15:14:46
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv26635/JavaSource/org/unitime/timetable/solver Modified Files: TimetableSolver.java Log Message: findString can be null Index: TimetableSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableSolver.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TimetableSolver.java 8 Dec 2010 22:13:05 -0000 1.8 --- TimetableSolver.java 9 Dec 2010 15:14:38 -0000 1.9 *************** *** 584,588 **** public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode, boolean showEvents) { Vector models = new Vector(); ! Query q = new Query(findString); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); --- 584,588 ---- public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode, boolean showEvents) { Vector models = new Vector(); ! Query q = (findString == null ? null : new Query(findString)); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); |
|
From: Nightly B. <no...@un...> - 2010-12-08 23:51:03
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |
|
From: Tomas M. <to...@us...> - 2010-12-08 22:41:21
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/ui In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv24250/JavaSource/org/unitime/timetable/solver/ui Modified Files: StudentConflictsReport.java Log Message: model.constantVariables() can be null Index: StudentConflictsReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/ui/StudentConflictsReport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StudentConflictsReport.java 1 Dec 2010 11:10:38 -0000 1.3 --- StudentConflictsReport.java 8 Dec 2010 22:41:13 -0000 1.4 *************** *** 46,53 **** iGroups.addAll(JenrlInfo.getCommitedJenrlInfos(solver, lecture).values()); } ! for (Lecture lecture: model.constantVariables()) { ! if (lecture.getAssignment() != null) ! iGroups.addAll(JenrlInfo.getCommitedJenrlInfos(solver, lecture).values()); ! } } --- 46,54 ---- iGroups.addAll(JenrlInfo.getCommitedJenrlInfos(solver, lecture).values()); } ! if (model.constantVariables() != null) ! for (Lecture lecture: model.constantVariables()) { ! if (lecture.getAssignment() != null) ! iGroups.addAll(JenrlInfo.getCommitedJenrlInfos(solver, lecture).values()); ! } } |
|
From: Tomas M. <to...@us...> - 2010-12-08 22:16:28
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15891/JavaSource/org/unitime/timetable/test Modified Files: MasarykDefaultPreferences.java Log Message: change 2h ext time pattern to 2h, with the strongly prefered time around the assigned time (preferred for the around times in different days) Index: MasarykDefaultPreferences.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/MasarykDefaultPreferences.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MasarykDefaultPreferences.java 3 Dec 2010 21:33:57 -0000 1.4 --- MasarykDefaultPreferences.java 8 Dec 2010 22:16:20 -0000 1.5 *************** *** 74,77 **** --- 74,78 ---- public static void main(String[] args) { try { + // select count(p) from Preference p where p.owner not in (select g from PreferenceGroup g) Properties props = new Properties(); props.setProperty("log4j.rootLogger", "DEBUG, A1"); *************** *** 165,168 **** --- 166,174 ---- + TimePattern tp2h = (TimePattern)hibSession.createQuery( + "select p from TimePattern as p where p.session.uniqueId=:sessionId and p.name=:name"). + setLong("sessionId", session.getUniqueId()). + setText("name", "2h").uniqueResult(); + for (SchedulingSubpart ss: (List<SchedulingSubpart>)hibSession.createQuery( "select distinct s from SchedulingSubpart s inner join s.instrOfferingConfig.instructionalOffering.courseOfferings co where " + *************** *** 188,192 **** continue; } ! //sLog.info("Setting " + ss.getSchedulingSubpartLabel() + " ..."); if (ss.getInstrOfferingConfig().isUnlimitedEnrollment()) { --- 194,198 ---- continue; } ! sLog.info("Setting " + ss.getSchedulingSubpartLabel() + " ..."); if (ss.getInstrOfferingConfig().isUnlimitedEnrollment()) { *************** *** 287,290 **** --- 293,297 ---- } } + boolean extConv = false; if (pattern == null) { // Exact time *************** *** 299,302 **** --- 306,313 ---- c.getPreferences().add(tp); } else { + if (pattern.getName().equals("2h ext")) { + pattern = tp2h; + extConv = true; + } TimePatternModel m = pattern.getTimePatternModel(); for (int d = 0; d < m.getNrDays(); d++) *************** *** 316,319 **** --- 327,339 ---- m.setPreference(m.getNrDays() - 1, tt, PreferenceLevel.sProhibited); } + } else if (extConv && t > 0 && a.getTimeLocation().getDayCode() == m.getDayCode(d) && + a.getTimeLocation().getStartSlot() > m.getStartSlot(t-1) && + a.getTimeLocation().getStartSlot() < m.getStartSlot(t)) { + for (int dd = 0; dd < m.getNrDays(); dd++) { + m.setPreference(dd, t-1, PreferenceLevel.sPreferred); + m.setPreference(dd, t, PreferenceLevel.sPreferred); + } + m.setPreference(d, t-1, PreferenceLevel.sStronglyPreferred); + m.setPreference(d, t, PreferenceLevel.sStronglyPreferred); } } |
|
From: Tomas M. <to...@us...> - 2010-12-08 22:15:20
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/ui In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15449/JavaSource/org/unitime/timetable/solver/ui Modified Files: RoomReport.java Log Message: Room (allocation) report - if a class can be assigned in rooms of different types, do not count the class as must / should in both room types (rather not count it at all) Index: RoomReport.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/ui/RoomReport.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RoomReport.java 1 Dec 2010 11:10:38 -0000 1.4 --- RoomReport.java 8 Dec 2010 22:15:12 -0000 1.5 *************** *** 166,171 **** for (RoomLocation r: lecture.roomLocations()) { if (r.getRoomConstraint()==null) continue; - if (!ToolBox.equals(iRoomType,r.getRoomConstraint().getType())) continue; if (PreferenceLevel.sProhibited.equals(PreferenceLevel.int2prolog(r.getPreference()))) continue; skip = false; if (iMinRoomSize<=r.getRoomSize() && r.getRoomSize()<iMaxRoomSize) --- 166,175 ---- for (RoomLocation r: lecture.roomLocations()) { if (r.getRoomConstraint()==null) continue; if (PreferenceLevel.sProhibited.equals(PreferenceLevel.int2prolog(r.getPreference()))) continue; + if (!ToolBox.equals(iRoomType,r.getRoomConstraint().getType())) { + mustUse = false; + mustUseThisSizeOrBigger = false; + continue; + } skip = false; if (iMinRoomSize<=r.getRoomSize() && r.getRoomSize()<iMaxRoomSize) |
|
From: Tomas M. <to...@us...> - 2010-12-08 22:13:13
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14642/JavaSource/org/unitime/timetable/solver Modified Files: TimetableSolver.java Log Message: Timetable page - allow for boolean queries also when the solver solution is displayed Index: TimetableSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/TimetableSolver.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TimetableSolver.java 1 Dec 2010 11:10:51 -0000 1.7 --- TimetableSolver.java 8 Dec 2010 22:13:05 -0000 1.8 *************** *** 46,49 **** --- 46,51 ---- import org.hibernate.Transaction; import org.unitime.timetable.ApplicationProperties; + import org.unitime.timetable.gwt.server.Query; + import org.unitime.timetable.gwt.server.Query.TermMatcher; import org.unitime.timetable.model.Assignment; import org.unitime.timetable.model.Class_; *************** *** 559,592 **** } } ! ! private boolean match(String findString, String name) { ! if (findString==null || findString.trim().length()==0) return true; ! StringTokenizer stk = new StringTokenizer(findString.toUpperCase()," ,"); ! String n = name.toUpperCase(); ! while (stk.hasMoreTokens()) { ! String token = stk.nextToken().trim(); ! if (token.length()==0) continue; ! if (n.indexOf(token)<0) return false; ! } ! return true; } public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode, boolean showEvents) { Vector models = new Vector(); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); if (resourceType==TimetableGridModel.sResourceTypeRoom) { for (RoomConstraint rc: model.getRoomConstraints()) { ! if (!match(findString, rc.getName())) continue; models.add(new SolverGridModel(this,rc,startDay,bgMode,showEvents)); } } else if (resourceType==TimetableGridModel.sResourceTypeInstructor) { for (InstructorConstraint ic: model.getInstructorConstraints()) { ! if (!match(findString, ic.getName())) continue; models.add(new SolverGridModel(this,ic,startDay,bgMode)); } } else if (resourceType==TimetableGridModel.sResourceTypeDepartment) { for (DepartmentSpreadConstraint dc: model.getDepartmentSpreadConstraints()) { ! if (!match(findString, dc.getName())) continue; models.add(new SolverGridModel(this,dc,startDay,bgMode)); } --- 561,603 ---- } } ! ! private boolean match(Query q, final String name) { ! return q == null || q.match(new TermMatcher() { ! @Override ! public boolean match(String attr, String term) { ! if (term.isEmpty()) return true; ! if (attr == null) { ! for (StringTokenizer s = new StringTokenizer(name, " ,"); s.hasMoreTokens(); ) { ! String token = s.nextToken(); ! if (term.equalsIgnoreCase(token)) return true; ! } ! } else if ("regex".equals(attr) || "regexp".equals(attr) || "re".equals(attr)) { ! return name.matches(term); ! } else if ("find".equals(attr)) { ! return name.toLowerCase().indexOf(term.toLowerCase()) >= 0; ! } ! return false; ! } ! }); } public Vector getTimetableGridTables(String findString, int resourceType, int startDay, int bgMode, boolean showEvents) { Vector models = new Vector(); + Query q = new Query(findString); synchronized (currentSolution()) { TimetableModel model = (TimetableModel)currentSolution().getModel(); if (resourceType==TimetableGridModel.sResourceTypeRoom) { for (RoomConstraint rc: model.getRoomConstraints()) { ! if (!match(q, rc.getName())) continue; models.add(new SolverGridModel(this,rc,startDay,bgMode,showEvents)); } } else if (resourceType==TimetableGridModel.sResourceTypeInstructor) { for (InstructorConstraint ic: model.getInstructorConstraints()) { ! if (!match(q, ic.getName())) continue; models.add(new SolverGridModel(this,ic,startDay,bgMode)); } } else if (resourceType==TimetableGridModel.sResourceTypeDepartment) { for (DepartmentSpreadConstraint dc: model.getDepartmentSpreadConstraints()) { ! if (!match(q, dc.getName())) continue; models.add(new SolverGridModel(this,dc,startDay,bgMode)); } |
|
From: Nightly B. <no...@un...> - 2010-12-03 23:49:52
|
Download the resultant file at http://www.unitime.org/uct_builds.php, see the attached build and change logs for more details. |