public class SoftInstructorConstraint extends InstructorConstraint
| Modifier and Type | Class and Description |
|---|---|
class |
SoftInstructorConstraint.SoftInstructorConstraintContext |
InstructorConstraint.InstructorConstraintContextiConstraintListeners, iIdsMaxSize| Constructor and Description |
|---|
SoftInstructorConstraint(Long id,
String puid,
String name,
boolean ignDist) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeConflicts(Assignment<Lecture,Placement> assignment,
Placement placement,
Set<Placement> conflicts)
The only method which has to be implemented by any constraint.
|
InstructorConstraint.InstructorConstraintContext |
createAssignmentContext(Assignment<Lecture,Placement> assignment)
Create a new assignment context for the given assignment.
|
int |
getConflicts(Assignment<Lecture,Placement> assignment) |
int |
getConflicts(Assignment<Lecture,Placement> assignment,
Placement placement) |
int |
getWorstConflicts() |
boolean |
inConflict(Assignment<Lecture,Placement> assignment,
Placement placement)
Returns true if the given assignment is inconsistent with the existing
assignments respecting this constraint.
|
boolean |
isConsistent(Placement p1,
Placement p2)
Returns true if the given assignments are consistent respecting this
constraint.
|
boolean |
isHard()
Returns true if the constraint is hard.
|
getAvailableArray, getDistanceMetric, getDistancePreference, getName, getPreference, getPreference, getPreferenceCombination, getPuid, getResourceId, getType, getUnavailabilities, getWorstPreference, isAvailable, isAvailable, isIgnoreDistances, setIgnoreDistances, setNotAvailable, setType, toStringassigned, getAssignmentContextReference, getContext, getContext, setAssignmentContextReference, setModel, unassignedaddConstraintListener, addVariable, assignedVariables, compareTo, computeConflictsNoForwardCheck, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, hashCode, removeConstraintListener, removeVariable, variablespublic SoftInstructorConstraint(Long id, String puid, String name, boolean ignDist)
public void computeConflicts(Assignment<Lecture,Placement> assignment, Placement placement, Set<Placement> conflicts)
ConstraintcomputeConflicts in class InstructorConstraintassignment - current assignmentplacement - value to be assigned to its variableconflicts - resultant set of conflicting valuespublic boolean inConflict(Assignment<Lecture,Placement> assignment, Placement placement)
ConstraintMacPropagation).inConflict in class InstructorConstraintassignment - current assignmentplacement - given valuepublic boolean isConsistent(Placement p1, Placement p2)
ConstraintMacPropagation).isConsistent in class InstructorConstraintp1 - a valuep2 - a valuepublic boolean isHard()
ConstraintisHard in class Constraint<Lecture,Placement>public InstructorConstraint.InstructorConstraintContext createAssignmentContext(Assignment<Lecture,Placement> assignment)
HasAssignmentContextcreateAssignmentContext in interface HasAssignmentContext<Lecture,Placement,InstructorConstraint.InstructorConstraintContext>createAssignmentContext in class InstructorConstraintassignment - an assignment for which there needs to be an assignment contextpublic int getConflicts(Assignment<Lecture,Placement> assignment)
public int getConflicts(Assignment<Lecture,Placement> assignment, Placement placement)
public int getWorstConflicts()