public class JenrlConstraint extends BinaryConstraint<Lecture,Placement> implements WeakeningConstraint<Lecture,Placement>
iAssignedVariables, iConstraintListeners, iId
Constructor and Description |
---|
JenrlConstraint()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(Lecture variable)
Add a variable to this constraint
|
boolean |
areStudentConflictsCommitted() |
boolean |
areStudentConflictsDistance() |
boolean |
areStudentConflictsDistance(Placement value) |
boolean |
areStudentConflictsHard() |
void |
assigned(long iteration,
Placement value)
Given value is to be assigned to its varable.
|
void |
computeConflicts(Placement value,
Set<Placement> conflicts)
The only method which has to be implemented by any constraint.
|
void |
decJenrl(Student student)
Decrement the number of joined enrollments (during student final
sectioning)
|
Set<Student> |
getInstructors() |
long |
getJenrl()
Number of joined enrollments (during student final sectioning)
|
double |
getJenrlWeight(Student student) |
String |
getName()
Constraint's name -- for printing purposes
|
int |
getNrInstructors() |
int |
getNrStudents() |
Set<Student> |
getStudents() |
void |
incJenrl(Student student)
Increment the number of joined enrollments (during student final
sectioning)
|
boolean |
inConflict(Placement value)
Returns true if the given assignment is inconsistent with the existing
assignments respecting this constraint.
|
boolean |
isConsistent(Placement value1,
Placement value2)
Returns true if the given assignments are consistent respecting this
constraint.
|
boolean |
isHard()
Returns true if the constraint is hard.
|
boolean |
isInConflict()
True if the given two lectures overlap in time
|
static boolean |
isInConflict(Placement p1,
Placement p2,
DistanceMetric m)
Returns true if the given placements are overlapping or they are
back-to-back and too far for students.
|
boolean |
isOfTheSameProblem() |
boolean |
isOverLimit() |
boolean |
isToBeIgnored()
Returns true if there is
IgnoreStudentConflictsConstraint between the two lectures. |
double |
jenrl() |
long |
jenrl(Lecture variable,
Placement value)
Number of joined enrollments if the given value is assigned to the given
variable
|
double |
priority() |
String |
toString() |
void |
unassigned(long iteration,
Placement value)
Given value is unassigned from its variable.
|
void |
weaken()
Weaken the constraint.
|
void |
weaken(Placement value)
Weaken the constraint enough so that it can assign the given
value.
|
another, first, isFirst, second
addConstraintListener, assignedVariables, compareTo, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, hashCode, removeConstraintListener, removeVariable, setModel, variables
public JenrlConstraint()
public void addVariable(Lecture variable)
Constraint
addVariable
in class BinaryConstraint<Lecture,Placement>
public void computeConflicts(Placement value, Set<Placement> conflicts)
Constraint
computeConflicts
in class Constraint<Lecture,Placement>
value
- value to be assigned to its varaibleconflicts
- resultant set of conflicting valuespublic boolean inConflict(Placement value)
Constraint
MacPropagation
).inConflict
in class Constraint<Lecture,Placement>
public boolean isConsistent(Placement value1, Placement value2)
Constraint
MacPropagation
).isConsistent
in class Constraint<Lecture,Placement>
public void unassigned(long iteration, Placement value)
Constraint
unassigned
in class Constraint<Lecture,Placement>
public static boolean isInConflict(Placement p1, Placement p2, DistanceMetric m)
public void assigned(long iteration, Placement value)
Constraint
assigned
in class Constraint<Lecture,Placement>
public long jenrl(Lecture variable, Placement value)
public boolean isInConflict()
public void incJenrl(Student student)
public double getJenrlWeight(Student student)
public void decJenrl(Student student)
public long getJenrl()
public double jenrl()
public double priority()
public int getNrStudents()
public Set<Student> getStudents()
public int getNrInstructors()
public Set<Student> getInstructors()
public boolean isHard()
Constraint
isHard
in class Constraint<Lecture,Placement>
public boolean isOverLimit()
public String getName()
Constraint
getName
in class Constraint<Lecture,Placement>
public boolean areStudentConflictsHard()
public boolean areStudentConflictsDistance()
public boolean areStudentConflictsCommitted()
public boolean areStudentConflictsDistance(Placement value)
public boolean isOfTheSameProblem()
public void weaken()
WeakeningConstraint
weaken
in interface WeakeningConstraint<Lecture,Placement>
public void weaken(Placement value)
WeakeningConstraint
weaken
in interface WeakeningConstraint<Lecture,Placement>
public boolean isToBeIgnored()
IgnoreStudentConflictsConstraint
between the two lectures.