public class ExamTabuSearch extends Object implements NeighbourSelection<Exam,ExamPlacement>, ValueSelection<Exam,ExamPlacement>
NeighbourSelection
, the most improving (re)assignment of a
value to a variable is returned (all variables and all their values are
enumerated). If there are more than one of such assignments, one is selected
randomly. A returned assignment can cause unassignment of other existing
assignments. The search is stopped (
selectNeighbour(Solution)
returns null) after
TabuSearch.MaxIdle idle (not improving) iterations. ValueSelection
, the most improving (re)assignment of a
value to a given variable is returned (all values of the given variable are
enumerated). If there are more than one of such assignments, one is selected
randomly. A returned assignment can cause unassignment of other existing
assignments. ConflictStatistics
(CBS) can be used
instead of (or together with) tabu list, when CBS is used as a solver
extension.Constructor and Description |
---|
ExamTabuSearch(DataProperties properties)
TabuSearch.MaxIdle ... maximum number of idle iterations (default is
10000)
TabuSearch.MinSize ... minimum size of the tabu list
TabuSearch.MaxSize ... maximum size of the tabu list
Value.ValueWeight ... weight of a value (i.e.,
Value.toDouble() )
Value.ConflictWeight ... weight of a conflicting value (see
Model.conflictValues(Value) ), it is also weighted by the past
occurrences when conflict-based statistics is used
|
Modifier and Type | Method and Description |
---|---|
void |
init(Solver<Exam,ExamPlacement> solver)
Initialization
|
Neighbour<Exam,ExamPlacement> |
selectNeighbour(Solution<Exam,ExamPlacement> solution)
Neighbor selection
|
ExamPlacement |
selectValue(Solution<Exam,ExamPlacement> solution,
Exam exam)
Value selection
|
public ExamTabuSearch(DataProperties properties) throws Exception
Value.toDouble()
)
Model.conflictValues(Value)
), it is also weighted by the past
occurrences when conflict-based statistics is used
Exception
public void init(Solver<Exam,ExamPlacement> solver)
init
in interface NeighbourSelection<Exam,ExamPlacement>
init
in interface ValueSelection<Exam,ExamPlacement>
public Neighbour<Exam,ExamPlacement> selectNeighbour(Solution<Exam,ExamPlacement> solution)
selectNeighbour
in interface NeighbourSelection<Exam,ExamPlacement>
solution
- given solutionpublic ExamPlacement selectValue(Solution<Exam,ExamPlacement> solution, Exam exam)
selectValue
in interface ValueSelection<Exam,ExamPlacement>
solution
- current solutionexam
- selected variable