public class MinimizeNumberOfUsedRoomsConstraint.MinimizeNumberOfUsedRoomsConstraintContext extends Object implements AssignmentConstraintContext<Lecture,Placement>
Constructor and Description |
---|
MinimizeNumberOfUsedRoomsConstraintContext(Assignment<Lecture,Placement> assignment) |
Modifier and Type | Method and Description |
---|---|
void |
assigned(Assignment<Lecture,Placement> assignment,
Placement placement)
Called when
ConstraintWithContext.assigned(Assignment, long, Value) is called to update
the content of the context. |
int |
getOverLimit(Assignment<Lecture,Placement> assignment,
Placement placement) |
Map<RoomLocation,Set<Lecture>> |
getUsedRooms() |
boolean |
isOverLimit(Assignment<Lecture,Placement> assignment,
Placement placement) |
void |
unassigned(Assignment<Lecture,Placement> assignment,
Placement placement)
Called when
ConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context. |
void |
weaken() |
void |
weaken(Assignment<Lecture,Placement> assignment,
Placement value) |
public MinimizeNumberOfUsedRoomsConstraintContext(Assignment<Lecture,Placement> assignment)
public void assigned(Assignment<Lecture,Placement> assignment, Placement placement)
AssignmentConstraintContext
ConstraintWithContext.assigned(Assignment, long, Value)
is called to update
the content of the context.assigned
in interface AssignmentConstraintContext<Lecture,Placement>
assignment
- current assignment (with which this context is associated)placement
- assigned valuepublic void unassigned(Assignment<Lecture,Placement> assignment, Placement placement)
AssignmentConstraintContext
ConstraintWithContext.unassigned(Assignment, long, Value)
is called to update
the content of the context.unassigned
in interface AssignmentConstraintContext<Lecture,Placement>
assignment
- current assignment (with which this context is associated)placement
- unassigned valuepublic boolean isOverLimit(Assignment<Lecture,Placement> assignment, Placement placement)
public int getOverLimit(Assignment<Lecture,Placement> assignment, Placement placement)
public void weaken(Assignment<Lecture,Placement> assignment, Placement value)
public void weaken()
public Map<RoomLocation,Set<Lecture>> getUsedRooms()