public class InstructorLunchBreak extends AbstractCriterion<Lecture,Placement>
| Modifier and Type | Class and Description |
|---|---|
static class |
InstructorLunchBreak.CompactInfo
The class is used as a container of information concerning lunch break
of instructors.
|
AbstractCriterion.ValueUpdateTypeiBest, iDebug, iValue, iValueUpdateType, iWeight, sDoubleFormat, sPercentFormat| Constructor and Description |
|---|
InstructorLunchBreak() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterAssigned(long iteration,
Placement value)
Update criterion after an assignment.
|
void |
afterUnassigned(long iteration,
Placement value)
Update criterion after an unassignment
|
protected InstructorLunchBreak.CompactInfo |
getCompactInfo(InstructorConstraint constraint)
Get compact info that is associated with an instructor constraint.
|
void |
getInfo(Map<String,String> info)
Adds some information into the table with information about the solution
|
void |
getInfo(Map<String,String> info,
Collection<Lecture> variables)
Adds some information into the table with information about the solution,
only consider variables from the given set
|
double |
getValue(Collection<Lecture> variables)
Value of a part of the problem (given by the collection of variables)
|
double |
getValue(Placement value,
Set<Placement> conflicts)
Value of a proposed assignment (including hard conflicts)
|
protected List<BitSet> |
getWeeks()
The method creates date patterns (bitsets) which represent the weeks of a
semester.
|
double |
getWeightedValue(Placement value,
Set<Placement> conflicts)
Weighted value of a proposed assignment (including hard conflicts)
|
boolean |
init(Solver<Lecture,Placement> solver)
Notification that the model was initialized by the solver.
|
void |
updateCriterion(InstructorConstraint instructorConstraint,
Placement placement)
Method checks or sets the CompactInfo of an InstructorConstraint.
|
void |
updateLunchPenalty(InstructorConstraint constraint,
Placement p)
Method updates number of violations in days (Mo, Tue, Wed,..) considering
each week in the semester separately.
|
beforeAssigned, beforeUnassigned, bestRestored, bestSaved, clearCache, computeBounds, constraintAdded, constraintRemoved, getBest, getBounds, getBounds, getModel, getName, getPerc, getPercRev, getValue, getWeight, getWeightDefault, getWeightedBest, getWeightedValue, getWeightedValue, getWeightName, inc, variableAdded, variableRemovedpublic InstructorLunchBreak()
public boolean init(Solver<Lecture,Placement> solver)
ModelListenerinit in interface ModelListener<Lecture,Placement>init in class AbstractCriterion<Lecture,Placement>solver - IFS solverprotected InstructorLunchBreak.CompactInfo getCompactInfo(InstructorConstraint constraint)
public void afterAssigned(long iteration, Placement value)
afterAssigned in interface ModelListener<Lecture,Placement>afterAssigned in class AbstractCriterion<Lecture,Placement>iteration - current iterationvalue - value to be assignedpublic void afterUnassigned(long iteration, Placement value)
afterUnassigned in interface ModelListener<Lecture,Placement>afterUnassigned in class AbstractCriterion<Lecture,Placement>iteration - current iterationvalue - value to be unassignedprotected List<BitSet> getWeeks()
public void updateLunchPenalty(InstructorConstraint constraint, Placement p)
constraint - the Instructor constraint of an instructor checked for a lunch
breakp - placement of a lecture currently (un)assignedpublic void updateCriterion(InstructorConstraint instructorConstraint, Placement placement)
instructorConstraint - the Instructor constraint of an instructor checked for
criteriaplacement - placement of a lecture currently (un)assignedpublic double getValue(Placement value, Set<Placement> conflicts)
Criterionpublic double getWeightedValue(Placement value, Set<Placement> conflicts)
CriteriongetWeightedValue in interface Criterion<Lecture,Placement>getWeightedValue in class AbstractCriterion<Lecture,Placement>public double getValue(Collection<Lecture> variables)
Criterionpublic void getInfo(Map<String,String> info)
InfoProvidergetInfo in interface InfoProvider<Lecture>getInfo in class AbstractCriterion<Lecture,Placement>public void getInfo(Map<String,String> info, Collection<Lecture> variables)
InfoProvidergetInfo in interface InfoProvider<Lecture>getInfo in class AbstractCriterion<Lecture,Placement>