public class MaxWeeksFlexibleConstraint.MaxWeeksFlexibleConstraintContext extends FlexibleConstraint.FlexibleConstraintContext
iLastPreference
Constructor and Description |
---|
MaxWeeksFlexibleConstraintContext(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) |
int |
nrViolations(HashMap<Lecture,Placement> assignments,
Set<Placement> conflicts) |
int |
nrWeeks(Placement value,
Set<Placement> conflicts) |
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, updateCriterion
public MaxWeeksFlexibleConstraintContext(Assignment<Lecture,Placement> assignment)
public void assigned(Assignment<Lecture,Placement> assignment, Placement value)
AssignmentConstraintContext
ConstraintWithContext.assigned(Assignment, long, Value)
is called to update
the content of the context.assigned
in interface AssignmentConstraintContext<Lecture,Placement>
assigned
in class FlexibleConstraint.FlexibleConstraintContext
assignment
- current assignment (with which this context is associated)value
- assigned valuepublic void unassigned(Assignment<Lecture,Placement> assignment, Placement value)
AssignmentConstraintContext
ConstraintWithContext.unassigned(Assignment, long, Value)
is called to update
the content of the context.unassigned
in interface AssignmentConstraintContext<Lecture,Placement>
unassigned
in class FlexibleConstraint.FlexibleConstraintContext
assignment
- current assignment (with which this context is associated)value
- unassigned value