001    package net.sf.cpsolver.ifs.solver;
002    
003    import net.sf.cpsolver.ifs.model.Neighbour;
004    import net.sf.cpsolver.ifs.model.Value;
005    import net.sf.cpsolver.ifs.model.Variable;
006    
007    /**
008     * IFS Solver Listener.
009     * 
010     * @see Solver
011     * 
012     * @version IFS 1.2 (Iterative Forward Search)<br>
013     *          Copyright (C) 2006 - 2010 Tomas Muller<br>
014     *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
015     *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
016     * <br>
017     *          This library is free software; you can redistribute it and/or modify
018     *          it under the terms of the GNU Lesser General Public License as
019     *          published by the Free Software Foundation; either version 3 of the
020     *          License, or (at your option) any later version. <br>
021     * <br>
022     *          This library is distributed in the hope that it will be useful, but
023     *          WITHOUT ANY WARRANTY; without even the implied warranty of
024     *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
025     *          Lesser General Public License for more details. <br>
026     * <br>
027     *          You should have received a copy of the GNU Lesser General Public
028     *          License along with this library; if not see <http://www.gnu.org/licenses/>.
029     **/
030    public interface SolverListener<V extends Variable<V, T>, T extends Value<V, T>> {
031    
032        /**
033         * A variable was selected
034         * 
035         * @param iteration
036         *            current iteration
037         * @param variable
038         *            selected variable
039         */
040        public boolean variableSelected(long iteration, V variable);
041    
042        /**
043         * A value was selected
044         * 
045         * @param iteration
046         *            current iteration
047         * @param variable
048         *            selected variable
049         * @param value
050         *            selected variable
051         */
052        public boolean valueSelected(long iteration, V variable, T value);
053    
054        /**
055         * A neighbour was selected
056         * 
057         * @param iteration
058         *            current iteration
059         * @param neighbour
060         *            neighbour
061         */
062        public boolean neighbourSelected(long iteration, Neighbour<V, T> neighbour);
063    
064    }