public static class InevitableStudentConflicts.StudentCheck extends Object
Constructor and Description |
---|
StudentCheck(List<Request> requests)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
backTrack(int idx)
branch & bound search
|
boolean |
canAssign(Request request,
int idx)
True if the given request can be assigned
|
void |
check()
Execute branch & bound, return the best found schedule for the
selected student.
|
Enrollment |
firstConflict(Enrollment enrollment)
First conflicting enrollment
|
Enrollment[] |
getBestAssignment()
Best schedule
|
int |
getBestNrAssigned()
Number of requests assigned in the best schedule
|
int |
getNrAssigned()
Number of assigned requests in the current schedule
|
int |
getNrAssignedBound(int idx)
Bound for the number of assigned requests in the current schedule
|
boolean |
isBestComplete()
True when the best enrollment is complete
|
void |
saveBest()
Save the current schedule as the best
|
public StudentCheck(List<Request> requests)
requests
- course and free time requests of a studentpublic void check()
public Enrollment[] getBestAssignment()
public int getBestNrAssigned()
public int getNrAssignedBound(int idx)
public boolean isBestComplete()
public void saveBest()
public Enrollment firstConflict(Enrollment enrollment)
public boolean canAssign(Request request, int idx)
public int getNrAssigned()
public void backTrack(int idx)