    001package org.cpsolver.coursett.constraint;
    002
    003import java.util.Set;
    004
    005import org.cpsolver.coursett.criteria.StudentConflict;
    006import org.cpsolver.coursett.model.Lecture;
    007import org.cpsolver.coursett.model.Placement;
    008import org.cpsolver.ifs.assignment.Assignment;
    009import org.cpsolver.ifs.model.Constraint;
    010
    011
    012/**
    013 * Ignore student conflicts constraint. <br>
    014 * This constraint keeps track of classes between which student conflicts of any kind are to be ignored.
    015 * This constraint is used by {@link Lecture#isToIgnoreStudentConflictsWith(Lecture)} and translates to
    016 * {@link StudentConflict#ignore(Lecture, Lecture)} that is true when the two classes are connected by
    017 * this constraint.
    018 *
    019 * <br>
    020 *
    021 * @author  Tomáš Müller
    022 * @version CourseTT 1.3 (University Course Timetabling)<br>
    023 *          Copyright (C) 2013 - 2014 Tomáš Müller<br>
    024 *          <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
    025 *          <a href="http://muller.unitime.org">http://muller.unitime.org</a><br>
    026 * <br>
    027 *          This library is free software; you can redistribute it and/or modify
    028 *          it under the terms of the GNU Lesser General Public License as
    029 *          published by the Free Software Foundation; either version 3 of the
    030 *          License, or (at your option) any later version. <br>
    031 * <br>
    032 *          This library is distributed in the hope that it will be useful, but
    033 *          WITHOUT ANY WARRANTY; without even the implied warranty of
    034 *          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    035 *          Lesser General Public License for more details. <br>
    036 * <br>
    037 *          You should have received a copy of the GNU Lesser General Public
    038 *          License along with this library; if not see
    039 *          <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>.
    040 */
    041public class IgnoreStudentConflictsConstraint extends Constraint<Lecture, Placement> {
    042
    043    public static final String REFERENCE = "NO_CONFLICT";
    044
    045    @Override
    046    public void addVariable(Lecture variable) {
    047        super.addVariable(variable);
    048        variable.clearIgnoreStudentConflictsWithCache();
    049    }
    050
    051    @Override
    052    public void computeConflicts(Assignment<Lecture, Placement> assignment, Placement value, Set<Placement> conflicts) {
    053    }
    054
    055    @Override
    056    public boolean isHard() {
    057        return false;
    058    }
    059
    060}