org.cpsolver.coursett.neighbourhoods

## Class Suggestion

- java.lang.Object
- - org.cpsolver.ifs.heuristics.StandardNeighbourSelection<Lecture,Placement>
  - - org.cpsolver.coursett.heuristics.NeighbourSelectionWithSuggestions
    - - org.cpsolver.coursett.neighbourhoods.Suggestion

- All Implemented Interfaces:
    NeighbourSelection<Lecture,Placement>

      public class Suggestion
      extends NeighbourSelectionWithSuggestions

  A simple neighbor selection based on `NeighbourSelectionWithSuggestions`, only triggering when there is an unassigned class. The selection picks a random unassigned class and tries to do a limited-depth search up to the Neighbour.SuggestionDepth depth. If successful, the returned suggestion is always considered improving as it finds an assignment that increases the number of assigned classes.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 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/.
  Author:
    Tomáš Müller

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.cpsolver.coursett.heuristics.NeighbourSelectionWithSuggestions

      `NeighbourSelectionWithSuggestions.NeighbourSelectionWithSuggestionsContext`

  - ### Field Summary

    - ### Fields inherited from class org.cpsolver.coursett.heuristics.NeighbourSelectionWithSuggestions

      `iSuggestionDepth, iSuggestionTimeout`

    - ### Fields inherited from class org.cpsolver.ifs.heuristics.StandardNeighbourSelection

      `iSolver, iStat, sLogger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Suggestion(DataProperties properties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Neighbour<Lecture,Placement>` | `selectNeighbour(Solution<Lecture,Placement> solution)` Select neighbour.

    - ### Methods inherited from class org.cpsolver.coursett.heuristics.NeighbourSelectionWithSuggestions

      `init, selectNeighbourWithSuggestions`

    - ### Methods inherited from class org.cpsolver.ifs.heuristics.StandardNeighbourSelection

      `getValueSelection, getVariableSelection, selectValue, selectVariable, setValueSelection, setVariableSelection`

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

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

- - ### Constructor Detail

    - #### Suggestion

          public Suggestion(DataProperties properties)
                     throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### selectNeighbour

          public Neighbour<Lecture,Placement> selectNeighbour(Solution<Lecture,Placement> solution)

      Description copied from class: `StandardNeighbourSelection`
      Select neighbour. A value is selected to the selected variable.
      Specified by:
        `selectNeighbour` in interface `NeighbourSelection<Lecture,Placement>`
      Overrides:
        `selectNeighbour` in class `NeighbourSelectionWithSuggestions`
      Parameters:
        `solution` - given solution
      Returns:
        a neighbour assignment