use of org.cpsolver.coursett.sectioning.SctSectioning.GroupBasedInitialSectioning in project cpsolver by UniTime.
the class StudentSwapSectioning method studentsToLectures.
@Override
protected Group[] studentsToLectures(Long offeringId, Collection<Student> students, Collection<Lecture> lectures) {
if (hasStudentGroups(students)) {
Set<Lecture> sortedLectures = new TreeSet<Lecture>(new Comparator<Lecture>() {
@Override
public int compare(Lecture l1, Lecture l2) {
return l1.getClassId().compareTo(l2.getClassId());
}
});
sortedLectures.addAll(lectures);
GroupBasedInitialSectioning sect = new GroupBasedInitialSectioning(getProgress(), offeringId, sortedLectures, students);
return sect.getGroups();
} else {
return super.studentsToLectures(offeringId, students, lectures);
}
}
Aggregations