|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.studentsct.heuristics.selection.BranchBoundSelection.Selection
public class BranchBoundSelection.Selection
Branch & bound selection for a student
Field Summary | |
---|---|
protected Enrollment[] |
iAssignment
Current assignment |
protected Enrollment[] |
iBestAssignment
Best assignment |
protected double |
iBestValue
Best value |
protected Student |
iStudent
Student |
protected long |
iT0
Start time |
protected long |
iT1
End time |
protected boolean |
iTimeoutReached
Was timeout reached |
protected Hashtable |
iValues
Value cache |
Constructor Summary | |
---|---|
BranchBoundSelection.Selection(Student student)
Constructor |
Method Summary | |
---|---|
void |
backTrack(int idx)
branch & bound search |
boolean |
canAssign(Request request,
int idx)
True if the given request can be assigned |
Enrollment |
firstConflict(int idx,
Enrollment enrollment)
First conflicting enrollment |
protected double |
getAssignmentPenalty(int i)
Assignment penalty |
Enrollment[] |
getBestAssignment()
Best schedule |
int |
getBestNrAssigned()
Number of requests assigned in the best schedule |
double |
getBestValue()
Value of the best schedule |
double |
getBound(int idx)
Bound for the current 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 |
double |
getNrDistanceConflicts(int idx)
Number of distance conflicts of idx-th assignment of the current schedule |
double |
getPenalty()
Penalty of the current schedule |
double |
getPenaltyBound(int idx)
Penalty bound of the current schedule |
long |
getTime()
Time (in milliseconds) the branch & bound did run |
double |
getValue()
Value of the current schedule |
boolean |
isTimeoutReached()
Was timeout reached |
void |
saveBest()
Save the current schedule as the best |
BranchBoundSelection.BranchBoundNeighbour |
select()
Execute branch & bound, return the best found schedule for the selected student. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Student iStudent
protected long iT0
protected long iT1
protected boolean iTimeoutReached
protected Enrollment[] iAssignment
protected Enrollment[] iBestAssignment
protected double iBestValue
protected Hashtable iValues
Constructor Detail |
---|
public BranchBoundSelection.Selection(Student student)
student
- selected studentMethod Detail |
---|
public BranchBoundSelection.BranchBoundNeighbour select()
public boolean isTimeoutReached()
public long getTime()
public Enrollment[] getBestAssignment()
public double getBestValue()
public int getBestNrAssigned()
public int getNrAssignedBound(int idx)
public double getNrDistanceConflicts(int idx)
public double getBound(int idx)
public double getValue()
protected double getAssignmentPenalty(int i)
public double getPenalty()
public double getPenaltyBound(int idx)
public void saveBest()
public Enrollment firstConflict(int idx, Enrollment enrollment)
public boolean canAssign(Request request, int idx)
public int getNrAssigned()
public void backTrack(int idx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |