public class TeachingRequest.Variable extends Variable<TeachingRequest.Variable,TeachingAssignment>
Constructor and Description |
---|
Variable(int index)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Course |
getCourse()
Course of the request that was provided in the constructor
|
int |
getInstructorIndex()
Instructor index that was provided in the constructor
|
String |
getName()
Variable's name -- for printing purposes
|
TeachingRequest |
getRequest()
Teaching request for this variable
|
List<Section> |
getSections()
Sections of the request that was provided in the constructor
|
int |
hashCode() |
List<TeachingAssignment> |
values(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)
Variable's domain
|
void |
variableAssigned(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment,
long iteration,
TeachingAssignment ta)
A value was assigned to this variable
|
void |
variableUnassigned(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment,
long iteration,
TeachingAssignment ta)
A value was unassigned from this variable
|
addContstraint, addVariableListener, assign, compareTo, constraints, constraintVariables, getAssignment, getAssignment, getAssignments, getBestAssignment, getBestAssignmentIteration, getDescription, getExtra, getId, getIndex, getInitialAssignment, getLastIteration, getModel, getVariableListeners, hardConstraints, hasAssignment, hasAssignment, hasInitialAssignment, hasValues, removeContstraint, removeInitialValue, removeValue, removeVariableListener, setAssignment, setBestAssignment, setExtra, setIndex, setInitialAssignment, setLastIteration, setModel, setValues, softConstraints, toString, unassign, values
public Variable(int index)
index
- instructor index (if a class can be taught by multiple instructors, the index identifies the particular request)public int getInstructorIndex()
public TeachingRequest getRequest()
public Course getCourse()
public List<Section> getSections()
public List<TeachingAssignment> values(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment)
Variable
values
in class Variable<TeachingRequest.Variable,TeachingAssignment>
assignment
- current assignment (if the domain is dependent on the current assignment)public void variableAssigned(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment, long iteration, TeachingAssignment ta)
Variable
variableAssigned
in class Variable<TeachingRequest.Variable,TeachingAssignment>
assignment
- current assignmentiteration
- current iterationta
- assigned valuepublic void variableUnassigned(Assignment<TeachingRequest.Variable,TeachingAssignment> assignment, long iteration, TeachingAssignment ta)
Variable
variableUnassigned
in class Variable<TeachingRequest.Variable,TeachingAssignment>
assignment
- current assignmentiteration
- current iterationta
- unassigned valuepublic int hashCode()
hashCode
in class Variable<TeachingRequest.Variable,TeachingAssignment>
public boolean equals(Object o)
equals
in class Variable<TeachingRequest.Variable,TeachingAssignment>
public String getName()
Variable
getName
in class Variable<TeachingRequest.Variable,TeachingAssignment>