public class PriorityConstructionSelection extends Object implements NeighbourSelection<Request,Enrollment>
BranchBoundSelection, but it works in cycles
(over all the students) assigning only the first N priority courses. It starts with
N = 1 and increases it by one after each cycle. The selection ends when no student can
get more requests assigned in a whole cycle. Run the selection only once (at the
beginning), the selection falls back to BranchBoundSelection if there are already
some requests assigned at the time of initialization.
| Modifier and Type | Class and Description |
|---|---|
class |
PriorityConstructionSelection.ConstructionNeighbour
Takes
BranchBoundSelection.BranchBoundNeighbour but only assign the given
number of assignments, corresponding to the number of cycles. |
| Modifier and Type | Field and Description |
|---|---|
protected StudentOrder |
iOrder |
protected List<Student> |
iStudents |
protected Iterator<Student> |
iStudentsEnumeration |
| Constructor and Description |
|---|
PriorityConstructionSelection(DataProperties properties)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Neighbour<Request,Enrollment> |
branchAndBound(Solution<Request,Enrollment> solution)
Find best solution for the next student using
BranchBoundSelection. |
void |
init(Solver<Request,Enrollment> solver)
Initialize
|
protected void |
nextCycle(Solution<Request,Enrollment> solution)
Increment cycle
|
Neighbour<Request,Enrollment> |
selectNeighbour(Solution<Request,Enrollment> solution)
Select neighbor.
|
protected Iterator<Student> iStudentsEnumeration
protected StudentOrder iOrder
public PriorityConstructionSelection(DataProperties properties)
properties - configurationpublic void init(Solver<Request,Enrollment> solver)
init in interface NeighbourSelection<Request,Enrollment>solver - current solverpublic Neighbour<Request,Enrollment> branchAndBound(Solution<Request,Enrollment> solution)
BranchBoundSelection.solution - current selectionprotected void nextCycle(Solution<Request,Enrollment> solution)
solution - current solutionpublic Neighbour<Request,Enrollment> selectNeighbour(Solution<Request,Enrollment> solution)
selectNeighbour in interface NeighbourSelection<Request,Enrollment>solution - given solution