public class RoomSplitDistancePenalty extends ExamCriterion
Modifier and Type | Class and Description |
---|---|
protected class |
RoomSplitDistancePenalty.RoomSplitContext |
AbstractCriterion.ValueContext, AbstractCriterion.ValueUpdateType
iBest, iDebug, iWeight, sDoubleFormat, sPercentFormat
sMaxSize
Constructor and Description |
---|
RoomSplitDistancePenalty() |
Modifier and Type | Method and Description |
---|---|
AbstractCriterion.ValueContext |
createAssignmentContext(Assignment<Exam,ExamPlacement> assignment)
Create a new assignment context for the given assignment.
|
void |
getInfo(Assignment<Exam,ExamPlacement> assignment,
Map<String,String> info)
Adds some information into the table with information about the solution
|
double |
getValue(Assignment<Exam,ExamPlacement> assignment,
ExamPlacement value,
Set<ExamPlacement> conflicts)
Value of a proposed assignment (including hard conflicts)
|
double |
getWeightDefault(DataProperties config)
Defines default weight (when
AbstractCriterion.getWeightName() parameter is not present in the criterion). |
String |
getWeightName()
Defines weight name (to be used to get the criterion weight from the configuration).
|
String |
getXmlWeightName()
Name of the weight parameter in the parameters section of the examination XML file.
|
boolean |
isPeriodCriterion()
True if this criterion is based on period assignment.
|
int |
nrRoomSplits(Assignment<Exam,ExamPlacement> assignment) |
String |
toString(Assignment<Exam,ExamPlacement> assignment)
Simple text representation of the criterion and its value.
|
getBounds, getPeriodValue, getRoomValue, getXmlParameters, isRoomCriterion, setWeight, setXmlParameters
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, bestRestored, bestSaved, clearCache, computeBounds, configure, constraintAdded, constraintRemoved, getAbbreviation, getAssignmentContextReference, getBest, getBounds, getBounds, getBounds, getContext, getContext, getExtendedInfo, getInfo, getModel, getName, getPerc, getPercentage, getPercRev, getValue, getValue, getValue, getValue, getValueUpdateType, getWeight, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, getWeightedValue, inc, inc, init, setAssignmentContextReference, setModel, setValueUpdateType, variableAdded, variableRemoved
public RoomSplitDistancePenalty()
public AbstractCriterion.ValueContext createAssignmentContext(Assignment<Exam,ExamPlacement> assignment)
HasAssignmentContext
createAssignmentContext
in interface HasAssignmentContext<Exam,ExamPlacement,AbstractCriterion.ValueContext>
createAssignmentContext
in class AbstractCriterion<Exam,ExamPlacement>
assignment
- an assignment for which there needs to be an assignment contextpublic String getWeightName()
AbstractCriterion
getWeightName
in class ExamCriterion
public String getXmlWeightName()
ExamCriterion
getXmlWeightName
in class ExamCriterion
public double getWeightDefault(DataProperties config)
AbstractCriterion
AbstractCriterion.getWeightName()
parameter is not present in the criterion).getWeightDefault
in class AbstractCriterion<Exam,ExamPlacement>
config
- solver configurationpublic double getValue(Assignment<Exam,ExamPlacement> assignment, ExamPlacement value, Set<ExamPlacement> conflicts)
Criterion
assignment
- current assignmentvalue
- given valueconflicts
- values conflicting with the given valuepublic void getInfo(Assignment<Exam,ExamPlacement> assignment, Map<String,String> info)
InfoProvider
getInfo
in interface InfoProvider<Exam,ExamPlacement>
getInfo
in class ExamCriterion
assignment
- current assignmentinfo
- info tablepublic String toString(Assignment<Exam,ExamPlacement> assignment)
AbstractCriterion
AbstractCriterion.getAbbreviation()
and x is the current value AbstractCriterion.getValue(Assignment)
.toString
in interface Criterion<Exam,ExamPlacement>
toString
in class AbstractCriterion<Exam,ExamPlacement>
assignment
- current assignmentpublic int nrRoomSplits(Assignment<Exam,ExamPlacement> assignment)
public boolean isPeriodCriterion()
ExamCriterion
ExamPlacement.getTimeCost(Assignment)
.isPeriodCriterion
in class ExamCriterion