## Uses of Interface
org.cpsolver.ifs.model.Neighbour

- Packages that use Neighbour
  Package | Description
  --- | ---
  org.cpsolver.coursett.heuristics | University Course Timetabling: Heuristics.
  org.cpsolver.coursett.neighbourhoods | University Course Timetabling: Various Neighbourhoods.
  org.cpsolver.coursett.sectioning | Additional Student Sectioning Algorithms.
  org.cpsolver.exam.heuristics | Examination Timetabling: Solution Heuristics.
  org.cpsolver.exam.neighbours | Examination Timetabling: Various Neighbourhoods.
  org.cpsolver.exam.split | This package contains an an experimental criterion that allows an exam to be split into two if it decreases the number of student conflicts.
  org.cpsolver.ifs.algorithms | IFS Neighbourhood Search Algorithms
  org.cpsolver.ifs.algorithms.neighbourhoods | IFS: Various Problem-Independent Neighbourhoods.
  org.cpsolver.ifs.dbt | Dynamic backtracking extension of IFS solver
  org.cpsolver.ifs.heuristics | IFS Heuristics (value and variable selection criteria)
  org.cpsolver.ifs.model | IFS Model (description of a problem)
  org.cpsolver.ifs.solver | IFS Solver
  org.cpsolver.studentsct.heuristics | Student Sectioning: Heuristics.
  org.cpsolver.studentsct.heuristics.selection | Student Sectioning: Various Neighbour Selection Criteria.

