public class ExamNeighbourSelection extends Object implements NeighbourSelection<Exam,ExamPlacement>, TerminationCondition<Exam,ExamPlacement>
ExamConstruction until all exams are
assigned)
ExamHillClimbing until the given number if
idle iterations)
ExamSimulatedAnnealing until timeout
is reached)
ExamGreatDeluge until timeout is reached)
TerminationCondition.canContinue(Solution) is
false), the search is finished with one sweep of final phase (
ExamHillClimbing until the given number if idle iterations).
| Constructor and Description |
|---|
ExamNeighbourSelection(DataProperties properties)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canContinue(Solution<Exam,ExamPlacement> currentSolution)
Termination condition (i.e., has final phase finished)
|
void |
init(Solver<Exam,ExamPlacement> solver)
Initialization
|
boolean |
isFinalPhase()
Is final phase
|
Neighbour<Exam,ExamPlacement> |
selectNeighbour(Solution<Exam,ExamPlacement> solution)
Neighbour selection.
|
void |
setFinalPhase(Callback finalPhaseFinished)
Set final phase
|
public ExamNeighbourSelection(DataProperties properties)
properties - problem propertiespublic void init(Solver<Exam,ExamPlacement> solver)
init in interface NeighbourSelection<Exam,ExamPlacement>public Neighbour<Exam,ExamPlacement> selectNeighbour(Solution<Exam,ExamPlacement> solution)
ExamConstruction until all exams are
assigned)
ExamHillClimbing until the given number
if idle iterations)
ExamSimulatedAnnealing until
timeout is reached)
selectNeighbour in interface NeighbourSelection<Exam,ExamPlacement>solution - given solutionpublic void setFinalPhase(Callback finalPhaseFinished)
finalPhaseFinished - to be called when the final phase is finishedpublic boolean isFinalPhase()
public boolean canContinue(Solution<Exam,ExamPlacement> currentSolution)
canContinue in interface TerminationCondition<Exam,ExamPlacement>currentSolution - current solution