public class FlexibleConstraint.FlexibleConstraintContext extends Object implements AssignmentConstraintContext<Lecture,Placement>
Modifier and Type | Field and Description |
---|---|
protected double |
iLastPreference |
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. |
double |
getPreference() |
void |
unassigned(Assignment<Lecture,Placement> assignment,
Placement value)
Called when
ConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context. |
protected void |
updateCriterion(Assignment<Lecture,Placement> assignment)
Update value of FlexibleConstraintCriterion and number of violated FlexibleConstraints
|
protected double iLastPreference
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>
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>
assignment
- current assignment (with which this context is associated)value
- unassigned valueprotected void updateCriterion(Assignment<Lecture,Placement> assignment)
public double getPreference()