- - ### Uses of Neighbour in org.cpsolver.coursett.heuristics

    Classes in org.cpsolver.coursett.heuristics that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `NeighbourSelectionWithSuggestions.SuggestionNeighbour`

    Methods in org.cpsolver.coursett.heuristics that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Lecture,Placement>` | FixCompleteSolutionNeighbourSelection.`selectNeighbour(Solution<Lecture,Placement> solution)` Try to improve existing solution by backtracking search of very limited depth.
    `Neighbour<Lecture,Placement>` | NeighbourSelectionWithSuggestions.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | NeighbourSelectionWithSuggestions.`selectNeighbourWithSuggestions(Solution<Lecture,Placement> solution, Lecture lecture, int depth)`

  - ### Uses of Neighbour in org.cpsolver.coursett.neighbourhoods

    Methods in org.cpsolver.coursett.neighbourhoods that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Lecture,Placement>` | RoomChange.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | RoomSwap.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | Suggestion.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | TimeChange.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | TimeSwap.`selectNeighbour(Solution<Lecture,Placement> solution)`

  - ### Uses of Neighbour in org.cpsolver.coursett.sectioning

    Subinterfaces of Neighbour in org.cpsolver.coursett.sectioning
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `StudentMove` A simple interface representing a student enrollment change.

    Classes in org.cpsolver.coursett.sectioning that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `StudentSwap` Student swap move.

    Methods in org.cpsolver.coursett.sectioning that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Lecture,Placement>` | StudentSwapGenerator.`generateSwap(TimetableModel model, Assignment<Lecture,Placement> assignment, Student student, Configuration config)`
    `Neighbour<Lecture,Placement>` | StudentSwapGenerator.`selectNeighbour(Assignment<Lecture,Placement> assignment, Lecture lecture)`
    `Neighbour<Lecture,Placement>` | RandomStudentSwap.`selectNeighbour(Solution<Lecture,Placement> solution)`
    `Neighbour<Lecture,Placement>` | StudentSwapGenerator.`selectNeighbour(Solution<Lecture,Placement> solution)`

    Methods in org.cpsolver.coursett.sectioning with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `protected double` | StudentSwapSectioning.`group(Neighbour<Lecture,Placement> n, Assignment<Lecture,Placement> assignment)` Student group weight change of a student swap
    `protected double` | StudentSwapSectioning.`objective(Neighbour<Lecture,Placement> n, Assignment<Lecture,Placement> assignment)` Student conflict weight change of a student swap
    `protected double` | StudentSwapSectioning.`value(Neighbour<Lecture,Placement> n, Assignment<Lecture,Placement> assignment)` Combined weight change of a student swap

  - ### Uses of Neighbour in org.cpsolver.exam.heuristics

    Methods in org.cpsolver.exam.heuristics that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Exam,ExamPlacement>` | ExamConstruction.`checkLocalOptimality(Assignment<Exam,ExamPlacement> assignment, ExamModel model)` Find a new assignment of one of the assigned exams that improves the time cost `ExamPlacement.getTimeCost(Assignment)` and for which there is a set of available rooms `Exam.findBestAvailableRooms(Assignment, ExamPeriodPlacement)`.
    `Neighbour<Exam,ExamPlacement>` | ExamGreatDeluge.`genMove(Solution<Exam,ExamPlacement> solution)` Deprecated. Generate neighbour -- select neighbourhood randomly, select neighbour
    `Neighbour<Exam,ExamPlacement>` | ExamSimulatedAnnealing.`genMove(Solution<Exam,ExamPlacement> solution)` Deprecated. Generate neighbour -- select neighbourhood randomly, select neighbour
    `Neighbour<Exam,ExamPlacement>` | ExamColoringConstruction.`selectNeighbour(Solution<Exam,ExamPlacement> solution)`
    `Neighbour<Exam,ExamPlacement>` | ExamConstruction.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select a neighbour.
    `Neighbour<Exam,ExamPlacement>` | ExamGreatDeluge.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Deprecated. A neighbour is generated randomly untill an acceptable one is found.
    `Neighbour<Exam,ExamPlacement>` | ExamHillClimbing.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Deprecated. Select one of the given neighbourhoods randomly, select neighbour, return it if its value is below or equal to zero (continue with the next selection otherwise).
    `Neighbour<Exam,ExamPlacement>` | ExamNeighbourSelection.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Neighbour selection.
    `Neighbour<Exam,ExamPlacement>` | ExamSimulatedAnnealing.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Deprecated. Select neighbour -- generate a move `ExamSimulatedAnnealing.genMove(Solution)` until an acceptable neighbour is found `ExamSimulatedAnnealing.accept(Solution, Neighbour)`, keep increasing iteration `ExamSimulatedAnnealing.Context.incIter(Solution)`.
    `Neighbour<Exam,ExamPlacement>` | ExamTabuSearch.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Neighbor selection

    Methods in org.cpsolver.exam.heuristics with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | ExamGreatDeluge.`accept(Solution<Exam,ExamPlacement> solution, Neighbour<Exam,ExamPlacement> neighbour)` Deprecated. Accept neighbour
    `protected boolean` | ExamSimulatedAnnealing.`accept(Solution<Exam,ExamPlacement> solution, Neighbour<Exam,ExamPlacement> neighbour)` Deprecated. True if the given neighboir is to be be accepted

  - ### Uses of Neighbour in org.cpsolver.exam.neighbours

    Classes in org.cpsolver.exam.neighbours that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `ExamRoomSwapNeighbour` Swap a room between two assigned exams.
    `class` | `ExamSimpleNeighbour` Extension of `SimpleNeighbour`.

    Methods in org.cpsolver.exam.neighbours that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Exam,ExamPlacement>` | ExamPeriodSwapMove.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select an exam randomly, select an available period randomly (if it is not assigned), use rooms if possible, select rooms using `Exam.findBestAvailableRooms(Assignment, ExamPeriodPlacement)` if not (exam is unassigned, a room is not available or used).
    `Neighbour<Exam,ExamPlacement>` | ExamRandomMove.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select an exam randomly, select an available period randomly (from `Exam.getPeriodPlacements()`), select rooms using `Exam.findBestAvailableRooms(Assignment, ExamPeriodPlacement)`.
    `Neighbour<Exam,ExamPlacement>` | ExamRoomMove.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select an exam randomly, select an available period randomly (if it is not assigned, from `Exam.getPeriodPlacements()`), select rooms using `Exam.findRoomsRandom(Assignment, ExamPeriodPlacement)`
    `Neighbour<Exam,ExamPlacement>` | ExamTimeMove.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select an exam randomly, select an available period randomly (if it is not assigned), use rooms if possible, select rooms using `Exam.findBestAvailableRooms(Assignment, ExamPeriodPlacement)` if not (exam is unassigned, a room is not available or used).

  - ### Uses of Neighbour in org.cpsolver.exam.split

    Classes in org.cpsolver.exam.split that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `ExamSplitMoves.ExamMergeNeighbour` Merge two exams that have been split before back into one.
    `protected class` | `ExamSplitMoves.ExamShuffleNeighbour` Shuffle students between the parent exam and all of its children.
    `protected class` | `ExamSplitMoves.ExamSplitNeighbour` Split an exam into two

    Methods in org.cpsolver.exam.split that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Exam,ExamPlacement>` | ExamSplitMoves.`selectNeighbour(Solution<Exam,ExamPlacement> solution)` Select a split (split an exam into two), a merge (merge two split exams back together) or shuffle operation (move students between two exams that has been split before).

  - ### Uses of Neighbour in org.cpsolver.ifs.algorithms

    Methods in org.cpsolver.ifs.algorithms that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<V,T>` | NeighbourSearch.`generateMove(Solution<V,T> solution)` Generate a random move
    `Neighbour<V,T>` | MetaHeuristicSearch.`selectNeighbour(Solution<V,T> solution)` Neighbour selection.
    `Neighbour<V,T>` | NeighbourSearch.`selectNeighbour(Solution<V,T> solution)`
    `Neighbour<V,T>` | NeighbourSelector.`selectNeighbour(Solution<V,T> solution)` Neighbour selection -- use `NeighbourSelection.selectNeighbour(Solution)` update stats if desired.
    `Neighbour<V,T>` | ParallelConstruction.`selectNeighbour(Solution<V,T> solution)`
    `Neighbour<V,T>` | SimpleSearch.`selectNeighbour(Solution<V,T> solution)` Neighbour selection.

    Methods in org.cpsolver.ifs.algorithms with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | GreatDeluge.GreatDelugeContext.`accept(Assignment<V,T> assignment, Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)` Accept the given neighbour if it does not worsen the current solution or when the new solution is below the bound
    `protected boolean` | HillClimber.HillClimberContext.`accept(Assignment<V,T> assignment, Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)` Accept any move that does not worsen the solution (value <= 0)
    `protected abstract boolean` | NeighbourSearch.NeighbourSearchContext.`accept(Assignment<V,T> assignment, Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)` Acceptance criterion.
    `protected boolean` | SimulatedAnnealing.SimulatedAnnealingContext.`accept(Assignment<V,T> assignment, Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)` True if the given neighbour is to be be accepted
    `protected boolean` | StepCountingHillClimber.StepCountingHillClimberContext.`accept(Assignment<V,T> assignment, Model<V,T> model, Neighbour<V,T> neighbour, double value, boolean lazy)` Accept any move that does not worsen the solution (value <= 0) or that is below the bound.
    `protected boolean` | NeighbourSearch.`accept(NeighbourSearch.NeighbourSearchContext context, Solution<V,T> solution, Neighbour<V,T> neighbour)` True if the generated move is to be accepted.
    `void` | NeighbourSelector.`update(Assignment<V,T> a, Neighbour<V,T> n, long time)` Update statistics

  - ### Uses of Neighbour in org.cpsolver.ifs.algorithms.neighbourhoods

    Classes in org.cpsolver.ifs.algorithms.neighbourhoods that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `RandomSwapMove.SwapNeighbour`

    Methods in org.cpsolver.ifs.algorithms.neighbourhoods that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<V,T>` | RandomMove.`selectNeighbour(Solution<V,T> solution)`
    `Neighbour<V,T>` | RandomSwapMove.`selectNeighbour(Solution<V,T> solution)`
    `Neighbour<V,T>` | SuggestionMove.`selectNeighbour(Solution<V,T> solution)`

  - ### Uses of Neighbour in org.cpsolver.ifs.dbt

    Methods in org.cpsolver.ifs.dbt with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `void` | DbtPropagation.`neighbourFailed(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)`
    `boolean` | DbtPropagation.`neighbourSelected(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)`

  - ### Uses of Neighbour in org.cpsolver.ifs.heuristics

    Classes in org.cpsolver.ifs.heuristics that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BacktrackNeighbourSelection.BackTrackNeighbour` Backtracking neighbour

    Methods in org.cpsolver.ifs.heuristics that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<V,T>` | BacktrackNeighbourSelection.`selectNeighbour(Solution<V,T> solution)` Select neighbour.
    `Neighbour<V,T>` | MaxIdleNeighbourSelection.`selectNeighbour(Solution<V,T> solution)`
    `Neighbour<V,T>` | NeighbourSelection.`selectNeighbour(Solution<V,T> solution)` select a neighbour of a given solution
    `Neighbour<V,T>` | RoundRobinNeighbourSelection.`selectNeighbour(Solution<V,T> solution)` Select neighbour.
    `Neighbour<V,T>` | StandardNeighbourSelection.`selectNeighbour(Solution<V,T> solution)` Select neighbour.
    `Neighbour<V,T>` | BacktrackNeighbourSelection.`selectNeighbour(Solution<V,T> solution, V variable)` Select neighbour -- starts from the provided variable.

  - ### Uses of Neighbour in org.cpsolver.ifs.model

    Classes in org.cpsolver.ifs.model that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `class` | `LazyNeighbour<V extends Variable<V,T>,T extends Value<V,T>>` Lazy neigbour (a change of the overall solution value is unknown before the neighbour is assigned, it is possible to undo the neighbour instead).
    `class` | `LazySwap<V extends Variable<V,T>,T extends Value<V,T>>` Lazy swap of two variables.
    `class` | `SimpleNeighbour<V extends Variable<V,T>,T extends Value<V,T>>` A neighbour consisting of a change (either assignment or unassignment) of a single variable.

  - ### Uses of Neighbour in org.cpsolver.ifs.solver

    Methods in org.cpsolver.ifs.solver with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `void` | SolverListener.`neighbourFailed(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)` Called when `ParallelSolver` failed to assign the given neighbour
    `boolean` | SolverListener.`neighbourSelected(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)` A neighbour was selected

    Constructor parameters in org.cpsolver.ifs.solver with type arguments of type Neighbour
    Constructor and Description
    `AssignmentThread(BlockingQueue<Neighbour<V,T>> queue)`
    `SolverThread(int index, BlockingQueue<Neighbour<V,T>> queue)`

  - ### Uses of Neighbour in org.cpsolver.studentsct.heuristics

    Methods in org.cpsolver.studentsct.heuristics that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Request,Enrollment>` | RestoreBestSolution.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | TwoPhaseStudentSctNeighbourSelection.RestoreDummyStudents.`selectNeighbour(Solution<Request,Enrollment> solution)` Return all (removed) dummy students into the problem

    Methods in org.cpsolver.studentsct.heuristics with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `void` | StudentSctNeighbourSelection.`neighbourFailed(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `boolean` | StudentSctNeighbourSelection.`neighbourSelected(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`

  - ### Uses of Neighbour in org.cpsolver.studentsct.heuristics.selection

    Classes in org.cpsolver.studentsct.heuristics.selection that implement Neighbour
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BranchBoundSelection.BranchBoundNeighbour` Branch & bound neighbour -- a schedule of a student
    `class` | `PriorityConstructionSelection.ConstructionNeighbour` Takes `BranchBoundSelection.BranchBoundNeighbour` but only assign the given number of assignments, corresponding to the number of cycles.
    `static class` | `RandomUnassignmentSelection.UnassignStudentNeighbour` Unassignment of all requests of a student
    `static class` | `SwapStudentSelection.SwapStudentNeighbour` Neighbour that contains the swap

    Methods in org.cpsolver.studentsct.heuristics.selection that return Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Request,Enrollment>` | PriorityConstructionSelection.`branchAndBound(Solution<Request,Enrollment> solution)` Find best solution for the next student using `BranchBoundSelection`.
    `Neighbour<Request,Enrollment>` | AssignInitialSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | BacktrackSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | BranchBoundSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` Select neighbour.
    `Neighbour<Request,Enrollment>` | CriticalCoursesBranchAndBoundSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | MinCreditBranchAndBoundSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | PriorityConstructionSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` Select neighbor.
    `Neighbour<Request,Enrollment>` | RandomUnassignmentSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` With the given probabilty, a student is randomly selected to be unassigned.
    `Neighbour<Request,Enrollment>` | ResectionIncompleteStudentsSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` Select neighbour.
    `Neighbour<Request,Enrollment>` | ResectionUnassignedStudentsSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` Select neighbour.
    `Neighbour<Request,Enrollment>` | RndUnProblStudSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` With the given probabilty, a problematic student is randomly selected to be unassigned.
    `Neighbour<Request,Enrollment>` | ShuffleStudentsSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | StandardSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` Employ the provided `VariableSelection` and `ValueSelection` and return the selected value as `SimpleNeighbour`.
    `Neighbour<Request,Enrollment>` | StudentEnrollmentSwapSelection.`selectNeighbour(Solution<Request,Enrollment> solution)`
    `Neighbour<Request,Enrollment>` | SwapStudentSelection.`selectNeighbour(Solution<Request,Enrollment> solution)` For each student that does not have a complete schedule, try to find a request and a student that can be moved out of an enrollment so that the selected student can be assigned to the selected request.
    `protected Neighbour<Request,Enrollment>` | ShuffleStudentsSelection.ShuffleBacktrackNeighbourSelection.`selectNeighbour(Solution<Request,Enrollment> solution, org.cpsolver.studentsct.heuristics.selection.ShuffleStudentsSelection.Shuffle shuffle)`

    Methods in org.cpsolver.studentsct.heuristics.selection with parameters of type Neighbour
    Modifier and Type | Method and Description
    --- | ---
    `void` | BacktrackSelection.`neighbourFailed(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `void` | BranchBoundSelection.`neighbourFailed(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `void` | StudentEnrollmentSwapSelection.`neighbourFailed(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `void` | SwapStudentSelection.`neighbourFailed(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `boolean` | BacktrackSelection.`neighbourSelected(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `boolean` | BranchBoundSelection.`neighbourSelected(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `boolean` | StudentEnrollmentSwapSelection.`neighbourSelected(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`
    `boolean` | SwapStudentSelection.`neighbourSelected(Assignment<Request,Enrollment> assignment, long iteration, Neighbour<Request,Enrollment> neighbour)`