001 package net.sf.cpsolver.ifs.heuristics;
002
003 import net.sf.cpsolver.ifs.model.Neighbour;
004 import net.sf.cpsolver.ifs.solution.Solution;
005 import net.sf.cpsolver.ifs.solver.Solver;
006
007 /**
008 * Neighbour selection criterion.
009 * <br><br>
010 * In each iteration of the solver, a neighbour is selected and assigned
011 * (by default {@link StandardNeighbourSelection} is employed).
012 *
013 * @see Solver
014 *
015 * @version
016 * IFS 1.1 (Iterative Forward Search)<br>
017 * Copyright (C) 2006 Tomáš Müller<br>
018 * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
019 * Lazenska 391, 76314 Zlin, Czech Republic<br>
020 * <br>
021 * This library is free software; you can redistribute it and/or
022 * modify it under the terms of the GNU Lesser General Public
023 * License as published by the Free Software Foundation; either
024 * version 2.1 of the License, or (at your option) any later version.
025 * <br><br>
026 * This library is distributed in the hope that it will be useful,
027 * but WITHOUT ANY WARRANTY; without even the implied warranty of
028 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
029 * Lesser General Public License for more details.
030 * <br><br>
031 * You should have received a copy of the GNU Lesser General Public
032 * License along with this library; if not, write to the Free Software
033 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
034 **/
035 public interface NeighbourSelection {
036 /** Criterion initialization */
037 public void init(Solver solver);
038
039 /**
040 * select a neighbour of a given solution
041 * @param solution given solution
042 * @return a neighbour assignment
043 */
044 public Neighbour selectNeighbour(Solution solution);
045
046 }