use of org.cpsolver.coursett.model.Configuration in project cpsolver by UniTime.
the class SctStudent method computeEnrollments.
/**
* Compute all possible enrollments
*/
private void computeEnrollments() {
iEnrollments = new ArrayList<SctEnrollment>();
if (isInstructing()) {
double conflictWeight = 0.0;
for (Lecture lecture : getInstructingLectures()) {
for (Lecture other : getStudent().getLectures()) if (!getModel().getOfferingId().equals(other.getConfiguration().getOfferingId()))
conflictWeight += getJenrConflictWeight(lecture, other);
}
iEnrollments.add(new SctEnrollment(0, this, getInstructingLectures(), conflictWeight));
return;
}
for (Configuration configuration : getModel().getConfigurations()) {
Map<Long, Set<Lecture>> subparts = getModel().getSubparts(configuration);
List<Long> subpartIds = getSubpartIds(configuration);
computeEnrollments(configuration, subparts, subpartIds, new HashSet<Lecture>(), 0.0);
}
Collections.sort(iEnrollments);
}
Aggregations