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