org.cpsolver.ifs.solver

## Interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>

- Type Parameters:
    `V` - Variable
    `T` - Value
  All Known Implementing Classes:
    AssignInitialSelection, BacktrackSelection, BranchBoundSelection, CriticalBacktrackSelection, CriticalCoursesBranchAndBoundSelection, DbtPropagation, MinCreditBranchAndBoundSelection, OnlineSelection, ResectionIncompleteStudentsSelection, ResectionUnassignedStudentsSelection, StudentEnrollmentSwapSelection, StudentSctNeighbourSelection, SuggestionSelection, SwapStudentSelection, TwoPhaseStudentSctNeighbourSelection

      public interface SolverListener<V extends Variable<V,T>,T extends Value<V,T>>

  IFS Solver Listener.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses.
  See Also:
    `Solver`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `neighbourFailed(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)` Called when `ParallelSolver` failed to assign the given neighbour
    `boolean` | `neighbourSelected(Assignment<V,T> assignment, long iteration, Neighbour<V,T> neighbour)` A neighbour was selected
    `boolean` | `valueSelected(Assignment<V,T> assignment, long iteration, V variable, T value)` A value was selected
    `boolean` | `variableSelected(Assignment<V,T> assignment, long iteration, V variable)` A variable was selected

- - ### Method Detail

    - #### variableSelected

          boolean variableSelected(Assignment<V,T> assignment,
                                   long iteration,
                                   V variable)

      A variable was selected
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `variable` - selected variable
      Returns:
        if false is returned the variable will be discarded (search continues with the next variable selection)

    - #### valueSelected

          boolean valueSelected(Assignment<V,T> assignment,
                                long iteration,
                                V variable,
                                T value)

      A value was selected
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `variable` - selected variable
        `value` - selected variable
      Returns:
        if false is returned the selected value is not assigned

    - #### neighbourSelected

          boolean neighbourSelected(Assignment<V,T> assignment,
                                    long iteration,
                                    Neighbour<V,T> neighbour)

      A neighbour was selected
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `neighbour` - neighbour
      Returns:
        if false is returned the selected neighbour is not assigned

    - #### neighbourFailed

          void neighbourFailed(Assignment<V,T> assignment,
                               long iteration,
                               Neighbour<V,T> neighbour)

      Called when `ParallelSolver` failed to assign the given neighbour
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `neighbour` - neighbour