|
||||||||||
| 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.split.ExamSplitter
public class ExamSplitter
Experimental criterion that allows an exam to be split
into two if it decreases the number of student conflicts.
An examination split is improving (and is considered) if the weighted
number of student conflicts that will be removed by the split is bigger
than the weight of the splitter criterion AbstractCriterion.getWeight().
To enable examination splitting, following parameters needs to be set:
| 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 | |
|---|---|
ExamSplitter()
Examination splitter criterion. |
|
| Method Summary | |
|---|---|
void |
bestRestored()
Best solution was restored, change the splits back to what it was in the best solution |
void |
bestSaved()
Best solution was saved, remember the current splits |
boolean |
canMerge(Exam exam)
True, if the given exam can be merged (it has been split) |
boolean |
canSplit(Exam exam)
True, if an exam can be split |
List<Exam> |
children(Exam parent)
Children exams of an exam that has been split. |
double |
delta(ExamStudent student,
ExamPlacement oldPlacement,
ExamPlacement newPlacement)
Difference in the total weighted student conflicts (including StudentDirectConflicts,
StudentMoreThan2ADayConflicts, and StudentBackToBackConflicts) if a student
is moved from an exam with one placement into an exam with another placement. |
double[] |
getBounds(Collection<Exam> exams)
Not used |
void |
getInfo(Map<String,String> info)
Lists the split |
double |
getValue(ExamPlacement value,
Set<ExamPlacement> conflicts)
Not used |
double |
getWeightDefault(DataProperties config)
Returns half of a student direct conflict weight |
String |
getWeightName()
Returns Exams.ExamSplitWeight |
String |
getXmlWeightName()
Returns examSplitWeight |
boolean |
init(Solver<Exam,ExamPlacement> solver)
Initialization |
Exam |
merge(Exam child,
long iteration)
Merge an exam |
Exam |
parent(Exam exam)
Parent of an exam that has been split. |
void |
shuffle(Exam exam,
long iteration)
Shuffle students between the given exam and all the other exams in the split (if there are any). |
Exam |
split(Exam parent,
long iteration,
ExamPlacement placement)
Split an exam |
String |
toString()
|
| Methods inherited from class net.sf.cpsolver.exam.criteria.ExamCriterion |
|---|
getPeriodValue, getRoomValue, getXmlParameters, isPeriodCriterion, isRoomCriterion, setWeight, setXmlParameters |
| Methods inherited from class net.sf.cpsolver.ifs.criteria.AbstractCriterion |
|---|
afterAssigned, afterUnassigned, beforeAssigned, beforeUnassigned, clearCache, computeBounds, constraintAdded, constraintRemoved, getBest, getBounds, getInfo, getModel, getName, getPerc, getPercRev, getValue, getValue, getWeight, getWeightedBest, getWeightedValue, getWeightedValue, getWeightedValue, inc, variableAdded, variableRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExamSplitter()
| Method Detail |
|---|
public boolean init(Solver<Exam,ExamPlacement> solver)
init in interface ModelListener<Exam,ExamPlacement>init in class AbstractCriterion<Exam,ExamPlacement>solver - IFS solverpublic String getWeightName()
getWeightName in class ExamCriterionpublic String getXmlWeightName()
getXmlWeightName in class ExamCriterionpublic double getWeightDefault(DataProperties config)
getWeightDefault in class AbstractCriterion<Exam,ExamPlacement>public boolean canSplit(Exam exam)
public Exam parent(Exam exam)
exam - an exam in question
public List<Exam> children(Exam parent)
parent - an exam in question
public Exam split(Exam parent,
long iteration,
ExamPlacement placement)
parent - an exam to be splititeration - solver iterationplacement - placement of the new exam
public boolean canMerge(Exam exam)
public Exam merge(Exam child,
long iteration)
child - an exam to be mergediteration - solver iteration
public double delta(ExamStudent student,
ExamPlacement oldPlacement,
ExamPlacement newPlacement)
StudentDirectConflicts,
StudentMoreThan2ADayConflicts, and StudentBackToBackConflicts) if a student
is moved from an exam with one placement into an exam with another placement.
student - a student in questionoldPlacement - placement of the exam in which the student is nownewPlacement - placement of the exam into which the student would be moved
public void shuffle(Exam exam,
long iteration)
delta(ExamStudent, ExamPlacement, ExamPlacement) are
considered.
exam - an exam in questioniteration - solver iteration
public double getValue(ExamPlacement value,
Set<ExamPlacement> conflicts)
public double[] getBounds(Collection<Exam> exams)
getBounds in interface Criterion<Exam,ExamPlacement>getBounds in class ExamCriterionpublic String toString()
toString in class Objectpublic void getInfo(Map<String,String> info)
getInfo in interface InfoProvider<Exam>getInfo in class ExamCriterionpublic void bestSaved()
bestSaved in interface Criterion<Exam,ExamPlacement>bestSaved in class AbstractCriterion<Exam,ExamPlacement>public void bestRestored()
bestRestored in interface Criterion<Exam,ExamPlacement>bestRestored in class AbstractCriterion<Exam,ExamPlacement>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||