|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectifs.model.Constraint
ttsolver.constraint.ResourceConstraint
ttsolver.constraint.InstructorConstraint
public class InstructorConstraint
Instructor constraint.
Classes with this instructor can not overlap in time. Also, for back-to-back classes,
there is the following reasoning:
sNoPreferenceLimit .. no preference
sNoPreferenceLimit and below sDiscouragedLimit .. constraint is discouraged (soft, preference = 1)
sDiscouragedLimit and below sProhibitedLimit .. constraint is strongly discouraged (soft, preference = 2)
sProhibitedLimit .. constraint is prohibited (hard)
| Field Summary | |
|---|---|
static double |
sDiscouragedLimit
Back-to-back classes: maximal distance for discouraged prefernce |
static double |
sNoPreferenceLimit
Back-to-back classes: maximal distance for no prefernce |
static double |
sProhibitedLimit
Back-to-back classes: maximal distance for strongly discouraged prefernce (everything above is prohibited) |
| Fields inherited from class ttsolver.constraint.ResourceConstraint |
|---|
iDays, iResource, iSlotsPerDay |
| Constructor Summary | |
|---|---|
InstructorConstraint(String id,
String name,
int slotsPerDay,
int days)
Constructor |
|
| Method Summary | |
|---|---|
void |
computeConflicts(Value value,
Set conflicts)
The only method which has to be implemented by any constraint. |
static int |
getDistancePreference(Placement p1,
Placement p2)
Back-to-back preference of two placements (3 means prohibited) |
int |
getPreference()
Overall back-to-back preference of this instructor |
int |
getPreference(Value value)
Back-to-back preference of the given placement |
int |
getWorstPreference()
Worst back-to-back preference of this instructor |
boolean |
inConflict(Value value)
Returns true if the given assignment is inconsistent with the existing assignments respecting this constraint. |
boolean |
isConsistent(Value value1,
Value value2)
Returns true if the given assignments are consistent respecting this constraint. |
| Methods inherited from class ttsolver.constraint.ResourceConstraint |
|---|
assigned, countUselessSlots, getDays, getName, getResource, getResourceId, getSlotsPerDay, printUsage, toString, unassigned |
| Methods inherited from class ifs.model.Constraint |
|---|
addConstraintListener, addVariable, assignedVariables, countAssignedVariables, countVariables, getDescription, getId, getInfo, getModel, hashCode, isHard, removeConstraintListener, removeVariable, setModel, variables |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static double sNoPreferenceLimit
public static double sDiscouragedLimit
public static double sProhibitedLimit
| Constructor Detail |
|---|
public InstructorConstraint(String id,
String name,
int slotsPerDay,
int days)
id - instructor idname - instructor nameslotsPerDay - number of slots per daydays - number of days| Method Detail |
|---|
public static int getDistancePreference(Placement p1,
Placement p2)
public void computeConflicts(Value value,
Set conflicts)
Constraint
computeConflicts in class ResourceConstraintvalue - value to be assigned to its varaibleconflicts - resultant set of conflicting valuespublic boolean inConflict(Value value)
ConstraintMacPropagation).
inConflict in class ResourceConstraint
public boolean isConsistent(Value value1,
Value value2)
ConstraintMacPropagation).
isConsistent in class ResourceConstraintpublic int getPreference(Value value)
public int getPreference()
public int getWorstPreference()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||