public class EnrollmentSelection extends Object implements ValueSelection<Request,Enrollment>
GeneralValueSelection
, however, it is not allowed to assign a
enrollment to a dummy student Student.isDummy()
that is conflicting
with an enrollment of a real student.Modifier and Type | Field and Description |
---|---|
protected List<Enrollment> |
iTabu |
protected int |
iTabuPos |
protected int |
iTabuSize |
Constructor and Description |
---|
EnrollmentSelection() |
EnrollmentSelection(DataProperties properties)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
init(Solver<Request,Enrollment> solver)
Initialization
|
boolean |
isAllowed(Assignment<Request,Enrollment> assignment,
Enrollment value)
true, if it is allowed to assign given value
|
boolean |
isAllowed(Assignment<Request,Enrollment> assignment,
Enrollment value,
Set<Enrollment> conflicts)
true, if it is allowed to assign given value
|
Enrollment |
selectValue(Solution<Request,Enrollment> solution,
Request selectedVariable)
Value selection
|
protected int iTabuSize
protected List<Enrollment> iTabu
protected int iTabuPos
public EnrollmentSelection()
public EnrollmentSelection(DataProperties properties)
properties
- input configurationpublic void init(Solver<Request,Enrollment> solver)
init
in interface ValueSelection<Request,Enrollment>
solver
- current solverpublic boolean isAllowed(Assignment<Request,Enrollment> assignment, Enrollment value)
assignment
- current assignmentvalue
- given valuepublic boolean isAllowed(Assignment<Request,Enrollment> assignment, Enrollment value, Set<Enrollment> conflicts)
assignment
- current assignmentvalue
- given valueconflicts
- conflicting assignmentspublic Enrollment selectValue(Solution<Request,Enrollment> solution, Request selectedVariable)
selectValue
in interface ValueSelection<Request,Enrollment>
solution
- current solutionselectedVariable
- selected variable