public class ExamSimulatedAnnealing.Context extends Object implements AssignmentContext
| Constructor and Description |
|---|
Context() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
accepted(double value)
A neighbor with the given value was accepted.
|
protected void |
activateIfNeeded() |
protected void |
bestSaved(Solution<Exam,ExamPlacement> solution)
Memorize the iteration when the last best solution was found.
|
protected void |
cool(Solution<Exam,ExamPlacement> solution)
Cool temperature
|
protected void |
incIter(Solution<Exam,ExamPlacement> solution)
Increment iteration counter, cool/reheat/restoreBest if necessary
|
protected void |
incMoves(double value) |
protected double |
prob(double value)
Neighbour acceptance probability
|
protected void |
reheat(Solution<Exam,ExamPlacement> solution)
Reheat temperature
|
protected void |
reset() |
public Context()
protected void incIter(Solution<Exam,ExamPlacement> solution)
solution - current solutionprotected void cool(Solution<Exam,ExamPlacement> solution)
solution - current solutionprotected void reheat(Solution<Exam,ExamPlacement> solution)
solution - current solutionprotected void bestSaved(Solution<Exam,ExamPlacement> solution)
solution - current solutionprotected double prob(double value)
value - absolute or relative value of the proposed change (neighbour)protected void accepted(double value)
value - change in the solution valueprotected void activateIfNeeded()
protected void incMoves(double value)
protected void reset()