|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.exam.heuristics.ExamGreatDeluge
public class ExamGreatDeluge
Greate deluge. In each iteration, one of the following three neighbourhoods is selected first
ExamRandomMove
)
ExamTimeMove
)
ExamRoomMove
)
Constructor Summary | |
---|---|
ExamGreatDeluge(DataProperties properties)
Constructor. |
Method Summary | |
---|---|
boolean |
accept(LazyNeighbour<Exam,ExamPlacement> neighbour,
double value)
Accept lazy neighbour |
protected boolean |
accept(Solution<Exam,ExamPlacement> solution,
Neighbour<Exam,ExamPlacement> neighbour)
Accept neighbour |
void |
bestCleared(Solution<Exam,ExamPlacement> solution)
Called by the solution when method Solution.clearBest() is
called. |
void |
bestRestored(Solution<Exam,ExamPlacement> solution)
Called by the solution when method Solution.restoreBest() is
called. |
void |
bestSaved(Solution<Exam,ExamPlacement> solution)
Update last improving iteration count |
Neighbour<Exam,ExamPlacement> |
genMove(Solution<Exam,ExamPlacement> solution)
Generate neighbour -- select neighbourhood randomly, select neighbour |
void |
getInfo(Solution<Exam,ExamPlacement> solution,
Map<String,String> info)
Called by the solution when it is asked to produce info table, see Solution.getInfo() . |
void |
getInfo(Solution<Exam,ExamPlacement> solution,
Map<String,String> info,
Collection<Exam> variables)
Called by the solution when it is asked to produce info table, see Solution.getInfo() . |
protected void |
incIter(Solution<Exam,ExamPlacement> solution)
Increment iteration count, update bound |
protected void |
info(Solution<Exam,ExamPlacement> solution)
Print some information |
void |
init(Solver<Exam,ExamPlacement> solver)
Initialization |
Neighbour<Exam,ExamPlacement> |
selectNeighbour(Solution<Exam,ExamPlacement> solution)
A neighbour is generated randomly untill an acceptable one is found. |
void |
solutionUpdated(Solution<Exam,ExamPlacement> solution)
Called by the solution when it is updated, see Solution.update(double) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExamGreatDeluge(DataProperties properties)
properties
- problem propertiesMethod Detail |
---|
public void init(Solver<Exam,ExamPlacement> solver)
init
in interface NeighbourSelection<Exam,ExamPlacement>
protected void info(Solution<Exam,ExamPlacement> solution)
public Neighbour<Exam,ExamPlacement> genMove(Solution<Exam,ExamPlacement> solution)
protected boolean accept(Solution<Exam,ExamPlacement> solution, Neighbour<Exam,ExamPlacement> neighbour)
public boolean accept(LazyNeighbour<Exam,ExamPlacement> neighbour, double value)
accept
in interface LazyNeighbour.LazyNeighbourAcceptanceCriterion<Exam,ExamPlacement>
neighbour
- neighbour that was assignedvalue
- change in overall solution value
protected void incIter(Solution<Exam,ExamPlacement> solution)
public Neighbour<Exam,ExamPlacement> selectNeighbour(Solution<Exam,ExamPlacement> solution)
selectNeighbour
in interface NeighbourSelection<Exam,ExamPlacement>
solution
- given solution
public void bestSaved(Solution<Exam,ExamPlacement> solution)
bestSaved
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solutionpublic void solutionUpdated(Solution<Exam,ExamPlacement> solution)
SolutionListener
Solution.update(double)
.
solutionUpdated
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solutionpublic void getInfo(Solution<Exam,ExamPlacement> solution, Map<String,String> info)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.
getInfo
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solutioninfo
- produced info tablepublic void getInfo(Solution<Exam,ExamPlacement> solution, Map<String,String> info, Collection<Exam> variables)
SolutionListener
Solution.getInfo()
. A listener can also add some its info into
this table.
getInfo
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solutioninfo
- produced info tablevariables
- only variables from this set are includedpublic void bestCleared(Solution<Exam,ExamPlacement> solution)
SolutionListener
Solution.clearBest()
is
called.
bestCleared
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solutionpublic void bestRestored(Solution<Exam,ExamPlacement> solution)
SolutionListener
Solution.restoreBest()
is
called.
bestRestored
in interface SolutionListener<Exam,ExamPlacement>
solution
- source solution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |