|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.criteria.AbstractCriterion<Lecture,Placement>
net.sf.cpsolver.coursett.criteria.TimetablingCriterion
net.sf.cpsolver.coursett.criteria.StudentConflict
public class StudentConflict
Student conflicts. This criterion counts student conflicts between classes. A conflict
occurs when two classes that are attended by the same student (or students) are overlapping
in time or place back-to-back in rooms that are too far a part. The combinations of classes
that share students are maintained by JenrlConstraint
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
AbstractCriterion.ValueUpdateType |
Field Summary | |
---|---|
protected boolean |
iIncludeConflicts
|
Fields inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
iBest, iDebug, iValue, iValueUpdateType, iWeight, sDoubleFormat, sPercentFormat |
Constructor Summary | |
---|---|
StudentConflict()
|
Method Summary | |
---|---|
static boolean |
applicable(Lecture l1,
Lecture l2)
|
static boolean |
applicable(Placement p1,
Placement p2)
|
void |
bestRestored()
Notification that the current solution has been restored from the best. |
static boolean |
committed(Lecture l1,
Lecture l2)
|
static boolean |
committed(Placement p1,
Placement p2)
|
static boolean |
distance(DistanceMetric m,
Placement p1,
Placement p2)
|
double[] |
getBounds()
Bounds (minimum and maximum) estimate for the value |
double[] |
getBounds(Collection<Lecture> variables)
Value bounds (minimum and maximum) of the criterion on a part of the problem |
DistanceMetric |
getMetrics()
|
String |
getPlacementSelectionWeightName()
|
double |
getValue()
Current value of the criterion (optimization objective) |
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) |
static boolean |
hard(Lecture l1,
Lecture l2)
|
static boolean |
hard(Placement p1,
Placement p2)
|
static boolean |
ignore(Lecture l1,
Lecture l2)
|
static boolean |
ignore(Placement p1,
Placement p2)
|
void |
incJenrl(JenrlConstraint jenrl,
double studentWeight,
Double conflictPriority,
Student student)
|
boolean |
inConflict(Placement p1,
Placement p2)
|
boolean |
init(Solver<Lecture,Placement> solver)
Notification that the model was initialized by the solver. |
boolean |
isApplicable(Lecture l1,
Lecture l2)
|
protected double |
jointEnrollment(JenrlConstraint jenrl)
|
static boolean |
overlaps(Placement p1,
Placement p2)
|
Methods inherited from class net.sf.cpsolver.coursett.criteria.TimetablingCriterion |
---|
getPlacementSelectionWeight, getPlacementSelectionWeightDefault |
Methods inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
---|
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, bestSaved, clearCache, computeBounds, constraintAdded, constraintRemoved, getBest, getInfo, getInfo, getModel, getName, getPerc, getPercRev, getWeight, getWeightDefault, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, getWeightName, inc, variableAdded, variableRemoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean iIncludeConflicts
Constructor Detail |
---|
public StudentConflict()
Method Detail |
---|
public boolean init(Solver<Lecture,Placement> solver)
ModelListener
init
in interface ModelListener<Lecture,Placement>
init
in class TimetablingCriterion
solver
- IFS solverpublic String getPlacementSelectionWeightName()
getPlacementSelectionWeightName
in class TimetablingCriterion
public double getValue()
Criterion
getValue
in interface Criterion<Lecture,Placement>
getValue
in class AbstractCriterion<Lecture,Placement>
public DistanceMetric getMetrics()
public static boolean overlaps(Placement p1, Placement p2)
protected double jointEnrollment(JenrlConstraint jenrl)
public static boolean distance(DistanceMetric m, Placement p1, Placement p2)
public static boolean ignore(Placement p1, Placement p2)
public static boolean ignore(Lecture l1, Lecture l2)
public static boolean committed(Placement p1, Placement p2)
public static boolean committed(Lecture l1, Lecture l2)
public static boolean applicable(Placement p1, Placement p2)
public static boolean applicable(Lecture l1, Lecture l2)
public static boolean hard(Placement p1, Placement p2)
public static boolean hard(Lecture l1, Lecture l2)
public boolean isApplicable(Lecture l1, Lecture l2)
public boolean inConflict(Placement p1, Placement p2)
public double getValue(Placement value, Set<Placement> conflicts)
Criterion
public double getValue(Collection<Lecture> variables)
Criterion
getValue
in interface Criterion<Lecture,Placement>
getValue
in class AbstractCriterion<Lecture,Placement>
public double[] getBounds()
Criterion
getBounds
in interface Criterion<Lecture,Placement>
getBounds
in class AbstractCriterion<Lecture,Placement>
public double[] getBounds(Collection<Lecture> variables)
Criterion
getBounds
in interface Criterion<Lecture,Placement>
getBounds
in class AbstractCriterion<Lecture,Placement>
public void incJenrl(JenrlConstraint jenrl, double studentWeight, Double conflictPriority, Student student)
public void bestRestored()
Criterion
bestRestored
in interface Criterion<Lecture,Placement>
bestRestored
in class AbstractCriterion<Lecture,Placement>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |