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: Tomas M. <to...@us...> - 2011-01-14 18:24:37
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1296/JavaSource/org/unitime/timetable/solver/studentsct Modified Files: StudentSectioningDatabaseLoader.java Log Message: Student Sectioning Solver - enforce course and configuration limits Index: StudentSectioningDatabaseLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/studentsct/StudentSectioningDatabaseLoader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StudentSectioningDatabaseLoader.java 1 Dec 2010 11:10:51 -0000 1.2 --- StudentSectioningDatabaseLoader.java 14 Jan 2011 18:24:29 -0000 1.3 *************** *** 314,318 **** for (Iterator<InstrOfferingConfig> i = io.getInstrOfferingConfigs().iterator(); i.hasNext(); ) { InstrOfferingConfig ioc = i.next(); ! Config config = new Config(ioc.getUniqueId(), courseName + " [" + ioc.getName() + "]", offering); TreeSet<SchedulingSubpart> subparts = new TreeSet<SchedulingSubpart>(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); --- 314,318 ---- for (Iterator<InstrOfferingConfig> i = io.getInstrOfferingConfigs().iterator(); i.hasNext(); ) { InstrOfferingConfig ioc = i.next(); ! Config config = new Config(ioc.getUniqueId(), (ioc.isUnlimitedEnrollment() ? -1 : ioc.getLimit()), courseName + " [" + ioc.getName() + "]", offering); TreeSet<SchedulingSubpart> subparts = new TreeSet<SchedulingSubpart>(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); *************** *** 539,543 **** iProgress.error("There is a problem assigning " + cr.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + ")"); boolean hasLimit = false, hasOverlap = false; ! sections: for (Iterator<Section> i = enrl.getSections().iterator(); i.hasNext();) { Section section = i.next(); if (section.getTime() != null) { --- 539,543 ---- iProgress.error("There is a problem assigning " + cr.getName() + " to " + s.getName(DepartmentalInstructor.sNameFormatInitialLast) + " (" + s.getExternalUniqueId() + ")"); boolean hasLimit = false, hasOverlap = false; ! for (Iterator<Section> i = enrl.getSections().iterator(); i.hasNext();) { Section section = i.next(); if (section.getTime() != null) { *************** *** 553,562 **** sectionx.getName() + " " + sectionx.getTime().getLongName()); hasOverlap = true; - continue sections; } } } } ! if (section.getLimit() >= section.getEnrollments().size()) { iProgress.info(" " + section.getSubpart().getName() + " " + section.getName() + (section.getTime() == null ? "" : " " + section.getTime().getLongName()) + " has no space available (limit is "+ section.getLimit() + ")"); --- 553,561 ---- sectionx.getName() + " " + sectionx.getTime().getLongName()); hasOverlap = true; } } } } ! if (section.getLimit() >= 0 && section.getLimit() < 1 + section.getEnrollments().size()) { iProgress.info(" " + section.getSubpart().getName() + " " + section.getName() + (section.getTime() == null ? "" : " " + section.getTime().getLongName()) + " has no space available (limit is "+ section.getLimit() + ")"); *************** *** 566,573 **** } hasLimit = true; - continue sections; } iProgress.info(" " + section.getSubpart().getName() + " " + section.getName() + (section.getTime() == null ? "" : " " + section.getTime().getLongName())); } if (!hasLimit && !hasOverlap) { for (Iterator<Enrollment> i = r.getModel().conflictValues(r.getInitialAssignment()).iterator(); i.hasNext();) { --- 565,579 ---- } hasLimit = true; } iProgress.info(" " + section.getSubpart().getName() + " " + section.getName() + (section.getTime() == null ? "" : " " + section.getTime().getLongName())); } + if (enrl.getConfig().getLimit() >= 0 && enrl.getConfig().getLimit() < 1 + enrl.getConfig().getEnrollments().size()) { + iProgress.info(" config " + enrl.getConfig().getName() + " has no space available (limit is "+ enrl.getConfig().getLimit() + ")"); + if (iTweakLimits) { + enrl.getConfig().setLimit(enrl.getConfig().getEnrollments().size() + 1); + iProgress.info(" limit increased to "+enrl.getConfig().getLimit()); + } + hasLimit = true; + } if (!hasLimit && !hasOverlap) { for (Iterator<Enrollment> i = r.getModel().conflictValues(r.getInitialAssignment()).iterator(); i.hasNext();) { *************** *** 582,586 **** } } ! if (hasLimit && iTweakLimits && r.getModel().conflictValues(r.getInitialAssignment()).isEmpty()) { r.assign(0, r.getInitialAssignment()); } --- 588,592 ---- } } ! if (hasLimit && !hasOverlap && iTweakLimits && r.getModel().conflictValues(r.getInitialAssignment()).isEmpty()) { r.assign(0, r.getInitialAssignment()); } |
From: Tomas M. <to...@us...> - 2011-01-14 18:24:37
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv1296/JavaSource/org/unitime/timetable/test Modified Files: StudentSectioningTest.java BatchStudentSectioningLoader.java Log Message: Student Sectioning Solver - enforce course and configuration limits Index: BatchStudentSectioningLoader.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/BatchStudentSectioningLoader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BatchStudentSectioningLoader.java 1 Dec 2010 11:10:48 -0000 1.9 --- BatchStudentSectioningLoader.java 14 Jan 2011 18:24:29 -0000 1.10 *************** *** 279,283 **** continue; } ! Config config = new Config(ioc.getUniqueId().longValue(), ioc.getCourseName()+" ["+ioc.getName()+"]", offering); sLog.debug(" -- created config "+config); TreeSet subparts = new TreeSet(new SchedulingSubpartComparator()); --- 279,283 ---- continue; } ! Config config = new Config(ioc.getUniqueId().longValue(), (ioc.isUnlimitedEnrollment() ? -1 : ioc.getLimit()), ioc.getCourseName()+" ["+ioc.getName()+"]", offering); sLog.debug(" -- created config "+config); TreeSet subparts = new TreeSet(new SchedulingSubpartComparator()); Index: StudentSectioningTest.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/StudentSectioningTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** StudentSectioningTest.java 13 Jan 2011 23:08:48 -0000 1.8 --- StudentSectioningTest.java 14 Jan 2011 18:24:29 -0000 1.9 *************** *** 318,322 **** for (Iterator i=co.getInstructionalOffering().getInstrOfferingConfigs().iterator();i.hasNext();) { InstrOfferingConfig ioc = (InstrOfferingConfig)i.next(); ! Config config = new Config(ioc.getUniqueId().longValue(), ioc.getCourseName()+" ["+ioc.getName()+"]", offering); TreeSet subparts = new TreeSet(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); --- 318,322 ---- for (Iterator i=co.getInstructionalOffering().getInstrOfferingConfigs().iterator();i.hasNext();) { InstrOfferingConfig ioc = (InstrOfferingConfig)i.next(); ! Config config = new Config(ioc.getUniqueId().longValue(), (ioc.isUnlimitedEnrollment() ? -1 : ioc.getLimit()), ioc.getCourseName()+" ["+ioc.getName()+"]", offering); TreeSet subparts = new TreeSet(new SchedulingSubpartComparator()); subparts.addAll(ioc.getSchedulingSubparts()); *************** *** 923,927 **** Section section = (Section)i.next(); if (courseOfferingElement.attribute("subjectArea")==null) { ! Course course = section.getSubpart().getConfig().getOffering().getCourse(student); courseOfferingElement.addAttribute("subjectArea", course.getSubjectArea()); courseOfferingElement.addAttribute("courseNumber", course.getCourseNumber()); --- 923,927 ---- Section section = (Section)i.next(); if (courseOfferingElement.attribute("subjectArea")==null) { ! Course course = enrollment.getCourse(); courseOfferingElement.addAttribute("subjectArea", course.getSubjectArea()); courseOfferingElement.addAttribute("courseNumber", course.getCourseNumber()); |
From: Tomas M. <to...@us...> - 2011-01-14 13:59:31
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20951/JavaSource/org/unitime/timetable/solver Modified Files: WebSolver.java Log Message: Student sectioning (batch) solver -- enable time overlaps Index: WebSolver.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/solver/WebSolver.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** WebSolver.java 1 Dec 2010 11:10:51 -0000 1.14 --- WebSolver.java 14 Jan 2011 13:59:23 -0000 1.15 *************** *** 386,389 **** --- 386,393 ---- ext.append("net.sf.cpsolver.studentsct.extension.DistanceConflict"); } + if (properties.getPropertyBoolean("StudentSct.TimeOverlaps",true)) { + if (ext.length()>0) ext.append(";"); + ext.append("net.sf.cpsolver.studentsct.extension.TimeOverlapsCounter"); + } } properties.setProperty("Extensions.Classes",ext.toString()); |
From: Nightly B. <no...@un...> - 2011-01-13 23:49:35
|
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...> - 2011-01-13 23:09:29
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14478/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.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** Release-Notes.xml 11 Jan 2011 16:51:45 -0000 1.81 --- Release-Notes.xml 13 Jan 2011 23:09:21 -0000 1.82 *************** *** 30,33 **** --- 30,73 ---- <title>User interface</title> <item> + <name>Student Scheduling Assistant</name> + <description> + <line>Adopted to use the new priority weighting model + <line>adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected</line> + </line> + <line>Only show Enroll button when it is available</line> + <line>Show LoadingWidget while waiting</line> + <line>Display free time requests as red background in the timetable grid</line> + </description> + </item> + </category> + <category> + <title>Constraint Solver Update (CPSolver 1.2.26)</title> + <item> + <name>Student Sectioning Solver</name> + <description> + <line>New priority weighting model: + <line>total student weight is between zero and one (one means student got the best schedule)</line> + <line>weight of the given priority course is higher than sum of the remaining weights the student can get</line> + <line>first alternative is better than the following course</line> + <line>second alternative is better than the second following course</line> + <line>distance conflicts are considered secondary (priorities should be maximized first), and only counted on the lower priority course</line> + <line>time overlaps can cut up to 50% of the weight on both courses that overlap (when overlapping completely)</line> + </line> + <line>Time overlaps: + <line>added ability for some classes to overlap (time overlap is minimized) -- to be defined on scheduling subparts</line> + <line>minimize overlaps with free times (when those cannot be fully satisfied)</line> + </line> + <line>Batch sectioning: added a new priority based construction phase</line> + </description> + </item> + </category> + </release> + + <release> + <version>3.2.113</version> + <release-date>Wed, 12 Jan 2011</release-date> + <category> + <title>User interface</title> + <item> <name>Buildings -- Update Rooms</name> <description> |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/server Modified Files: SectioningServer.java SectioningServlet.java SuggestionSelection.java Added Files: StudentSchedulingAssistantWeights.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid --- NEW FILE: StudentSchedulingAssistantWeights.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.server; import java.util.Hashtable; import java.util.Iterator; import java.util.Set; import net.sf.cpsolver.ifs.util.DataProperties; import net.sf.cpsolver.studentsct.extension.DistanceConflict; import net.sf.cpsolver.studentsct.extension.TimeOverlapsCounter; import net.sf.cpsolver.studentsct.model.Config; import net.sf.cpsolver.studentsct.model.Course; import net.sf.cpsolver.studentsct.model.CourseRequest; import net.sf.cpsolver.studentsct.model.Enrollment; import net.sf.cpsolver.studentsct.model.FreeTimeRequest; import net.sf.cpsolver.studentsct.model.Request; import net.sf.cpsolver.studentsct.model.Section; import net.sf.cpsolver.studentsct.model.Subpart; import net.sf.cpsolver.studentsct.weights.PriorityStudentWeights; /** * @author Tomas Muller */ public class StudentSchedulingAssistantWeights extends PriorityStudentWeights { /** deduction for section with no time assignment */ private double iNoTimeFactor = 0.050; /** deduction for sections that are not preferred (different time & instructor) */ private double iPreferenceFactor = 0.250; /** deduction for over expected sections */ private double iPenaltyFactor = 0.500; private Hashtable<CourseRequest, Double> iBestTime = new Hashtable<CourseRequest, Double>(); public StudentSchedulingAssistantWeights(DataProperties properties) { super(properties); iNoTimeFactor = properties.getPropertyDouble("StudentWeights.NoTimeFactor", iNoTimeFactor); iPreferenceFactor = properties.getPropertyDouble("StudentWeights.PreferenceFactor", iPreferenceFactor); iPenaltyFactor = properties.getPropertyDouble("StudentWeights.PenaltyFactor", iPenaltyFactor); } private double bestTime(Request r) { if (r instanceof FreeTimeRequest) return 1.0; CourseRequest cr = (CourseRequest)r; Double cached = iBestTime.get(cr); if (cached != null) return cached.doubleValue(); double bestTime = 0; for (Iterator<Course> e = cr.getCourses().iterator(); e.hasNext();) { Course course = e.next(); for (Iterator<Config> f = course.getOffering().getConfigs().iterator(); f.hasNext();) { Config config = f.next(); int nrSubpartsWithTime = 0; subparts: for (Iterator<Subpart> g = config.getSubparts().iterator(); g.hasNext(); ) { Subpart subpart = g.next(); for (Iterator<Section> h = subpart.getSections().iterator(); h.hasNext(); ) { Section section = h.next(); if (section.getTime() != null) { nrSubpartsWithTime++; continue subparts; } } } double time = ((double)nrSubpartsWithTime / config.getSubparts().size()); if (time > bestTime) bestTime = time; } } iBestTime.put(cr, bestTime); return bestTime; } @Override public double getWeight(Enrollment enrollment) { if (enrollment.getAssignments().isEmpty()) return 0; double base = super.getWeight(enrollment); double weight = base; int size = enrollment.getAssignments().size(); double hasTime = 0; double penalty = 0; if (enrollment.isCourseRequest() && enrollment.getAssignments() != null) { for (Section section: enrollment.getSections()) { if (section.getTime() != null) hasTime++; if (section.getPenalty() > 0.0) penalty++; } } else { hasTime = 1.0; } double noTime = bestTime(enrollment.getRequest()) - (hasTime / size); double penaltyFraction = penalty / size; double selectedFraction = 1.0; if (enrollment.isCourseRequest() && enrollment.getAssignments() != null) { CourseRequest cr = (CourseRequest)enrollment.getRequest(); int nrSelected = 0; if (!cr.getSelectedChoices().isEmpty()) { for (Section section: enrollment.getSections()) { if (cr.getSelectedChoices().contains(section.getChoice())) nrSelected++; } } selectedFraction = (size - nrSelected) / size; } weight -= penaltyFraction * base * iPenaltyFactor; weight -= selectedFraction * base * iPreferenceFactor; weight -= noTime * base * iNoTimeFactor; return weight; } @Override public double getWeight(Enrollment enrollment, Set<DistanceConflict.Conflict> distanceConflicts, Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts) { if (enrollment.getAssignments().isEmpty()) return 0; double weight = getWeight(enrollment); if (distanceConflicts != null) for (DistanceConflict.Conflict c: distanceConflicts) { Enrollment other = (c.getE1().equals(enrollment) ? c.getE2() : c.getE1()); if (other.getRequest().getPriority() <= enrollment.getRequest().getPriority()) weight -= getDistanceConflictWeight(c); } if (timeOverlappingConflicts != null) for (TimeOverlapsCounter.Conflict c: timeOverlappingConflicts) { weight -= getTimeOverlapConflictWeight(enrollment, c); } return weight; } } Index: SectioningServlet.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/SectioningServlet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SectioningServlet.java 1 Dec 2010 11:10:49 -0000 1.2 --- SectioningServlet.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 514,518 **** setLastRequest(request); request.setStudentId(getStudentId(request.getAcademicSessionId())); ! return SectioningServer.getInstance(request.getAcademicSessionId()).section(request, currentAssignment); } catch (Exception e) { if (e instanceof SectioningException) throw (SectioningException)e; --- 514,530 ---- setLastRequest(request); request.setStudentId(getStudentId(request.getAcademicSessionId())); ! ClassAssignmentInterface ret = SectioningServer.getInstance(request.getAcademicSessionId()).section(request, currentAssignment); ! if (ret != null) { ! ret.setCanEnroll(true); ! if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.enabled","true"))) { ! ret.setCanEnroll(false); ! } else { ! UniTimePrincipal principal = (UniTimePrincipal)getThreadLocalRequest().getSession().getAttribute("user"); ! if (principal == null || principal.getStudentId(request.getAcademicSessionId()) == null) { ! ret.setCanEnroll(false); ! } ! } ! } ! return ret; } catch (Exception e) { if (e instanceof SectioningException) throw (SectioningException)e; *************** *** 562,566 **** request.setStudentId(getStudentId(request.getAcademicSessionId())); ClassAssignmentInterface.ClassAssignment selectedAssignment = ((List<ClassAssignmentInterface.ClassAssignment>)currentAssignment).get(selectedAssignmentIndex); ! return SectioningServer.getInstance(request.getAcademicSessionId()).computeSuggestions(request, currentAssignment, selectedAssignment); } catch (Exception e) { if (e instanceof SectioningException) throw (SectioningException)e; --- 574,592 ---- request.setStudentId(getStudentId(request.getAcademicSessionId())); ClassAssignmentInterface.ClassAssignment selectedAssignment = ((List<ClassAssignmentInterface.ClassAssignment>)currentAssignment).get(selectedAssignmentIndex); ! Collection<ClassAssignmentInterface> ret = SectioningServer.getInstance(request.getAcademicSessionId()).computeSuggestions(request, currentAssignment, selectedAssignment); ! if (ret != null) { ! boolean canEnroll = true; ! if (!"true".equals(ApplicationProperties.getProperty("unitime.enrollment.enabled","true"))) { ! canEnroll = false; ! } else { ! UniTimePrincipal principal = (UniTimePrincipal)getThreadLocalRequest().getSession().getAttribute("user"); ! if (principal == null || principal.getStudentId(request.getAcademicSessionId()) == null) { ! canEnroll = false; ! } ! } ! for (ClassAssignmentInterface ca: ret) ! ca.setCanEnroll(canEnroll); ! } ! return ret; } catch (Exception e) { if (e instanceof SectioningException) throw (SectioningException)e; Index: SuggestionSelection.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/SuggestionSelection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SuggestionSelection.java 1 Dec 2010 11:10:49 -0000 1.2 --- SuggestionSelection.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 20,31 **** package org.unitime.timetable.gwt.server; - import java.util.Iterator; import java.util.Hashtable; import java.util.Set; import net.sf.cpsolver.ifs.util.DataProperties; import net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection; import net.sf.cpsolver.studentsct.model.Config; - import net.sf.cpsolver.studentsct.model.Course; import net.sf.cpsolver.studentsct.model.CourseRequest; import net.sf.cpsolver.studentsct.model.Enrollment; --- 20,33 ---- package org.unitime.timetable.gwt.server; import java.util.Hashtable; + import java.util.List; + import java.util.Map; import java.util.Set; import net.sf.cpsolver.ifs.util.DataProperties; + import net.sf.cpsolver.studentsct.extension.DistanceConflict; + import net.sf.cpsolver.studentsct.extension.TimeOverlapsCounter; import net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection; import net.sf.cpsolver.studentsct.model.Config; import net.sf.cpsolver.studentsct.model.CourseRequest; import net.sf.cpsolver.studentsct.model.Enrollment; *************** *** 40,66 **** */ public class SuggestionSelection extends BranchBoundSelection { - protected double iPreferenceWeight = 100000.0; - protected double iNoTimeWeight = 1.0; - protected double iNotAssignedWeight = 10000.0; - protected double iOnlinePenaltyWeight = 10.0; - protected double iOverlappingFreeTimeWeight = 10.0; - protected double iPriorotyFactor = 0.90; - protected Hashtable<CourseRequest, Set<Section>> iPreferredSections, iRequiredSections; protected Set<FreeTimeRequest> iRequiredFreeTimes; public SuggestionSelection(DataProperties properties, Hashtable<CourseRequest, Set<Section>> preferredSections, Hashtable<CourseRequest, Set<Section>> requiredSections, Set<FreeTimeRequest> requiredFreeTimes) { super(properties); - iPreferenceWeight = properties.getPropertyDouble("Suggestions.PreferredSectionWeight", iPreferenceWeight); - iNoTimeWeight = properties.getPropertyDouble("Suggestions.NoTimeWeight", iNoTimeWeight); - iNotAssignedWeight = properties.getPropertyDouble("Suggestions.NotAssignedWeight", iNotAssignedWeight); - iOnlinePenaltyWeight = properties.getPropertyDouble("Suggestions.OnlinePenaltyWeight", iOnlinePenaltyWeight); - iDistConfWeight = properties.getPropertyDouble("Suggestions.DistanceConflictWeight", 25.0); - iOverlappingFreeTimeWeight = properties.getPropertyDouble("Suggestions.OverlappingFreeTimeWeight", iOverlappingFreeTimeWeight); - iPriorotyFactor = properties.getPropertyDouble("Suggestions.PriorityFactor", iPriorotyFactor); - iPreferredSections = preferredSections; - iRequiredSections = requiredSections; - iMinimizePenalty = true; iRequiredFreeTimes = requiredFreeTimes; } --- 42,66 ---- */ public class SuggestionSelection extends BranchBoundSelection { protected Set<FreeTimeRequest> iRequiredFreeTimes; + protected Hashtable<CourseRequest, Config> iRequiredConfig = new Hashtable<CourseRequest, Config>(); + protected Hashtable<CourseRequest, Hashtable<Subpart, Section>> iRequiredSection = new Hashtable<CourseRequest, Hashtable<Subpart,Section>>(); + protected Hashtable<CourseRequest, Set<Section>> iPreferredSections = null; public SuggestionSelection(DataProperties properties, Hashtable<CourseRequest, Set<Section>> preferredSections, Hashtable<CourseRequest, Set<Section>> requiredSections, Set<FreeTimeRequest> requiredFreeTimes) { super(properties); iRequiredFreeTimes = requiredFreeTimes; + if (requiredSections != null) { + for (Map.Entry<CourseRequest, Set<Section>> entry: requiredSections.entrySet()) { + Hashtable<Subpart, Section> subSection = new Hashtable<Subpart, Section>(); + iRequiredSection.put(entry.getKey(), subSection); + for (Section section: entry.getValue()) { + if (subSection.isEmpty()) + iRequiredConfig.put(entry.getKey(), section.getSubpart().getConfig()); + subSection.put(section.getSubpart(), section); + } + } + } + iPreferredSections = preferredSections; } *************** *** 69,165 **** } - public class Selection extends BranchBoundSelection.Selection { - private Hashtable<CourseRequest, Double> iBestTime = new Hashtable<CourseRequest, Double>(); - public Selection(Student student) { super(student); } - @SuppressWarnings("unchecked") - private double bestTime(Request r) { - if (r instanceof FreeTimeRequest) return 1.0; - CourseRequest cr = (CourseRequest)r; - Double cached = iBestTime.get(cr); - if (cached != null) return cached.doubleValue(); - double bestTime = 0; - for (Iterator<Course> e = cr.getCourses().iterator(); e.hasNext();) { - Course course = e.next(); - for (Iterator<Config> f = course.getOffering().getConfigs().iterator(); f.hasNext();) { - Config config = f.next(); - int nrSubpartsWithTime = 0; - subparts: for (Iterator<Subpart> g = config.getSubparts().iterator(); g.hasNext(); ) { - Subpart subpart = g.next(); - for (Iterator<Section> h = subpart.getSections().iterator(); h.hasNext(); ) { - Section section = h.next(); - if (section.getTime() != null) { nrSubpartsWithTime++; continue subparts; } - } - } - double time = ((double)nrSubpartsWithTime / config.getSubparts().size()); - if (time > bestTime) bestTime = time; - } - } - iBestTime.put(cr, bestTime); - return bestTime; - } - - @Override - public double getPenalty() { - double bestPenalty = 0; - for (int i = 0; i < iAssignment.length; i++) - if (iAssignment[i] != null) - bestPenalty += getAssignmentPenalty(i); - else - bestPenalty += iNotAssignedWeight * Math.pow(iPriorotyFactor, iStudent.getRequests().get(i).getPriority()); - return bestPenalty; - } - - @SuppressWarnings("unchecked") - protected double getAssignmentPenalty(int i) { - double preferredFraction = 0.0; - int hasTime = 0; - double noTime = 0; - int penalty = 0; - int freeTimeOverlap = 0; - if (iAssignment[i].getAssignments() != null && iAssignment[i].isCourseRequest()) { - CourseRequest cr = (CourseRequest)iAssignment[i].getRequest(); - int nrPreferred = 0; - int nrSelected = 0; - Set<Section> preferredSections = iPreferredSections.get(cr); - if (preferredSections != null) - for (Iterator<Section> j = iAssignment[i].getSections().iterator(); j.hasNext();) { - Section section = j.next(); - if (preferredSections.contains(section)) nrPreferred++; - } - if (!cr.getSelectedChoices().isEmpty()) { - for (Iterator<Section> j = iAssignment[i].getSections().iterator(); j.hasNext();) { - Section section = j.next(); - if (cr.getSelectedChoices().contains(section.getChoice())) nrSelected++; - } - } - preferredFraction = (0.67 * nrPreferred + 0.33 * nrSelected) / iAssignment[i].getAssignments().size(); - for (Iterator<Section> j = iAssignment[i].getSections().iterator(); j.hasNext();) { - Section section = j.next(); - if (section.getTime() != null) hasTime++; - if (section.getPenalty() > 0.0) penalty++; - } - noTime = bestTime(iAssignment[i].getRequest()) - (((double)hasTime) / iAssignment[i].getAssignments().size()); - freeTimeOverlap = iStudent.countFreeTimeOverlaps(iAssignment[i]); - } - return - iOnlinePenaltyWeight * penalty + - iDistConfWeight * getNrDistanceConflicts(i) + - (1.0 - preferredFraction) * iPreferenceWeight + - noTime * iNoTimeWeight + - freeTimeOverlap * iOverlappingFreeTimeWeight; - } - public boolean isAllowed(int idx, Enrollment enrollment) { if (enrollment.isCourseRequest()) { ! Set<Section> reqSections = iRequiredSections.get((CourseRequest)enrollment.getRequest()); ! if (reqSections != null && !reqSections.isEmpty()) { ! if (enrollment.getAssignments() == null || enrollment.getAssignments().isEmpty()) return false; ! for (Section req: reqSections) { ! if (!enrollment.getAssignments().contains(req)) return false; } } --- 69,88 ---- } public class Selection extends BranchBoundSelection.Selection { public Selection(Student student) { super(student); } public boolean isAllowed(int idx, Enrollment enrollment) { if (enrollment.isCourseRequest()) { ! CourseRequest request = (CourseRequest)enrollment.getRequest(); ! Config reqConfig = iRequiredConfig.get(request); ! if (reqConfig != null) { ! if (!reqConfig.equals(enrollment.getConfig())) return false; ! Hashtable<Subpart, Section> reqSections = iRequiredSection.get(request); ! for (Section section: enrollment.getSections()) { ! Section reqSection = reqSections.get(section.getSubpart()); ! if (reqSection == null) continue; ! if (!section.equals(reqSection)) return false; } } *************** *** 170,186 **** } public Enrollment firstConflict(int idx, Enrollment enrollment) { Enrollment conflict = super.firstConflict(idx, enrollment); if (conflict!=null) return conflict; ! return (isAllowed(idx, enrollment)?null:enrollment); } protected boolean canLeaveUnassigned(Request request) { if (request instanceof CourseRequest) { ! Set<Section> reqSections = iRequiredSections.get(request); ! if (reqSections != null && !reqSections.isEmpty()) return false; } else if (iRequiredFreeTimes.contains(request)) return false; return true; } } } --- 93,143 ---- } + @Override public Enrollment firstConflict(int idx, Enrollment enrollment) { Enrollment conflict = super.firstConflict(idx, enrollment); if (conflict!=null) return conflict; ! return (isAllowed(idx, enrollment) ? null : enrollment); } + @Override protected boolean canLeaveUnassigned(Request request) { if (request instanceof CourseRequest) { ! if (iRequiredConfig.get(request) != null) return false; } else if (iRequiredFreeTimes.contains(request)) return false; return true; } + + @Override + protected List<Enrollment> values(final CourseRequest request) { + return super.values(request); + } + + @Override + protected double getWeight(Enrollment enrollment, Set<DistanceConflict.Conflict> distanceConflicts, Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts) { + double weight = super.getWeight(enrollment, distanceConflicts, timeOverlappingConflicts); + if (enrollment.isCourseRequest() && iPreferredSections != null) { + Set<Section> preferred = iPreferredSections.get((CourseRequest)enrollment.getRequest()); + if (preferred != null && !preferred.isEmpty()) { + double nrPreferred = 0; + for (Section section: enrollment.getSections()) + if (preferred.contains(section)) nrPreferred ++; + double preferredFraction = nrPreferred / preferred.size(); + weight *= 1.0 + 0.5 * preferredFraction; // add up to 50% for preferred sections + } + } + return weight; + } + + @Override + protected double getBound(Request r) { + double bound = super.getBound(r); + if (r instanceof CourseRequest) { + Set<Section> preferred = iPreferredSections.get((CourseRequest)r); + if (preferred != null && !preferred.isEmpty()) + bound *= 1.5; // add 50% if can be preferred + } + return bound; + } + } } Index: SectioningServer.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/server/SectioningServer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SectioningServer.java 1 Dec 2010 11:10:49 -0000 1.2 --- SectioningServer.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 45,48 **** --- 45,49 ---- import net.sf.cpsolver.studentsct.constraint.SectionLimit; import net.sf.cpsolver.studentsct.extension.DistanceConflict; + import net.sf.cpsolver.studentsct.extension.TimeOverlapsCounter; import net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection; import net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.BranchBoundNeighbour; *************** *** 337,340 **** --- 338,342 ---- Subpart clonedSubpart = new Subpart(subpart.getId(), subpart.getInstructionalType(), subpart.getName(), clonedConfig, (subpart.getParent() == null ? null: subparts.get(subpart.getParent()))); + clonedSubpart.setAllowOverlap(subpart.isAllowOverlap()); subparts.put(subpart, clonedSubpart); for (Iterator<Section> g = subpart.getSections().iterator(); g.hasNext();) { *************** *** 772,778 **** public ClassAssignmentInterface section(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> currentAssignment) throws SectioningException { long t0 = System.currentTimeMillis(); ! StudentSectioningModel model = new StudentSectioningModel(new DataProperties(ApplicationProperties.getProperties())); ! model.getProperties().setProperty("Neighbour.BranchAndBoundTimeout", "1000"); ! model.getProperties().setProperty("Extensions.Classes", "net.sf.cpsolver.studentsct.extension.DistanceConflict"); model.addGlobalConstraint(new SectionLimit(model.getProperties())); Student student = new Student(request.getStudentId() == null ? -1l : request.getStudentId()); --- 774,783 ---- public ClassAssignmentInterface section(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> currentAssignment) throws SectioningException { long t0 = System.currentTimeMillis(); ! DataProperties config = new DataProperties(ApplicationProperties.getProperties()); ! config.setProperty("Neighbour.BranchAndBoundTimeout", "1000"); ! config.setProperty("Extensions.Classes", DistanceConflict.class.getName() + ";" + TimeOverlapsCounter.class.getName()); ! config.setProperty("Student.WeightsClass", StudentSchedulingAssistantWeights.class.getName()); ! config.setProperty("Distances.Ellipsoid", ApplicationProperties.getProperty("unitime.distance.ellipsoid", DistanceMetric.Ellipsoid.LEGACY.name())); ! StudentSectioningModel model = new StudentSectioningModel(config); model.addGlobalConstraint(new SectionLimit(model.getProperties())); Student student = new Student(request.getStudentId() == null ? -1l : request.getStudentId()); *************** *** 802,806 **** continue a; } ! if (a.isPinned()) requiredSections.add(section); preferredSections.add(section); --- 807,811 ---- continue a; } ! if (a.isPinned() || a.isSaved()) requiredSections.add(section); preferredSections.add(section); *************** *** 835,838 **** --- 840,845 ---- BranchBoundSelection.Selection selection = onlineSelection.getSelection(student); BranchBoundNeighbour neighbour = selection.select(); + neighbour.assign(0); + sLog.info("Solution: " + neighbour); long t3 = System.currentTimeMillis(); *************** *** 898,904 **** long t0 = System.currentTimeMillis(); ! StudentSectioningModel model = new StudentSectioningModel(new DataProperties(ApplicationProperties.getProperties())); ! model.getProperties().setProperty("Neighbour.BranchAndBoundTimeout", "1000"); ! model.getProperties().setProperty("Extensions.Classes", "net.sf.cpsolver.studentsct.extension.DistanceConflict"); model.addGlobalConstraint(new SectionLimit(model.getProperties())); Student student = new Student(request.getStudentId() == null ? -1l : request.getStudentId()); --- 905,914 ---- long t0 = System.currentTimeMillis(); ! DataProperties config = new DataProperties(ApplicationProperties.getProperties()); ! config.setProperty("Neighbour.BranchAndBoundTimeout", "1000"); ! config.setProperty("Extensions.Classes", DistanceConflict.class.getName() + ";" + TimeOverlapsCounter.class.getName()); ! config.setProperty("Student.WeightsClass", StudentSchedulingAssistantWeights.class.getName()); ! config.setProperty("Distances.Ellipsoid", ApplicationProperties.getProperty("unitime.distance.ellipsoid", DistanceMetric.Ellipsoid.LEGACY.name())); ! StudentSectioningModel model = new StudentSectioningModel(config); model.addGlobalConstraint(new SectionLimit(model.getProperties())); Student student = new Student(request.getStudentId() == null ? -1l : request.getStudentId()); *************** *** 939,946 **** Section section = cr.getSection(a.getClassId()); if (section == null || section.getLimit() == 0) { ! messages.addMessage((a.isPinned() ? "Required class" : "Previously selected class") + a.getSubject() + " " + a.getCourseNbr() + " " + a.getSubpart() + " " + a.getSection() + " is no longer available."); continue a; } ! if (a.isPinned()) requiredSections.add(section); preferredSections.add(section); --- 949,956 ---- Section section = cr.getSection(a.getClassId()); if (section == null || section.getLimit() == 0) { ! messages.addMessage((a.isSaved() ? "Enrolled class" : a.isPinned() ? "Required class" : "Previously selected class") + a.getSubject() + " " + a.getCourseNbr() + " " + a.getSubpart() + " " + a.getSection() + " is no longer available."); continue a; } ! if (a.isPinned() || a.isSaved()) requiredSections.add(section); preferredSections.add(section); |
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/client/sectioning Modified Files: SuggestionsBox.java TimeGrid.java CourseRequestsTable.java CourseSelectionBox.java StudentSectioningWidget.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: CourseRequestsTable.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/CourseRequestsTable.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CourseRequestsTable.java 1 Dec 2010 11:10:50 -0000 1.2 --- CourseRequestsTable.java 13 Jan 2011 23:08:47 -0000 1.3 *************** *** 24,29 **** import org.unitime.timetable.gwt.client.ToolBox; ! import org.unitime.timetable.gwt.client.widgets.ValidationErrors; ! import org.unitime.timetable.gwt.client.widgets.Validator; import org.unitime.timetable.gwt.resources.StudentSectioningConstants; import org.unitime.timetable.gwt.resources.StudentSectioningMessages; --- 24,28 ---- import org.unitime.timetable.gwt.client.ToolBox; ! import org.unitime.timetable.gwt.client.widgets.LoadingWidget; import org.unitime.timetable.gwt.resources.StudentSectioningConstants; import org.unitime.timetable.gwt.resources.StudentSectioningMessages; *************** *** 67,71 **** private FlexTable iGrid; private AcademicSessionProvider iSessionProvider; - private ValidationErrors iValidator; private ArrayList<CourseSelectionBox[]> iCourses; private ArrayList<CourseSelectionBox[]> iAlternatives; --- 66,69 ---- *************** *** 305,310 **** private void init() { - iValidator = new ValidationErrors(false, MESSAGES.courseRequestsScheduling(), MESSAGES.validationFailed(), false); - CourseSelectionBox.Validator checkForDuplicities = new CourseSelectionBox.Validator() { public String validate(CourseSelectionBox source) { --- 303,306 ---- *************** *** 390,396 **** c[1].addValidator(checkForDuplicities); c[2].addValidator(checkForDuplicities); - iValidator.addValidator(c[0]); - iValidator.addValidator(c[1]); - iValidator.addValidator(c[2]); } --- 386,389 ---- *************** *** 466,492 **** c[1].addValidator(checkForDuplicities); c[2].addValidator(checkForDuplicities); - iValidator.addValidator(c[0]); - iValidator.addValidator(c[1]); - iValidator.addValidator(c[2]); } ! ! iValidator.addValidator(new Validator() { ! public void validate(final AsyncCallback<String> callback) { ! CourseRequestInterface cr = new CourseRequestInterface(); ! cr.setAcademicSessionId(iSessionProvider.getAcademicSessionId()); ! fillInCourses(cr); fillInAlternatives(cr); ! iSectioningService.checkCourses(cr, ! new AsyncCallback<Collection<String>>() { ! public void onSuccess(Collection<String> result) { ! for (String course: result) ! setError(course, MESSAGES.validationCourseNotExists(course)); ! callback.onSuccess(result.isEmpty() ? null : MESSAGES.validationUnknownCourseNotExists()); ! } ! public void onFailure(Throwable caught) { ! callback.onFailure(caught); ! } ! }); } ! }); } --- 459,491 ---- c[1].addValidator(checkForDuplicities); c[2].addValidator(checkForDuplicities); } ! } ! ! public void validate(final AsyncCallback<Boolean> callback) { ! String failed = null; ! LoadingWidget.getInstance().show(MESSAGES.courseRequestsValidating()); ! for (final CourseSelectionBox[] c: iCourses) { ! for (CourseSelectionBox x: c) { ! String message = x.validate(); ! if (message != null) failed = message; } ! } ! CourseRequestInterface cr = new CourseRequestInterface(); ! cr.setAcademicSessionId(iSessionProvider.getAcademicSessionId()); ! fillInCourses(cr); fillInAlternatives(cr); ! final boolean success = (failed == null); ! iSectioningService.checkCourses(cr, ! new AsyncCallback<Collection<String>>() { ! public void onSuccess(Collection<String> result) { ! for (String course: result) ! setError(course, MESSAGES.validationCourseNotExists(course)); ! LoadingWidget.getInstance().hide(); ! callback.onSuccess(success && result.isEmpty()); ! } ! public void onFailure(Throwable caught) { ! LoadingWidget.getInstance().hide(); ! callback.onFailure(caught); ! } ! }); } *************** *** 509,516 **** } - public ValidationErrors getValidator() { - return iValidator; - } - public void fillInCourses(CourseRequestInterface cr) { for (CourseSelectionBox[] course: iCourses) { --- 508,511 ---- Index: CourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/CourseSelectionBox.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CourseSelectionBox.java 11 Jan 2011 16:51:45 -0000 1.4 --- CourseSelectionBox.java 13 Jan 2011 23:08:47 -0000 1.5 *************** *** 28,32 **** 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; import org.unitime.timetable.gwt.client.widgets.WebTable.RowDoubleClickEvent; --- 28,31 ---- *************** *** 91,95 **** * @author Tomas Muller */ ! public class CourseSelectionBox extends Composite implements Validator { public static final StudentSectioningResources RESOURCES = GWT.create(StudentSectioningResources.class); public static final StudentSectioningMessages MESSAGES = GWT.create(StudentSectioningMessages.class); --- 90,94 ---- * @author Tomas Muller */ ! public class CourseSelectionBox extends Composite { public static final StudentSectioningResources RESOURCES = GWT.create(StudentSectioningResources.class); public static final StudentSectioningMessages MESSAGES = GWT.create(StudentSectioningMessages.class); *************** *** 1000,1008 **** } ! public void validate(final AsyncCallback<String> callback) { if (iTextField.getText().isEmpty() || iTextField.getText().equals(iHint)) { iError.setVisible(false); ! callback.onSuccess(null); ! return; } if (iAllowFreeTime) { --- 999,1006 ---- } ! public String validate() { if (iTextField.getText().isEmpty() || iTextField.getText().equals(iHint)) { iError.setVisible(false); ! return null; } if (iAllowFreeTime) { *************** *** 1010,1015 **** parseFreeTime(iTextField.getText()); iError.setVisible(false); ! callback.onSuccess(null); ! return; } catch (IllegalArgumentException e) { if (iTextField.getText().toLowerCase().startsWith(CONSTANTS.freePrefix().toLowerCase())) { --- 1008,1012 ---- parseFreeTime(iTextField.getText()); iError.setVisible(false); ! return null; } catch (IllegalArgumentException e) { if (iTextField.getText().toLowerCase().startsWith(CONSTANTS.freePrefix().toLowerCase())) { *************** *** 1017,1022 **** iError.setTitle(e.getMessage()); iError.setVisible(true); ! callback.onSuccess(e.getMessage()); ! return; } } --- 1014,1018 ---- iError.setTitle(e.getMessage()); iError.setVisible(true); ! return e.getMessage(); } } *************** *** 1028,1037 **** iError.setTitle(null); iError.setVisible(true); ! callback.onSuccess(message); ! return ; } } iError.setVisible(false); ! callback.onSuccess(null); } --- 1024,1032 ---- iError.setTitle(null); iError.setVisible(true); ! return message; } } iError.setVisible(false); ! return null; } Index: StudentSectioningWidget.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/StudentSectioningWidget.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StudentSectioningWidget.java 10 Dec 2010 22:25:03 -0000 1.3 --- StudentSectioningWidget.java 13 Jan 2011 23:08:47 -0000 1.4 *************** *** 26,29 **** --- 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.LoadingWidget; import org.unitime.timetable.gwt.client.widgets.UniTimeTabPanel; import org.unitime.timetable.gwt.client.widgets.WebTable; *************** *** 253,257 **** iCourseRequests.changeTip(); iErrorMessage.setHTML(""); ! iCourseRequests.getValidator().validate(new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { updateHistory(); --- 254,258 ---- iCourseRequests.changeTip(); iErrorMessage.setHTML(""); ! iCourseRequests.validate(new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { updateHistory(); *************** *** 269,277 **** } }); iSectioningService.section(iCourseRequests.getRequest(), iLastResult, new AsyncCallback<ClassAssignmentInterface>() { public void onFailure(Throwable caught) { iErrorMessage.setHTML(caught.getMessage()); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); updateHistory(); } --- 270,279 ---- } }); + LoadingWidget.getInstance().show(MESSAGES.courseRequestsScheduling()); iSectioningService.section(iCourseRequests.getRequest(), iLastResult, new AsyncCallback<ClassAssignmentInterface>() { public void onFailure(Throwable caught) { iErrorMessage.setHTML(caught.getMessage()); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); updateHistory(); } *************** *** 284,288 **** iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); updateHistory(); } --- 286,290 ---- iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); updateHistory(); } *************** *** 291,295 **** iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); updateHistory(); } --- 293,297 ---- iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); updateHistory(); } *************** *** 424,431 **** iCourseRequests.changeTip(); iErrorMessage.setHTML(""); ! iCourseRequests.getValidator().validate(new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { updateHistory(); if (result) { iSectioningService.saveRequest(iCourseRequests.getRequest(), new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { --- 426,434 ---- iCourseRequests.changeTip(); iErrorMessage.setHTML(""); ! iCourseRequests.validate(new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { updateHistory(); if (result) { + LoadingWidget.getInstance().show(MESSAGES.courseRequestsSaving()); iSectioningService.saveRequest(iCourseRequests.getRequest(), new AsyncCallback<Boolean>() { public void onSuccess(Boolean result) { *************** *** 434,443 **** iErrorMessage.setVisible(true); } ! iCourseRequests.getValidator().hide(); } public void onFailure(Throwable caught) { iErrorMessage.setHTML(MESSAGES.saveRequestsFail(caught.getMessage())); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); } }); --- 437,446 ---- iErrorMessage.setVisible(true); } ! LoadingWidget.getInstance().hide(); } public void onFailure(Throwable caught) { iErrorMessage.setHTML(MESSAGES.saveRequestsFail(caught.getMessage())); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); } }); *************** *** 445,449 **** iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); updateHistory(); } --- 448,452 ---- iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); updateHistory(); } *************** *** 452,456 **** iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! iCourseRequests.getValidator().hide(); updateHistory(); } --- 455,459 ---- iErrorMessage.setHTML(MESSAGES.validationFailed()); iErrorMessage.setVisible(true); ! LoadingWidget.getInstance().hide(); updateHistory(); } *************** *** 485,490 **** iAssignments.setSelectedRow(rowIndex); iErrorMessage.setVisible(false); ! iSuggestionsBox.setRow(iCourseRequests.getRequest(), iLastResult, rowIndex); ! iSuggestionsBox.center(); } --- 488,492 ---- iAssignments.setSelectedRow(rowIndex); iErrorMessage.setVisible(false); ! iSuggestionsBox.open(iCourseRequests.getRequest(), iLastResult, rowIndex); } *************** *** 497,500 **** --- 499,517 ---- ArrayList<WebTable.Row> rows = new ArrayList<WebTable.Row>(); iAssignmentGrid.clear(); + CourseRequestInterface req = iCourseRequests.getRequest(); + for (CourseRequestInterface.Request r: req.getCourses()) { + if (r.hasRequestedFreeTime()) { + for (CourseRequestInterface.FreeTime ft: r.getRequestedFreeTime()) { + iAssignmentGrid.addFreeTime(ft); + } + } + } + for (CourseRequestInterface.Request r: req.getAlternatives()) { + if (r.hasRequestedFreeTime()) { + for (CourseRequestInterface.FreeTime ft: r.getRequestedFreeTime()) { + iAssignmentGrid.addFreeTime(ft); + } + } + } for (ClassAssignmentInterface.CourseAssignment course: result.getCourseAssignments()) { if (course.isAssigned()) { *************** *** 522,526 **** (clazz.isSaved() ? new WebTable.IconCell(RESOURCES.saved(), null, null) : new WebTable.Cell("")), (clazz.isOfHighDemand() ? new WebTable.IconCell(RESOURCES.highDemand(), MESSAGES.highDemand(clazz.getExpected(), clazz.getAvailableLimit()), null) : new WebTable.Cell(""))); ! final ArrayList<TimeGrid.Meeting> meetings = iAssignmentGrid.addClass(clazz, rows.size()); // row.setId(course.isFreeTime() ? "Free " + clazz.getDaysString() + " " +clazz.getStartString() + " - " + clazz.getEndString() : course.getCourseId() + ":" + clazz.getClassId()); final int index = rows.size(); --- 539,543 ---- (clazz.isSaved() ? new WebTable.IconCell(RESOURCES.saved(), null, null) : new WebTable.Cell("")), (clazz.isOfHighDemand() ? new WebTable.IconCell(RESOURCES.highDemand(), MESSAGES.highDemand(clazz.getExpected(), clazz.getAvailableLimit()), null) : new WebTable.Cell(""))); ! final ArrayList<TimeGrid.Meeting> meetings = (clazz.isFreeTime() ? null : iAssignmentGrid.addClass(clazz, rows.size())); // row.setId(course.isFreeTime() ? "Free " + clazz.getDaysString() + " " +clazz.getStartString() + " - " + clazz.getEndString() : course.getCourseId() + ":" + clazz.getClassId()); final int index = rows.size(); *************** *** 600,608 **** iAssignmentPanel.setWidth(iAssignmentGrid.getWidth()); iAssignments.setData(rowArray); ! iCourseRequests.getValidator().hide(); iPanel.remove(iCourseRequests); iPanel.insert(iAssignmentPanelWithFocus, 0); iPrev.setVisible(true); ! iEnroll.setVisible(true); iPrint.setVisible(true); iExport.setVisible(true); --- 617,626 ---- iAssignmentPanel.setWidth(iAssignmentGrid.getWidth()); iAssignments.setData(rowArray); ! if (LoadingWidget.getInstance().isShowing()) ! LoadingWidget.getInstance().hide(); iPanel.remove(iCourseRequests); iPanel.insert(iAssignmentPanelWithFocus, 0); iPrev.setVisible(true); ! iEnroll.setVisible(result.isCanEnroll()); iPrint.setVisible(true); iExport.setVisible(true); *************** *** 622,626 **** } else { iErrorMessage.setHTML(MESSAGES.noSchedule()); ! iCourseRequests.getValidator().hide(); } } --- 640,645 ---- } else { iErrorMessage.setHTML(MESSAGES.noSchedule()); ! if (LoadingWidget.getInstance().isShowing()) ! LoadingWidget.getInstance().fail(MESSAGES.noSchedule()); } } Index: TimeGrid.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/TimeGrid.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TimeGrid.java 1 Dec 2010 11:10:50 -0000 1.2 --- TimeGrid.java 13 Jan 2011 23:08:47 -0000 1.3 *************** *** 29,32 **** --- 29,33 ---- import org.unitime.timetable.gwt.resources.StudentSectioningResources; import org.unitime.timetable.gwt.shared.ClassAssignmentInterface; + import org.unitime.timetable.gwt.shared.CourseRequestInterface; import com.google.gwt.core.client.GWT; *************** *** 83,86 **** --- 84,88 ---- private ArrayList<PinClickHandler> iPinClickHandlers = new ArrayList<PinClickHandler>(); private ArrayList<ClassAssignmentInterface.ClassAssignment> iClasses = new ArrayList<ClassAssignmentInterface.ClassAssignment>(); + private ArrayList<BusyPanel> iBusy = new ArrayList<BusyPanel>(); public TimeGrid() { *************** *** 183,186 **** --- 185,197 ---- } + public void addFreeTime(CourseRequestInterface.FreeTime ft) { + for (int day: ft.getDays()) + addBusy(day, ft.getStart(), ft.getLength()); + } + + private void addBusy(int day, int start, int length) { + iBusy.add(new BusyPanel(day, start, length)); + } + public void setCalendarUrl(String url) { iCalendar.setUrl(url); *************** *** 198,201 **** --- 209,214 ---- m.addStyleName("meeting-selected-noshadow"); } + for (BusyPanel busy: iBusy) + tg.addBusy(busy.getDay(), busy.getStart(), busy.getLength()); return tg; } *************** *** 238,241 **** --- 251,256 ---- for (Meeting meeting: meetings) meeting.move(); + for (BusyPanel busy: iBusy) + busy.move(); } *************** *** 266,269 **** --- 281,288 ---- if (iMeetingTable[6][slot] !=null && !iMeetingTable[6][slot].isEmpty()) hasSun = true; } + for (BusyPanel busy: iBusy) { + if (busy.getDay() == 5) hasSat = true; + if (busy.getDay() == 6) hasSun = true; + } if (!hasSat && !hasSun) setNrDays(5); else if (!hasSun) setNrDays(6); *************** *** 296,299 **** --- 315,321 ---- iColor.clear(); iClasses.clear(); + for (BusyPanel busy: iBusy) + busy.remove(); + iBusy.clear(); } *************** *** 659,661 **** --- 681,711 ---- } } + + private class BusyPanel extends SimplePanel { + private int iDayOfWeek, iStartSlot, iLength; + + public BusyPanel(int dayOfWeek, int startSlot, int length) { + super(); + iDayOfWeek = dayOfWeek; + iStartSlot = startSlot; + iLength = length; + setStyleName("busy"); + setSize(String.valueOf(iCellWidth + (iPrint ? 3 : iDayOfWeek + 1 < iNrDays ? 3 : 0)), String.valueOf(125 * iLength / 30)); + iGrid.insert(this, iCellWidth * iDayOfWeek, 125 * iStartSlot / 30 - 50 * iStart, 1); + } + + public void move() { + setWidth(String.valueOf(iCellWidth + (iPrint ? 3 : iDayOfWeek + 1 < iNrDays ? 3 : 0))); + DOM.setStyleAttribute(getElement(), "left", String.valueOf(iCellWidth * iDayOfWeek)); + } + + public int getDay() { return iDayOfWeek; } + public int getStart() { return iStartSlot; } + public int getLength() { return iLength; } + + public void remove() { + iGrid.remove(this); + } + + } } Index: SuggestionsBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/SuggestionsBox.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SuggestionsBox.java 1 Dec 2010 11:10:50 -0000 1.2 --- SuggestionsBox.java 13 Jan 2011 23:08:47 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- import java.util.Collection; + import org.unitime.timetable.gwt.client.widgets.LoadingWidget; import org.unitime.timetable.gwt.client.widgets.WebTable; import org.unitime.timetable.gwt.client.widgets.WebTable.RowClickEvent; *************** *** 96,100 **** iSuggestions.setEmptyMessage(MESSAGES.suggestionsLoading()); iSuggestionsScroll = new ScrollPanel(iSuggestions); ! iSuggestionsScroll.setSize("950", "400"); iSuggestionsScroll.setStyleName("unitime-ScrollPanel"); suggestionPanel.add(iSuggestionsScroll); --- 97,101 ---- iSuggestions.setEmptyMessage(MESSAGES.suggestionsLoading()); iSuggestionsScroll = new ScrollPanel(iSuggestions); ! iSuggestionsScroll.setHeight("400"); iSuggestionsScroll.setStyleName("unitime-ScrollPanel"); suggestionPanel.add(iSuggestionsScroll); *************** *** 108,111 **** --- 109,114 ---- iSuggestions.setEmptyMessage("<font color='red'>" + caught.getMessage() + "</font>"); iMessages.setHTML(""); + LoadingWidget.getInstance().hide(); + center(); } *************** *** 116,119 **** --- 119,124 ---- iSuggestions.clearData(true); iSuggestions.setEmptyMessage(MESSAGES.suggestionsNoAlternative(iSource)); + LoadingWidget.getInstance().hide(); + center(); } else { ArrayList<WebTable.Row> rows = new ArrayList<WebTable.Row>(); *************** *** 301,306 **** for (WebTable.Row row: rows) rowArray[idx++] = row; iSuggestions.setData(rowArray); ! if (rows.isEmpty()) iSuggestions.setEmptyMessage(MESSAGES.suggestionsNoAlternative(iSource)); } } --- 306,314 ---- for (WebTable.Row row: rows) rowArray[idx++] = row; iSuggestions.setData(rowArray); ! if (rows.isEmpty()) { iSuggestions.setEmptyMessage(MESSAGES.suggestionsNoAlternative(iSource)); + } + LoadingWidget.getInstance().hide(); + center(); } } *************** *** 331,335 **** } ! public void setRow(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> rows, int index) { ClassAssignmentInterface.ClassAssignment row = rows.get(index); iAssignment = row; --- 339,344 ---- } ! public void open(CourseRequestInterface request, ArrayList<ClassAssignmentInterface.ClassAssignment> rows, int index) { ! LoadingWidget.getInstance().show(MESSAGES.suggestionsLoading()); ClassAssignmentInterface.ClassAssignment row = rows.get(index); iAssignment = row; |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/test Modified Files: StudentSectioningTest.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: StudentSectioningTest.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/test/StudentSectioningTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StudentSectioningTest.java 1 Dec 2010 11:10:48 -0000 1.7 --- StudentSectioningTest.java 13 Jan 2011 23:08:48 -0000 1.8 *************** *** 797,801 **** } if (nrClasses==assignedSections.size()) { ! courseRequest.setInitialAssignment(new Enrollment(request, 1.0, config, assignedSections)); sLog.info(" initial assignment "+courseRequest.getInitialAssignment()); } --- 797,801 ---- } if (nrClasses==assignedSections.size()) { ! courseRequest.setInitialAssignment(new Enrollment(request, 0, config, assignedSections)); sLog.info(" initial assignment "+courseRequest.getInitialAssignment()); } |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/WebContent/styles In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/WebContent/styles Modified Files: unitime.css Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: unitime.css =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/styles/unitime.css,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** unitime.css 1 Dec 2010 18:26:44 -0000 1.3 --- unitime.css 13 Jan 2011 23:08:48 -0000 1.4 *************** *** 563,566 **** --- 563,571 ---- } + .unitime-TimeGrid .busy { + background: #FFE1DD; + width: 100% + } + .unitime-TimeGrid .day-separator { height: 100%; |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/shared In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/shared Modified Files: ClassAssignmentInterface.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: ClassAssignmentInterface.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/shared/ClassAssignmentInterface.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ClassAssignmentInterface.java 1 Dec 2010 11:10:49 -0000 1.2 --- ClassAssignmentInterface.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 30,33 **** --- 30,34 ---- private ArrayList<CourseAssignment> iAssignments = new ArrayList<CourseAssignment>(); private ArrayList<String> iMessages = null; + private boolean iCanEnroll = true; public ClassAssignmentInterface() {} *************** *** 58,61 **** --- 59,65 ---- } + public boolean isCanEnroll() { return iCanEnroll; } + public void setCanEnroll(boolean canEnroll) { iCanEnroll = canEnroll; } + public static class CourseAssignment implements IsSerializable { private Long iCourseId = null; |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/widgets In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/client/widgets Modified Files: WebTable.java Removed Files: ValidationErrors.java Validator.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: WebTable.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/widgets/WebTable.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WebTable.java 1 Dec 2010 11:10:51 -0000 1.2 --- WebTable.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 229,235 **** iTable.getFlexCellFormatter().setHorizontalAlignment(i+getHeaderRowsCount(), j, cell.getHorizontalAlignment()); } ! for (int j=iTable.getCellCount(i+getHeaderRowsCount()) - 1; j >= iRows[i].getNrCells(); j--) { ! iTable.clearCell(i+getHeaderRowsCount(), j); ! } } } --- 229,234 ---- iTable.getFlexCellFormatter().setHorizontalAlignment(i+getHeaderRowsCount(), j, cell.getHorizontalAlignment()); } ! for (int j=iTable.getCellCount(i+getHeaderRowsCount()) - 1; j >= iRows[i].getNrCells(); j--) ! iTable.removeCell(i+getHeaderRowsCount(), j); } } --- ValidationErrors.java DELETED --- --- Validator.java DELETED --- |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/curricula In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/client/curricula Modified Files: CurriculaCourseSelectionBox.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: CurriculaCourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/curricula/CurriculaCourseSelectionBox.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CurriculaCourseSelectionBox.java 10 Dec 2010 22:25:03 -0000 1.3 --- CurriculaCourseSelectionBox.java 13 Jan 2011 23:08:48 -0000 1.4 *************** *** 27,31 **** 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; import org.unitime.timetable.gwt.client.widgets.WebTable.RowDoubleClickEvent; --- 27,30 ---- *************** *** 91,95 **** * @author Tomas Muller */ ! public class CurriculaCourseSelectionBox extends Composite implements Validator, Focusable { public static final StudentSectioningResources RESOURCES = GWT.create(StudentSectioningResources.class); public static final StudentSectioningMessages MESSAGES = GWT.create(StudentSectioningMessages.class); --- 90,94 ---- * @author Tomas Muller */ ! public class CurriculaCourseSelectionBox extends Composite implements Focusable { public static final StudentSectioningResources RESOURCES = GWT.create(StudentSectioningResources.class); public static final StudentSectioningMessages MESSAGES = GWT.create(StudentSectioningMessages.class); |
From: Tomas M. <to...@us...> - 2011-01-13 23:08:56
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/resources In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv14262/JavaSource/org/unitime/timetable/gwt/resources Modified Files: StudentSectioningMessages.java Log Message: Student Scheduling Assistant - Adopted to use the new priority weighting model - adding penalization for sections without time assignment, over expected sections, and sections that have a different time or instructor than selected - Only show Enroll button when it is available - Show LoadingWidget while waiting - Display free time requests as red background in the timetable grid Index: StudentSectioningMessages.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/resources/StudentSectioningMessages.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** StudentSectioningMessages.java 1 Dec 2010 11:10:50 -0000 1.2 --- StudentSectioningMessages.java 13 Jan 2011 23:08:48 -0000 1.3 *************** *** 113,122 **** /* Course Requests Table messages */ ! @DefaultMessage("Scheduling") String courseRequestsScheduling(); @DefaultMessage("Validation failed, see above for errors.") String validationFailed(); ! @DefaultMessage("Course {0} used multiple times.") String validationMultiple(String course); --- 113,128 ---- /* Course Requests Table messages */ ! @DefaultMessage("Validating...") ! String courseRequestsValidating(); ! ! @DefaultMessage("Scheduling...") String courseRequestsScheduling(); + @DefaultMessage("Saving...") + String courseRequestsSaving(); + @DefaultMessage("Validation failed, see above for errors.") String validationFailed(); ! @DefaultMessage("Course {0} used multiple times.") String validationMultiple(String course); |
From: Tomas M. <to...@us...> - 2011-01-13 23:07:03
|
Update of /cvsroot/unitime/UniTime/WebContent/WEB-INF/lib In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13853/WebContent/WEB-INF/lib Modified Files: cpsolver-all-1.2.jar Log Message: Constraint Solver Update (CPSolver 1.2.26) - Student Sectioning Solver - New priority weighting model: - total student weight is between zero and one (one means student got the best schedule) - weight of the given priority course is higher than sum of the remaining weights the student can get - first alternative is better than the following course - second alternative is better than the second following course - distance conflicts are considered secondary (priorities should be maximized first), and only counted on the lower priority course - time overlaps can cut up to 50% of the weight on both courses that overlap (when overlapping completely) - Time overlaps: - added ability for some classes to overlap (time overlap is minimized) -- to be defined on scheduling subparts - minimize overlaps with free times (when those cannot be fully satisfied) - Batch sectioning: added a new priority based construction phase Index: cpsolver-all-1.2.jar =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/lib/cpsolver-all-1.2.jar,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsSLtQek and /tmp/cvsRq95eA differ |
From: Tomas M. <to...@us...> - 2011-01-13 22:31:54
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2317/JavaSource/org/unitime/timetable/model Modified Files: Session.java Log Message: getDistance -- use event begin/end dates instead of session begin/end dates Index: Session.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/Session.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Session.java 1 Dec 2010 11:10:39 -0000 1.20 --- Session.java 13 Jan 2011 22:31:46 -0000 1.21 *************** *** 732,739 **** /** Return distance of the given date outside the session start/end date (in milliseconds) */ public long getDistance(Date date) { ! if (date.compareTo(getSessionBeginDateTime())<0) //before session ! return getSessionBeginDateTime().getTime() - date.getTime(); ! if (date.compareTo(getSessionEndDateTime())>0) //after session ! return date.getTime() - getSessionEndDateTime().getTime(); return 0; //inside session } --- 732,739 ---- /** Return distance of the given date outside the session start/end date (in milliseconds) */ public long getDistance(Date date) { ! if (date.compareTo(getEventBeginDate())<0) //before session ! return getEventBeginDate().getTime() - date.getTime(); ! if (date.compareTo(getEventEndDate())>0) //after session ! return date.getTime() - getEventEndDate().getTime(); return 0; //inside session } |
From: Tomas M. <to...@us...> - 2011-01-12 17:01:07
|
Update of /cvsroot/unitime/UniTime In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv2574 Modified Files: build.number Log Message: UniTime 3.2.113 released Index: build.number =================================================================== RCS file: /cvsroot/unitime/UniTime/build.number,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** build.number 23 Dec 2010 08:43:24 -0000 1.29 --- build.number 12 Jan 2011 17:00:59 -0000 1.30 *************** *** 1,3 **** #Build Number for ANT. Do not edit! ! #Thu Dec 23 00:30:54 CET 2010 ! build.number=108 --- 1,3 ---- #Build Number for ANT. Do not edit! ! #Wed Jan 12 00:30:47 CET 2011 ! build.number=114 |
From: Nightly B. <no...@un...> - 2011-01-11 23:56: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...> - 2011-01-11 16:51:53
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv562/WebContent/help Modified Files: Release-Notes.xml Log Message: Student Scheduling Assistant - Courses / Alternatives table: in some browsers the course 1st alternative text field was not enabled after a course was selected using the SuggestionBox (selecting a suggestion using Enter). - TextBox on change message arrived after the SuggestionBox on selection message - TextBox on change message handler now checks the last suggestions to see whether the entered course name is a valid course Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Release-Notes.xml 10 Jan 2011 12:34:54 -0000 1.80 --- Release-Notes.xml 11 Jan 2011 16:51:45 -0000 1.81 *************** *** 55,58 **** --- 55,64 ---- </description> </item> + <item> + <name>Student Scheduling Assistant</name> + <description> + <line>Courses / Alternatives table: in some browsers the course 1st alternative text field was not enabled after a course was selected using the SuggestionBox (selecting a suggestion using Enter).</line> + </description> + </item> </category> </release> |
From: Tomas M. <to...@us...> - 2011-01-11 16:51:53
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv562/JavaSource/org/unitime/timetable/gwt/client/sectioning Modified Files: CourseSelectionBox.java Log Message: Student Scheduling Assistant - Courses / Alternatives table: in some browsers the course 1st alternative text field was not enabled after a course was selected using the SuggestionBox (selecting a suggestion using Enter). - TextBox on change message arrived after the SuggestionBox on selection message - TextBox on change message handler now checks the last suggestions to see whether the entered course name is a valid course Index: CourseSelectionBox.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/gwt/client/sectioning/CourseSelectionBox.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CourseSelectionBox.java 10 Dec 2010 22:25:03 -0000 1.3 --- CourseSelectionBox.java 11 Jan 2011 16:51:45 -0000 1.4 *************** *** 22,25 **** --- 22,27 ---- import java.util.ArrayList; import java.util.Collection; + import java.util.HashSet; + import java.util.Set; import org.unitime.timetable.gwt.client.ToolBox; *************** *** 98,105 **** --- 100,109 ---- private TextBox iTextField; private SuggestBox iSuggest; + private String iLastSuggestion; private Image iImage; private HorizontalPanel iHPanel; private VerticalPanel iVPanel; private Label iError; + private Set<String> iValidCourseNames = new HashSet<String>(); private TextBox iFilter; *************** *** 196,207 **** iSuggest.addSelectionHandler(new SelectionHandler<Suggestion>() { public void onSelection(SelectionEvent<Suggestion> event) { for (CourseSelectionChangeHandler h : iCourseSelectionChangeHandlers) ! h.onChange(iTextField.getText(), !iTextField.getText().isEmpty()); } }); iTextField.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { for (CourseSelectionChangeHandler h : iCourseSelectionChangeHandlers) ! h.onChange(iTextField.getText(), false); } }); --- 200,222 ---- iSuggest.addSelectionHandler(new SelectionHandler<Suggestion>() { public void onSelection(SelectionEvent<Suggestion> event) { + String text = event.getSelectedItem().getReplacementString(); + iLastSuggestion = text; for (CourseSelectionChangeHandler h : iCourseSelectionChangeHandlers) ! h.onChange(text, !text.isEmpty()); } }); iTextField.addChangeHandler(new ChangeHandler() { public void onChange(ChangeEvent event) { + boolean valid = false; + String text = iTextField.getText(); + if (text.equalsIgnoreCase(iLastSuggestion)) + valid = true; + else for (String course: iValidCourseNames) { + if (course.equalsIgnoreCase(text)) { + valid = true; break; + } + } for (CourseSelectionChangeHandler h : iCourseSelectionChangeHandlers) ! h.onChange(text, valid); } }); *************** *** 902,905 **** --- 917,921 ---- public void onFailure(Throwable caught) { + iValidCourseNames.clear(); ArrayList<Suggestion> suggestions = new ArrayList<Suggestion>(); if (iAllowFreeTime) { *************** *** 921,932 **** public void onSuccess(Collection<ClassAssignmentInterface.CourseAssignment> result) { ArrayList<Suggestion> suggestions = new ArrayList<Suggestion>(); for (ClassAssignmentInterface.CourseAssignment suggestion: result) { String courseName = MESSAGES.courseName(suggestion.getSubject(), suggestion.getCourseNbr()); String courseNameWithTitle = (suggestion.getTitle() == null ? courseName : MESSAGES.courseNameWithTitle(suggestion.getSubject(), suggestion.getCourseNbr(), suggestion.getTitle())); ! if (suggestion.hasUniqueName()) suggestions.add(new SimpleSuggestion(courseNameWithTitle, courseName)); ! else suggestions.add(new SimpleSuggestion(courseNameWithTitle, courseNameWithTitle)); } iCallback.onSuggestionsReady(iRequest, new Response(suggestions)); --- 937,952 ---- public void onSuccess(Collection<ClassAssignmentInterface.CourseAssignment> result) { ArrayList<Suggestion> suggestions = new ArrayList<Suggestion>(); + iValidCourseNames.clear(); for (ClassAssignmentInterface.CourseAssignment suggestion: result) { String courseName = MESSAGES.courseName(suggestion.getSubject(), suggestion.getCourseNbr()); String courseNameWithTitle = (suggestion.getTitle() == null ? courseName : MESSAGES.courseNameWithTitle(suggestion.getSubject(), suggestion.getCourseNbr(), suggestion.getTitle())); ! if (suggestion.hasUniqueName()) { suggestions.add(new SimpleSuggestion(courseNameWithTitle, courseName)); ! iValidCourseNames.add(courseName); ! } else { suggestions.add(new SimpleSuggestion(courseNameWithTitle, courseNameWithTitle)); + iValidCourseNames.add(courseNameWithTitle); + } } iCallback.onSuggestionsReady(iRequest, new Response(suggestions)); |
From: Nightly B. <no...@un...> - 2011-01-10 23:52:46
|
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...> - 2011-01-10 13:17:18
|
Update of /cvsroot/unitime/UniTime/WebContent/WEB-INF In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv883/WebContent/WEB-INF Modified Files: web.xml Log Message: Query Log Filter - some versions of Tomcat do not understand multiple url patterns in one filter-mapping element -> changed to multiple filter mappings Index: web.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/WEB-INF/web.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** web.xml 1 Dec 2010 11:10:51 -0000 1.6 --- web.xml 10 Jan 2011 13:17:10 -0000 1.7 *************** *** 264,268 **** <filter-name>Query Log Filter</filter-name> <url-pattern>*.do</url-pattern> ! <url-pattern>*.gwt</url-pattern> <url-pattern>/calendar</url-pattern> </filter-mapping> --- 264,276 ---- <filter-name>Query Log Filter</filter-name> <url-pattern>*.do</url-pattern> ! </filter-mapping> ! ! <filter-mapping> ! <filter-name>Query Log Filter</filter-name> ! <url-pattern>*.gwt</url-pattern> ! </filter-mapping> ! ! <filter-mapping> ! <filter-name>Query Log Filter</filter-name> <url-pattern>/calendar</url-pattern> </filter-mapping> |
From: Tomas M. <to...@us...> - 2011-01-10 12:35:02
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22146/WebContent/help Modified Files: Release-Notes.xml Log Message: Buildings -- Update Rooms - fixed an exception "not-null property references a null or transient value: RoomDept.room" when a room-department relation is present - this bug was introduced in 3.2.101 Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** Release-Notes.xml 8 Jan 2011 10:18:10 -0000 1.79 --- Release-Notes.xml 10 Jan 2011 12:34:54 -0000 1.80 *************** *** 33,38 **** <description> <line>Only update rooms and buildings that have external ids</line> ! <line>Ensure that Room.permanentId attribute is set for a newly created room ! <line>This fixes a bug introduced in 3.2.101</line> </line> </description> --- 33,39 ---- <description> <line>Only update rooms and buildings that have external ids</line> ! <line>Following bugs were fixed (both were introduced in 3.2.101) ! <line>Generate Room.permanentId attribute for a newly created room</line> ! <line>Exception "not-null property references a null or transient value: RoomDept.room" when a room-department relation is present</line> </line> </description> |
From: Tomas M. <to...@us...> - 2011-01-10 12:35:02
|
Update of /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv22146/JavaSource/org/unitime/timetable/model Modified Files: Room.java Log Message: Buildings -- Update Rooms - fixed an exception "not-null property references a null or transient value: RoomDept.room" when a room-department relation is present - this bug was introduced in 3.2.101 Index: Room.java =================================================================== RCS file: /cvsroot/unitime/UniTime/JavaSource/org/unitime/timetable/model/Room.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Room.java 3 Jan 2011 15:02:40 -0000 1.11 --- Room.java 10 Jan 2011 12:34:54 -0000 1.12 *************** *** 206,213 **** r.getFeatures().add(grf); } - for (ExternalRoomDepartment erd: er.getRoomDepartments()) - r.addExternalRoomDept(erd, er.getRoomDepartments()); LocationPermIdGenerator.setPermanentId(r); hibSession.saveOrUpdate(r); } else if (updateExistingRooms) { r.setBuilding(b); --- 206,213 ---- r.getFeatures().add(grf); } LocationPermIdGenerator.setPermanentId(r); hibSession.saveOrUpdate(r); + for (ExternalRoomDepartment erd: er.getRoomDepartments()) + r.addExternalRoomDept(erd, er.getRoomDepartments()); } else if (updateExistingRooms) { r.setBuilding(b); *************** *** 233,241 **** } } if (resetRoomDepartments) { for (ExternalRoomDepartment erd: er.getRoomDepartments()) r.addExternalRoomDept(erd, er.getRoomDepartments()); } - hibSession.saveOrUpdate(r); } } --- 233,241 ---- } } + hibSession.saveOrUpdate(r); if (resetRoomDepartments) { for (ExternalRoomDepartment erd: er.getRoomDepartments()) r.addExternalRoomDept(erd, er.getRoomDepartments()); } } } |
From: Nightly B. <no...@un...> - 2011-01-08 23:50:59
|
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...> - 2011-01-08 10:18:18
|
Update of /cvsroot/unitime/UniTime/WebContent/help In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv19847/WebContent/help Modified Files: Release-Notes.xml Log Message: Course Timetable export - if there is a cross-list, export each class under all the course names (not just the controlling one) Index: Release-Notes.xml =================================================================== RCS file: /cvsroot/unitime/UniTime/WebContent/help/Release-Notes.xml,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Release-Notes.xml 4 Jan 2011 20:15:30 -0000 1.78 --- Release-Notes.xml 8 Jan 2011 10:18:10 -0000 1.79 *************** *** 48,51 **** --- 48,57 ---- </description> </item> + <item> + <name>Course Timetable export</name> + <description> + <line>If there is a cross-list, export each class under all the course names (not just the controlling one).</line> + </description> + </item> </category> </release> |