public class RandomizedBacktrackNeighbourSelection extends BacktrackNeighbourSelection<Request,Enrollment>
RandomizedBacktrackNeighbourSelection
, however, only a randomly
selected subset of enrollments of each request is considered (
CourseRequest.computeRandomEnrollments(Assignment, int)
with the given limit is
used).
Parameter | Type | Comment |
---|---|---|
Neighbour.MaxValues | Integer |
Limit on the number of enrollments to be visited of each
CourseRequest . |
BacktrackNeighbourSelection.BackTrackNeighbour, BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext
iContext
iSolver, sLogger
Constructor and Description |
---|
RandomizedBacktrackNeighbourSelection(DataProperties properties)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUnassign(Enrollment enrollment,
Enrollment conflict,
Assignment<Request,Enrollment> assignment)
Check if the given conflicting enrollment can be unassigned
|
protected boolean |
checkBound(List<Request> variables2resolve,
int idx,
int depth,
Enrollment value,
Set<Enrollment> conflicts)
Check bound
|
protected Iterator<Enrollment> |
values(BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext context,
Request variable)
List of values of a variable.
|
backtrack, canContinue, canContinueEvaluation, getContext, getDepth, getMaxIters, getTimeout, init, selectNeighbour, selectNeighbour, selectNeighbour, setDepth, setMaxIters, setTimeout
getValueSelection, getVariableSelection, selectValue, selectVariable, setValueSelection, setVariableSelection
public RandomizedBacktrackNeighbourSelection(DataProperties properties) throws Exception
properties
- configurationException
- thrown when the initialization failsprotected Iterator<Enrollment> values(BacktrackNeighbourSelection.BacktrackNeighbourSelectionContext context, Request variable)
CourseRequest.computeRandomEnrollments(Assignment, int)
with the provided
limit is used for a CourseRequest
.values
in class BacktrackNeighbourSelection<Request,Enrollment>
context
- assignment contextvariable
- given variablepublic boolean canUnassign(Enrollment enrollment, Enrollment conflict, Assignment<Request,Enrollment> assignment)
conflict
- given enrollmentprotected boolean checkBound(List<Request> variables2resolve, int idx, int depth, Enrollment value, Set<Enrollment> conflicts)
BacktrackNeighbourSelection
checkBound
in class BacktrackNeighbourSelection<Request,Enrollment>
variables2resolve
- unassigned variables that are in conflict with the current solutionidx
- position in variables2resolvedepth
- current depthvalue
- value to checkconflicts
- conflicting values