org.cpsolver.coursett.constraint

## Class MinimizeNumberOfUsedRoomsConstraint.MinimizeNumberOfUsedRoomsConstraintContext

- java.lang.Object
- - org.cpsolver.coursett.constraint.MinimizeNumberOfUsedRoomsConstraint.MinimizeNumberOfUsedRoomsConstraintContext

- All Implemented Interfaces:
    AssignmentConstraintContext<Lecture,Placement>, AssignmentContext
  Enclosing class:
    MinimizeNumberOfUsedRoomsConstraint

      public class MinimizeNumberOfUsedRoomsConstraint.MinimizeNumberOfUsedRoomsConstraintContext
      extends Object
      implements AssignmentConstraintContext<Lecture,Placement>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MinimizeNumberOfUsedRoomsConstraintContext(Assignment<Lecture,Placement> assignment)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MinimizeNumberOfUsedRoomsConstraintContext

          public MinimizeNumberOfUsedRoomsConstraintContext(Assignment<Lecture,Placement> assignment)

  - ### Method Detail

    - #### assigned

          public void assigned(Assignment<Lecture,Placement> assignment,
                               Placement placement)

      Description copied from interface: `AssignmentConstraintContext`
      Called when `ConstraintWithContext.assigned(Assignment, long, Value)` is called to update the content of the context.
      Specified by:
        `assigned` in interface `AssignmentConstraintContext<Lecture,Placement>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - assigned value

    - #### unassigned

          public void unassigned(Assignment<Lecture,Placement> assignment,
                                 Placement placement)

      Description copied from interface: `AssignmentConstraintContext`
      Called when `ConstraintWithContext.unassigned(Assignment, long, Value)` is called to update the content of the context.
      Specified by:
        `unassigned` in interface `AssignmentConstraintContext<Lecture,Placement>`
      Parameters:
        `assignment` - current assignment (with which this context is associated)
        `placement` - unassigned value

    - #### isOverLimit

          public boolean isOverLimit(Assignment<Lecture,Placement> assignment,
                                     Placement placement)

    - #### getOverLimit

          public int getOverLimit(Assignment<Lecture,Placement> assignment,
                                  Placement placement)

    - #### weaken

          public void weaken(Assignment<Lecture,Placement> assignment,
                             Placement value)

    - #### weaken

          public void weaken()

    - #### getUsedRooms

          public Map<RoomLocation,Set<Lecture>> getUsedRooms()