public class StudentMinimizeScheduleHoles extends StudentConflict
StudentConflict and it penalizes all cases where a student has
two classes taught on the same day that are not back-to-back. The penalisation
is based on the time distance between the two classes, computed in hours.
These penalties are weighted by Comparator.MinimizeStudentScheduleHolesWeight,
which defaults to 1/20 of the Comparator.StudentConflictWeight.
AbstractCriterion.ValueContext, AbstractCriterion.ValueUpdateTypeiIncludeConflictsiBest, iDebug, iWeight, sDoubleFormat, sPercentFormatsMaxSize| Constructor and Description |
|---|
StudentMinimizeScheduleHoles() |
| Modifier and Type | Method and Description |
|---|---|
static double |
btbDistance(Placement p1,
Placement p2)
Time distance between two placements in hours.
|
void |
getInfo(Assignment<Lecture,Placement> assignment,
Map<String,String> info)
Adds some information into the table with information about the solution
|
void |
getInfo(Assignment<Lecture,Placement> assignment,
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
|
String |
getPlacementSelectionWeightName() |
double |
getWeightDefault(DataProperties config)
Defines default weight (when
AbstractCriterion.getWeightName() parameter is not present in the criterion). |
void |
incJenrl(Assignment<Lecture,Placement> assignment,
JenrlConstraint jenrl,
double studentWeight,
Double conflictPriority,
Student student) |
boolean |
inConflict(Placement p1,
Placement p2) |
boolean |
isApplicable(Lecture l1,
Lecture l2) |
protected double |
jointEnrollment(JenrlConstraint jenrl) |
protected double |
jointEnrollment(JenrlConstraint jenrl,
Placement p1,
Placement p2) |
applicable, bestRestored, committed, configure, distance, getBounds, getBounds, getMetrics, getValue, getValue, hard, ignore, isApplicable, overlaps, slots, uncommitted, workdaygetPlacementSelectionAdjustmentsName, getPlacementSelectionWeight, getPlacementSelectionWeightDefaultafterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, bestSaved, clearCache, computeBounds, constraintAdded, constraintRemoved, createAssignmentContext, getAbbreviation, getAssignmentContextReference, getBest, getBounds, getBounds, getContext, getContext, getExtendedInfo, getModel, getName, getPerc, getPercentage, getPercRev, getValue, getValue, getValue, getValueUpdateType, getWeight, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightName, inc, inc, init, setAssignmentContextReference, setModel, setValueUpdateType, toString, variableAdded, variableRemovedpublic StudentMinimizeScheduleHoles()
public static double btbDistance(Placement p1, Placement p2)
p1 - first placementp2 - second placementpublic boolean inConflict(Placement p1, Placement p2)
inConflict in class StudentConflictprotected double jointEnrollment(JenrlConstraint jenrl, Placement p1, Placement p2)
jointEnrollment in class StudentConflictprotected double jointEnrollment(JenrlConstraint jenrl)
jointEnrollment in class StudentConflictpublic boolean isApplicable(Lecture l1, Lecture l2)
isApplicable in class StudentConflictpublic void incJenrl(Assignment<Lecture,Placement> assignment, JenrlConstraint jenrl, double studentWeight, Double conflictPriority, Student student)
incJenrl in class StudentConflictpublic double getWeightDefault(DataProperties config)
AbstractCriterionAbstractCriterion.getWeightName() parameter is not present in the criterion).getWeightDefault in class AbstractCriterion<Lecture,Placement>config - solver configurationpublic String getPlacementSelectionWeightName()
getPlacementSelectionWeightName in class StudentConflictpublic void getInfo(Assignment<Lecture,Placement> assignment, Map<String,String> info)
InfoProvidergetInfo in interface InfoProvider<Lecture,Placement>getInfo in class AbstractCriterion<Lecture,Placement>assignment - current assignmentinfo - info tablepublic void getInfo(Assignment<Lecture,Placement> assignment, Map<String,String> info, Collection<Lecture> variables)
InfoProvidergetInfo in interface InfoProvider<Lecture,Placement>getInfo in class AbstractCriterion<Lecture,Placement>assignment - current assignmentinfo - info tablevariables - sub-problem