public class BreakFlexibleConstraint extends FlexibleConstraint
FlexibleConstraint.Block, FlexibleConstraint.FlexibleConstraintType, FlexibleConstraint.PlacementTimeComparatoriConstraintType, iReference, iWeeksiAssignedVariables, iConstraintListeners, iId| Constructor and Description |
|---|
BreakFlexibleConstraint(Long id,
String owner,
String preference,
String reference) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeConflicts(Placement value,
Set<Placement> conflicts)
The only method which has to be implemented by any constraint.
|
List<FlexibleConstraint.Block> |
getBreakBlocks(int dayCode,
Set<Placement> conflicts,
Placement value,
HashMap<Lecture,Placement> assignments,
BitSet week)
Creates a list of consecutive blocks with back-to-back classes.
|
double |
getNrViolations(Set<Placement> conflicts,
HashMap<Lecture,Placement> assignments) |
assigned, getCurrentPreference, getName, getOwner, getPrologPreference, getReference, getRelevantPlacements, getType, getWeeks, isConsistent, isHard, mergeToBlocks, toString, unassignedaddConstraintListener, addVariable, assignedVariables, compareTo, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, hashCode, inConflict, removeConstraintListener, removeVariable, setModel, variablespublic BreakFlexibleConstraint(Long id, String owner, String preference, String reference)
owner - identifier of distribution preference the constraint was created forpreference - time preference ("R" for required, "P" for prohibited, "-2",
"-1", "1", "2" for soft preference)reference - parameters of the constraint in String formpublic void computeConflicts(Placement value, Set<Placement> conflicts)
ConstraintcomputeConflicts in class FlexibleConstraintvalue - value to be assigned to its varaibleconflicts - resultant set of conflicting valuespublic List<FlexibleConstraint.Block> getBreakBlocks(int dayCode, Set<Placement> conflicts, Placement value, HashMap<Lecture,Placement> assignments, BitSet week)
public double getNrViolations(Set<Placement> conflicts, HashMap<Lecture,Placement> assignments)
getNrViolations in class FlexibleConstraintconflicts - conflicting placements to be unassignedassignments - assigned placements