|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cpsolver.ifs.model.Constraint<Lecture,Placement>
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,
Placement placement)
Given value is to be assigned to its varable. |
void |
computeConflicts(Placement placement,
Set<Placement> conflicts)
The only method which has to be implemented by any constraint. |
int |
estimateLimit()
|
String |
getName()
Constraint's name -- for printing purposes |
int |
getOverLimit(Placement placement)
|
boolean |
inConflict(Placement placeement)
Returns true if the given assignment is inconsistent with the existing assignments respecting this constraint. |
boolean |
isConsistent(Placement value1,
Placement value2)
Returns true if the given assignments are consistent respecting this constraint. |
boolean |
isEnabled()
|
boolean |
isOverLimit(Placement placement)
|
void |
setEnabled(boolean enabled)
|
String |
toString()
|
void |
unassigned(long iteration,
Placement placement)
Given value is unassigned from its variable. |
void |
weaken()
Weaken the constraint. |
void |
weaken(Placement value)
Weaken the constraint enough so that it can assign the given value. |
Methods inherited from class net.sf.cpsolver.ifs.model.Constraint |
---|
addConstraintListener, addVariable, assignedVariables, compareTo, 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(Placement placement)
public int getOverLimit(Placement placement)
public void computeConflicts(Placement placement, Set<Placement> conflicts)
Constraint
computeConflicts
in class Constraint<Lecture,Placement>
placement
- value to be assigned to its varaibleconflicts
- resultant set of conflicting valuespublic boolean inConflict(Placement placeement)
Constraint
MacPropagation
).
inConflict
in class Constraint<Lecture,Placement>
public boolean isConsistent(Placement value1, Placement value2)
Constraint
MacPropagation
).
isConsistent
in class Constraint<Lecture,Placement>
public void assigned(long iteration, Placement placement)
Constraint
assigned
in class Constraint<Lecture,Placement>
public void unassigned(long iteration, Placement placement)
Constraint
unassigned
in class Constraint<Lecture,Placement>
public void weaken()
WeakeningConstraint
weaken
in interface WeakeningConstraint<Lecture,Placement>
public String getName()
Constraint
getName
in class Constraint<Lecture,Placement>
public int estimateLimit()
public void setEnabled(boolean enabled)
public boolean isEnabled()
public String toString()
toString
in class Object
public void weaken(Placement value)
WeakeningConstraint
weaken
in interface WeakeningConstraint<Lecture,Placement>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |