org.cpsolver.exam.heuristics

## Class ExamSimulatedAnnealing.Context

- java.lang.Object
- - org.cpsolver.exam.heuristics.ExamSimulatedAnnealing.Context

- All Implemented Interfaces:
    AssignmentContext
  Enclosing class:
    ExamSimulatedAnnealing

      public class ExamSimulatedAnnealing.Context
      extends Object
      implements AssignmentContext

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Context()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Context

          public Context()

  - ### Method Detail

    - #### incIter

          protected void incIter(Solution<Exam,ExamPlacement> solution)

      Increment iteration counter, cool/reheat/restoreBest if necessary
      Parameters:
        `solution` - current solution

    - #### cool

          protected void cool(Solution<Exam,ExamPlacement> solution)

      Cool temperature
      Parameters:
        `solution` - current solution

    - #### reheat

          protected void reheat(Solution<Exam,ExamPlacement> solution)

      Reheat temperature
      Parameters:
        `solution` - current solution

    - #### bestSaved

          protected void bestSaved(Solution<Exam,ExamPlacement> solution)

      Memorize the iteration when the last best solution was found.
      Parameters:
        `solution` - current solution

    - #### prob

          protected double prob(double value)

      Neighbour acceptance probability
      Parameters:
        `value` - absolute or relative value of the proposed change (neighbour)
      Returns:
        probability of acceptance of a change (neighbour)

    - #### accepted

          protected void accepted(double value)

      A neighbor with the given value was accepted.
      Parameters:
        `value` - change in the solution value

    - #### activateIfNeeded

          protected void activateIfNeeded()

    - #### incMoves

          protected void incMoves(double value)

    - #### reset

          protected void reset()