001    package net.sf.cpsolver.ifs.model;
002    
003    /**
004     * Interface of a constraint that weakens with the time.
005     * 
006     * @version CourseTT 1.2 (University Course Timetabling)<br>
007     *          Copyright (C) 2006 - 2010 Tomas Muller<br>
008     *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
009     *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
010     * <br>
011     *          This library is free software; you can redistribute it and/or modify
012     *          it under the terms of the GNU Lesser General Public License as
013     *          published by the Free Software Foundation; either version 3 of the
014     *          License, or (at your option) any later version. <br>
015     * <br>
016     *          This library is distributed in the hope that it will be useful, but
017     *          WITHOUT ANY WARRANTY; without even the implied warranty of
018     *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019     *          Lesser General Public License for more details. <br>
020     * <br>
021     *          You should have received a copy of the GNU Lesser General Public
022     *          License along with this library; if not see
023     *          <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>.
024     */
025    
026    public interface WeakeningConstraint<V extends Variable<V, T>, T extends Value<V, T>> {
027        /**
028         * Weaken the constraint. This method is called if the constraint
029         * participates in an unassigned of a variable.
030         */
031        public void weaken();
032        
033        
034        /**
035         * Weaken the constraint enough so that it can assign the given
036         * value.
037         */
038        public void weaken(T value);
039    }