|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.criteria.AbstractCriterion<Exam,ExamPlacement>
net.sf.cpsolver.exam.criteria.ExamCriterion
net.sf.cpsolver.exam.criteria.additional.DistributionViolation
public class DistributionViolation
Experimental criterion counting violations of hard distribution constraints.
To enable breaking of hard distribution constraints, set parameter Exam.SoftDistributions to
a weight that should be inferred by a hard distribution constraint being broken.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
AbstractCriterion.ValueUpdateType |
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
iBest, iDebug, iValue, iValueUpdateType, iWeight, sDoubleFormat, sPercentFormat |
Constructor Summary | |
---|---|
DistributionViolation()
|
Method Summary | |
---|---|
protected double[] |
computeBounds()
Compute bounds (bounds are being cached by default). |
double |
getPeriodValue(ExamPlacement value)
Return impact of this criterion on period assignment (if this criterion is based on period assignment). |
double |
getRoomValue(ExamPlacement value)
Return impact of this criterion on room assignment (if this criterion is based on room assignment). |
double |
getValue(ExamPlacement value,
Set<ExamPlacement> conflicts)
Value of a proposed assignment (including hard conflicts) |
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. |
boolean |
isRoomCriterion()
True if this criterion is based on room assignment. |
String |
toString()
|
Methods inherited from class net.sf.cpsolver.exam.criteria.ExamCriterion |
---|
getBounds, getInfo, getXmlParameters, setWeight, setXmlParameters |
Methods inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, bestRestored, bestSaved, clearCache, constraintAdded, constraintRemoved, getBest, getBounds, getInfo, getModel, getName, getPerc, getPercRev, getValue, getValue, getWeight, getWeightDefault, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, inc, init, variableAdded, variableRemoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DistributionViolation()
Method Detail |
---|
public String getWeightName()
AbstractCriterion
getWeightName
in class ExamCriterion
public String getXmlWeightName()
ExamCriterion
getXmlWeightName
in class ExamCriterion
public double getValue(ExamPlacement value, Set<ExamPlacement> conflicts)
Criterion
protected double[] computeBounds()
AbstractCriterion
computeBounds
in class AbstractCriterion<Exam,ExamPlacement>
public boolean isRoomCriterion()
ExamCriterion
ExamPlacement.getRoomCost()
.
isRoomCriterion
in class ExamCriterion
public double getRoomValue(ExamPlacement value)
ExamCriterion
ExamPlacement.getRoomCost()
.
getRoomValue
in class ExamCriterion
public boolean isPeriodCriterion()
ExamCriterion
ExamPlacement.getTimeCost()
.
isPeriodCriterion
in class ExamCriterion
public double getPeriodValue(ExamPlacement value)
ExamCriterion
ExamPlacement.getTimeCost()
.
getPeriodValue
in class ExamCriterion
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |