001    package ifs.termination;
002    
003    import ifs.solution.Solution;
004    
005    /**
006     * Termination condition.
007     * <br><br>
008     * The termination condition determines when the algorithm should finish. For example, 
009     * the solver should terminate when the maximal number of iterations or some other given 
010     * timeout value is reached. Moreover, it can stop the search process when the current 
011     * solution is good enough, e.g., all variables are assigned and/or some other solution 
012     * parameters are in the required ranges. For example, the solver can stop when all 
013     * variables are assigned and less than 10% of the soft constraints are violated. 
014     * Termination of the process by the user can also be a part of the termination condition.
015     *
016     * @see ifs.solver.Solver
017     *
018     * @author <a href="mailto:muller@ktiml.mff.cuni.cz">Tomáš Müller</a>
019     * @version 1.0
020     **/
021    public interface TerminationCondition {
022        /** Returns true when the solver can continue with the next iteration
023         * @param currentSolution current solution
024         */
025        public boolean canContinue(Solution currentSolution);
026    }