public class DefaultStudentSectioning extends Object implements StudentSectioning, InfoProvider<Lecture,Placement>
InitialSectioning
and FinalSectioning
.
InitialSectioning
). However, it
is still possible to improve on the number of student conflicts in the
solution. This can be accomplished by moving students between alternative
classes of the same course during or after the search (see
FinalSectioning
).Modifier and Type | Field and Description |
---|---|
protected FinalSectioning |
iFinalSectioning |
protected TimetableModel |
iModel |
protected static DecimalFormat |
sDF2 |
Constructor and Description |
---|
DefaultStudentSectioning(TimetableModel model)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected String |
getClassLabel(Lecture lecture)
Class label
|
void |
getInfo(Assignment<Lecture,Placement> assignment,
Map<String,String> info)
Adds some information into the table with information about the solution
|
void |
getInfo(Assignment<Lecture,Placement> assignment,
Map<String,String> info,
Collection<Lecture> variables)
Adds some information into the table with information about the solution,
only consider variables from the given set
|
Progress |
getProgress() |
boolean |
hasFinalSectioning()
Return true if final student sectioning is implemented.
|
void |
initialSectioning(Assignment<Lecture,Placement> assignment,
Long offeringId,
String courseName,
Collection<Student> students,
Collection<Configuration> configurations)
Enroll students into the given offering during the initial data load using
InitialSectioning . |
protected void |
initialSectioningLectures(Assignment<Lecture,Placement> assignment,
Long offeringId,
String courseName,
Collection<Student> students,
Collection<Lecture> lectures)
Enroll students into the given classes during the initial data load using
InitialSectioning . |
void |
resection(Assignment<Lecture,Placement> assignment,
Lecture lecture,
boolean recursive,
boolean configAsWell)
Perform sectioning on the given lecture
|
protected InitialSectioning.Group[] |
studentsToConfigurations(Long offeringId,
Collection<Student> students,
Collection<Configuration> configurations)
Section students into configurations.
|
protected InitialSectioning.Group[] |
studentsToLectures(Long offeringId,
Collection<Student> students,
Collection<Lecture> lectures)
Section students into lectures.
|
void |
switchStudents(Solution<Lecture,Placement> solution,
TerminationCondition<Lecture,Placement> termination)
Run student final sectioning (switching students between sections of the same
class in order to minimize overall number of student conflicts).
|
protected TimetableModel iModel
protected FinalSectioning iFinalSectioning
protected static DecimalFormat sDF2
public DefaultStudentSectioning(TimetableModel model)
model
- problem modelpublic Progress getProgress()
public void initialSectioning(Assignment<Lecture,Placement> assignment, Long offeringId, String courseName, Collection<Student> students, Collection<Configuration> configurations)
InitialSectioning
.initialSectioning
in interface StudentSectioning
offeringId
- instructional offering idcourseName
- course namestudents
- list of students to be sectionedconfigurations
- list of configurations the students are to be sectioned intoassignment
- current assignmentprotected String getClassLabel(Lecture lecture)
lecture
- a classprotected void initialSectioningLectures(Assignment<Lecture,Placement> assignment, Long offeringId, String courseName, Collection<Student> students, Collection<Lecture> lectures)
InitialSectioning
.assignment
- current assignmentofferingId
- instructional offering idcourseName
- course namestudents
- list of students to be sectionedlectures
- list of lectures the students are to be sectioned intoprotected InitialSectioning.Group[] studentsToConfigurations(Long offeringId, Collection<Student> students, Collection<Configuration> configurations)
InitialSectioning.getGroups()
.offeringId
- instructional offering idstudents
- list of students to be sectionedconfigurations
- list of configurations the students are to be sectioned intoInitialSectioning.Group
protected InitialSectioning.Group[] studentsToLectures(Long offeringId, Collection<Student> students, Collection<Lecture> lectures)
InitialSectioning.getGroups()
.offeringId
- instructional offering idstudents
- list of students to be sectionedlectures
- list of lectures the students are to be sectioned intoInitialSectioning.Group
public boolean hasFinalSectioning()
hasFinalSectioning
in interface StudentSectioning
public void switchStudents(Solution<Lecture,Placement> solution, TerminationCondition<Lecture,Placement> termination)
switchStudents
in interface StudentSectioning
solution
- current solutiontermination
- termination condition (optional)public void resection(Assignment<Lecture,Placement> assignment, Lecture lecture, boolean recursive, boolean configAsWell)
resection
in interface StudentSectioning
lecture
- given lecturerecursive
- recursively resection lectures affected by a student swapconfigAsWell
- resection students between configurations as wellassignment
- current assignmentpublic void getInfo(Assignment<Lecture,Placement> assignment, Map<String,String> info)
InfoProvider
getInfo
in interface InfoProvider<Lecture,Placement>
assignment
- current assignmentinfo
- info tablepublic void getInfo(Assignment<Lecture,Placement> assignment, Map<String,String> info, Collection<Lecture> variables)
InfoProvider
getInfo
in interface InfoProvider<Lecture,Placement>
assignment
- current assignmentinfo
- info tablevariables
- sub-problem