public class SwapStudentSelection.Selection extends Object
Constructor and Description |
---|
Selection(Student student,
Assignment<Request,Enrollment> assignment)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUnassign(Enrollment enrollment,
Enrollment conflict,
Assignment<Request,Enrollment> assignment)
Check if the given conflicting enrollment can be unassigned
|
Enrollment |
getBestEnrollment()
The best enrollment found.
|
double |
getBestValue()
Cost of the best enrollment found
|
Set<Student> |
getProblemStudents()
Set of problematic students computed in the last selection
|
long |
getTime()
Time spent in the last selection
|
boolean |
isTimeoutReached()
Was timeout reached during the selection
|
SwapStudentSelection.SwapStudentNeighbour |
select()
The actual selection
|
public Selection(Student student, Assignment<Request,Enrollment> assignment)
assignment
- current assignmentstudent
- given studentpublic boolean canUnassign(Enrollment enrollment, Enrollment conflict, Assignment<Request,Enrollment> assignment)
conflict
- given enrollmentpublic SwapStudentSelection.SwapStudentNeighbour select()
public boolean isTimeoutReached()
public long getTime()
public Enrollment getBestEnrollment()
public double getBestValue()
public Set<Student> getProblemStudents()