|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Constraint net.sf.cpsolver.coursett.constraint.MinimizeNumberOfUsedRoomsConstraint
public class MinimizeNumberOfUsedRoomsConstraint
Minimize number of used rooms within the set of classes.
This constraint implements the following distribution/group constraint:
MIN_ROOM_USE (Minimize Number Of Rooms Used)
Minimize number of rooms used by the given set of classes.
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.model.Constraint |
---|
iAssignedVariables, iConstraintListeners, iId |
Constructor Summary | |
---|---|
MinimizeNumberOfUsedRoomsConstraint(DataProperties config)
|
Method Summary | |
---|---|
void |
assigned(long iteration,
Value value)
Given value is to be assigned to its varable. |
void |
computeConflicts(Value value,
Set conflicts)
The only method which has to be implemented by any constraint. |
int |
estimateLimit()
|
String |
getName()
Constraint's name -- for printing purposes |
int |
getOverLimit(Value value)
|
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. |
boolean |
isEnabled()
|
boolean |
isOverLimit(Value value)
|
void |
setEnabled(boolean enabled)
|
String |
toString()
|
void |
unassigned(long iteration,
Value value)
Given value is unassigned from its varable. |
void |
weaken()
Weaken the constraint. |
Methods inherited from class net.sf.cpsolver.ifs.model.Constraint |
---|
addConstraintListener, addVariable, assignedVariables, constraintListeners, countAssignedVariables, countVariables, equals, getDescription, getId, getModel, hashCode, isHard, removeConstraintListener, removeVariable, setModel, variables |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MinimizeNumberOfUsedRoomsConstraint(DataProperties config)
Method Detail |
---|
public boolean isOverLimit(Value value)
public int getOverLimit(Value value)
public void computeConflicts(Value value, Set conflicts)
Constraint
computeConflicts
in class Constraint
value
- value to be assigned to its varaibleconflicts
- resultant set of conflicting valuespublic boolean inConflict(Value value)
Constraint
MacPropagation
).
inConflict
in class Constraint
public boolean isConsistent(Value value1, Value value2)
Constraint
MacPropagation
).
isConsistent
in class Constraint
public void assigned(long iteration, Value value)
Constraint
assigned
in class Constraint
public void unassigned(long iteration, Value value)
Constraint
unassigned
in class Constraint
public void weaken()
WeakeningConstraint
weaken
in interface WeakeningConstraint
public String getName()
Constraint
getName
in class Constraint
public int estimateLimit()
public void setEnabled(boolean enabled)
public boolean isEnabled()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |