public class MaxConsecutiveDaysFlexibleConstraint.MaxConsecutiveDaysFlexibleConstraintContext extends FlexibleConstraint.FlexibleConstraintContext
iLastPreference| Constructor and Description |
|---|
MaxConsecutiveDaysFlexibleConstraintContext(Assignment<Lecture,Placement> assignment) |
| Modifier and Type | Method and Description |
|---|---|
void |
assigned(Assignment<Lecture,Placement> assignment,
Placement value)
Called when
ConstraintWithContext.assigned(Assignment, long, Value) is called to update
the content of the context. |
Set<Lecture> |
candidates(Placement value,
Set<Placement> conflicts) |
protected Set<Lecture>[] |
getDayAssignments(BitSet week) |
int |
nrDays(BitSet week,
Placement value,
Set<Placement> conflicts) |
int |
nrDays(Placement value,
Set<Placement> conflicts) |
int |
nrViolations(BitSet week,
HashMap<Lecture,Placement> assignments,
Set<Placement> conflicts) |
int |
nrViolations(HashMap<Lecture,Placement> assignments,
Set<Placement> conflicts) |
protected boolean |
overlaps(BitSet week,
int dayOfWeek,
Placement value) |
void |
unassigned(Assignment<Lecture,Placement> assignment,
Placement value)
Called when
ConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context. |
getPreference, updateCriterionpublic MaxConsecutiveDaysFlexibleConstraintContext(Assignment<Lecture,Placement> assignment)
protected Set<Lecture>[] getDayAssignments(BitSet week)
public void assigned(Assignment<Lecture,Placement> assignment, Placement value)
AssignmentConstraintContextConstraintWithContext.assigned(Assignment, long, Value) is called to update
the content of the context.assigned in interface AssignmentConstraintContext<Lecture,Placement>assigned in class FlexibleConstraint.FlexibleConstraintContextassignment - current assignment (with which this context is associated)value - assigned valuepublic void unassigned(Assignment<Lecture,Placement> assignment, Placement value)
AssignmentConstraintContextConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context.unassigned in interface AssignmentConstraintContext<Lecture,Placement>unassigned in class FlexibleConstraint.FlexibleConstraintContextassignment - current assignment (with which this context is associated)value - unassigned valuepublic int nrViolations(BitSet week, HashMap<Lecture,Placement> assignments, Set<Placement> conflicts)