public class ExamSimpleNeighbour extends SimpleNeighbour<Exam,ExamPlacement>
SimpleNeighbour
. The only difference is that the value (
SimpleNeighbour.value(Assignment)
) is decreased by 1000 if the selected
variable has no current assignment. Constructor and Description |
---|
ExamSimpleNeighbour(Assignment<Exam,ExamPlacement> assignment,
ExamPlacement placement) |
Modifier and Type | Method and Description |
---|---|
void |
assign(Assignment<Exam,ExamPlacement> assignment,
long iteration)
Perform assignment
|
String |
toString() |
protected static String |
toString(double[] x) |
protected static String |
toString(double[] x,
double[] y) |
double |
value(Assignment<Exam,ExamPlacement> assignment)
Improvement in the solution value if this neighbour is accepted.
|
assignments, getValue, getVariable
public ExamSimpleNeighbour(Assignment<Exam,ExamPlacement> assignment, ExamPlacement placement)
public void assign(Assignment<Exam,ExamPlacement> assignment, long iteration)
SimpleNeighbour
assign
in interface Neighbour<Exam,ExamPlacement>
assign
in class SimpleNeighbour<Exam,ExamPlacement>
assignment
- current assignmentiteration
- current iterationpublic String toString()
toString
in class SimpleNeighbour<Exam,ExamPlacement>
public double value(Assignment<Exam,ExamPlacement> assignment)
SimpleNeighbour
value
in interface Neighbour<Exam,ExamPlacement>
value
in class SimpleNeighbour<Exam,ExamPlacement>
assignment
- current assignment