net.sf.cpsolver.studentsct.check
Class InevitableStudentConflicts.StudentCheck

java.lang.Object
  extended by net.sf.cpsolver.studentsct.check.InevitableStudentConflicts.StudentCheck
Enclosing class:
InevitableStudentConflicts

public static class InevitableStudentConflicts.StudentCheck
extends Object

Use branch&bound technique to find out whether a student can get a complete schedule.


Constructor Summary
InevitableStudentConflicts.StudentCheck(Vector requests)
          Constructor
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InevitableStudentConflicts.StudentCheck

public InevitableStudentConflicts.StudentCheck(Vector requests)
Constructor

Parameters:
requests - course and free time requests of a student
Method Detail

check

public void check()
Execute branch & bound, return the best found schedule for the selected student.


getBestAssignment

public Enrollment[] getBestAssignment()
Best schedule


getBestNrAssigned

public int getBestNrAssigned()
Number of requests assigned in the best schedule


getNrAssignedBound

public int getNrAssignedBound(int idx)
Bound for the number of assigned requests in the current schedule


isBestComplete

public boolean isBestComplete()
True when the best enrollment is complete


saveBest

public void saveBest()
Save the current schedule as the best


firstConflict

public Enrollment firstConflict(Enrollment enrollment)
First conflicting enrollment


canAssign

public boolean canAssign(Request request,
                         int idx)
True if the given request can be assigned


getNrAssigned

public int getNrAssigned()
Number of assigned requests in the current schedule


backTrack

public void backTrack(int idx)
branch & bound search