public class MaxHalfDaysFlexibleConstraint.MaxHalfDaysFlexibleConstraintContext extends FlexibleConstraint.FlexibleConstraintContext
iLastPreference
Constructor and Description |
---|
MaxHalfDaysFlexibleConstraintContext(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>[] |
getHalfDayAssignments(BitSet week) |
protected boolean |
hasDay(BitSet week,
int dayOfWeek,
Placement value) |
int |
nrHalfDays(BitSet week,
Placement value,
Set<Placement> conflicts) |
int |
nrHalfDays(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) |
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 MaxHalfDaysFlexibleConstraintContext(Assignment<Lecture,Placement> assignment)
protected Set<Lecture>[] getHalfDayAssignments(BitSet week)
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 valuepublic int nrHalfDays(BitSet week, Placement value, Set<Placement> conflicts)
public int nrHalfDays(Placement value, Set<Placement> conflicts)
public int nrViolations(BitSet week, HashMap<Lecture,Placement> assignments, Set<Placement> conflicts)