net.sf.cpsolver.coursett.constraint
Class IgnoreStudentConflictsConstraint
java.lang.Object
net.sf.cpsolver.ifs.model.Constraint<Lecture,Placement>
net.sf.cpsolver.coursett.constraint.IgnoreStudentConflictsConstraint
- All Implemented Interfaces:
- Comparable<Constraint<Lecture,Placement>>
public class IgnoreStudentConflictsConstraint
- extends Constraint<Lecture,Placement>
Ignore student conflicts constraint.
This constraint keeps track of classes between which student conflicts of any kind are to be ignored.
This constraint is used by Lecture.isToIgnoreStudentConflictsWith(Lecture)
and translates to
StudentConflict.ignore(Lecture, Lecture)
that is true when the two classes are connected by
this constraint.
- Version:
- CourseTT 1.2 (University Course Timetabling)
Copyright (C) 2013 Tomas Muller
muller@unitime.org
http://muller.unitime.org
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 3 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not see
http://www.gnu.org/licenses/.
Methods inherited from class net.sf.cpsolver.ifs.model.Constraint |
addConstraintListener, assigned, assignedVariables, compareTo, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, getName, hashCode, inConflict, isConsistent, removeConstraintListener, removeVariable, setModel, unassigned, variables |
REFERENCE
public static final String REFERENCE
- See Also:
- Constant Field Values
IgnoreStudentConflictsConstraint
public IgnoreStudentConflictsConstraint()
addVariable
public void addVariable(Lecture variable)
- Description copied from class:
Constraint
- Add a variable to this constraint
- Overrides:
addVariable
in class Constraint<Lecture,Placement>
computeConflicts
public void computeConflicts(Placement value,
Set<Placement> conflicts)
- Description copied from class:
Constraint
- The only method which has to be implemented by any constraint. It returns
the values which needs to be unassigned in order to make this constraint
consistent with the given value if it is assigned to its variable. The
computed list of conflicting values is added to the given set of
conflicts.
- Specified by:
computeConflicts
in class Constraint<Lecture,Placement>
- Parameters:
value
- value to be assigned to its varaibleconflicts
- resultant set of conflicting values
isHard
public boolean isHard()
- Description copied from class:
Constraint
- Returns true if the constraint is hard. Only hard constraints are allowed
to unassign a variable when there is a conflict with a value that is
being assigned
- Overrides:
isHard
in class Constraint<Lecture,Placement>
Copyright © 2014 UniTime LLC. All Rights Reserved.