org.cpsolver.ifs.model

## Interface ModelListener<V extends Variable<V,T>,T extends Value<V,T>>

- Type Parameters:
    `V` - Variable
    `T` - Value
  All Known Subinterfaces:
    Criterion<V,T>
  All Known Implementing Classes:
    AbstractCriterion, AssignedValue, AssignmentCount, AttributePreferences, BackToBack, BackToBackInstructorPreferences, BrokenTimePatterns, ConflictStatistics, CoursePreferences, DbtPropagation, DeltaTimePreference, DepartmentBalancingPenalty, DifferentLecture, DistanceConflict, DistanceToStronglyPreferredRoom, DistributionPenalty, DistributionPreferences, Distributions, DistributionViolation, ExamCriterion, ExamRotationPenalty, ExamSplitter, ExtendedStudentConflicts, Extension, ExtensionWithContext, FlexibleConstraintCriterion, HardConflicts, IgnoredCommittedStudentConflict, IgnoredStudentConflict, ImportantStudentConflict, ImportantStudentHardConflict, InstructorBackToBackConflicts, InstructorConflict, InstructorDirectConflicts, InstructorDistanceBackToBackConflicts, InstructorFairness, InstructorLunchBreak, InstructorMoreThan2ADayConflicts, InstructorNotAvailableConflicts, InstructorPreferences, InstructorSchedulingCriterion, InstructorStudentConflict, InstructorStudentHardConflict, LargeExamsPenalty, MacPropagation, MacRevised, OnFlySectioning, OriginalInstructor, PeriodIndexPenalty, PeriodPenalty, PeriodSizePenalty, PeriodViolation, PerturbationPenalty, Perturbations, PlacementSelectionCriterion, PotentialHardConflicts, QuadraticStudentConflict, QuadraticStudentHardConflict, RoomPenalty, RoomPerturbationPenalty, RoomPreferences, RoomSizePenalty, RoomSizePenalty, RoomSplitDistancePenalty, RoomSplitPenalty, RoomViolation, RoomViolations, SameCommon, SameCourse, SameDays, SameInstructor, SameLink, SameRoom, SameSubpartBalancingPenalty, SearchIntensification, StudentBackToBackConflicts, StudentCommittedConflict, StudentConflict, StudentConflictStatistics, StudentDirectConflicts, StudentDistanceBackToBackConflicts, StudentDistanceConflict, StudentHardConflict, StudentLuchBreak, StudentMinimizeDaysOfWeek, StudentMinimizeScheduleHoles, StudentMoreThan1ADayConflicts, StudentMoreThan2ADayConflicts, StudentNotAvailableConflicts, StudentOnlineConflict, StudentOverlapConflict, StudentOverLunchConflict, StudentQuality, StudentWorkdayConflict, TeachingPreferences, TimeOverlaps, TimeOverlapsCounter, TimePreferences, TimePreferences, TimetablingCriterion, TimeViolations, TooBigRooms, UnusedInstructorLoad, UselessHalfHours, ViolatedInitials, WeightedHardConflicts

      public interface ModelListener<V extends Variable<V,T>,T extends Value<V,T>>

  IFS model listener.
  Version:
    IFS 1.3 (Iterative Forward Search)
    Copyright (C) 2006 - 2014 Tomáš Müller
    muller@unitime.org
    http://muller.unitime.org
    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
  Author:
    Tomáš Müller
  See Also:
    `Model`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterAssigned(Assignment<V,T> assignment, long iteration, T value)` Called after a value is assigned to its variable ( `Value.variable()`).
    `void` | `afterUnassigned(Assignment<V,T> assignment, long iteration, T value)` Called after a value is unassigned from its variable ( `Value.variable()`).
    `void` | `beforeAssigned(Assignment<V,T> assignment, long iteration, T value)` Called before a value is assigned to its variable ( `Value.variable()`).
    `void` | `beforeUnassigned(Assignment<V,T> assignment, long iteration, T value)` Called before a value is unassigned from its variable ( `Value.variable()`).
    `void` | `constraintAdded(Constraint<V,T> constraint)` Constraint is added to the model
    `void` | `constraintRemoved(Constraint<V,T> constraint)` Constraint is removed from the model
    `boolean` | `init(Solver<V,T> solver)` Notification that the model was initialized by the solver.
    `void` | `variableAdded(V variable)` Variable is added to the model
    `void` | `variableRemoved(V variable)` Variable is removed from the model

- - ### Method Detail

    - #### variableAdded

          void variableAdded(V variable)

      Variable is added to the model
      Parameters:
        `variable` - added variable

    - #### variableRemoved

          void variableRemoved(V variable)

      Variable is removed from the model
      Parameters:
        `variable` - removed variable

    - #### constraintAdded

          void constraintAdded(Constraint<V,T> constraint)

      Constraint is added to the model
      Parameters:
        `constraint` - added constraint

    - #### constraintRemoved

          void constraintRemoved(Constraint<V,T> constraint)

      Constraint is removed from the model
      Parameters:
        `constraint` - removed constraint

    - #### beforeAssigned

          void beforeAssigned(Assignment<V,T> assignment,
                              long iteration,
                              T value)

      Called before a value is assigned to its variable ( `Value.variable()`).
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be assigned

    - #### beforeUnassigned

          void beforeUnassigned(Assignment<V,T> assignment,
                                long iteration,
                                T value)

      Called before a value is unassigned from its variable ( `Value.variable()`).
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be unassigned

    - #### afterAssigned

          void afterAssigned(Assignment<V,T> assignment,
                             long iteration,
                             T value)

      Called after a value is assigned to its variable ( `Value.variable()`).
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be assigned

    - #### afterUnassigned

          void afterUnassigned(Assignment<V,T> assignment,
                               long iteration,
                               T value)

      Called after a value is unassigned from its variable ( `Value.variable()`).
      Parameters:
        `assignment` - current assignment
        `iteration` - current iteration
        `value` - value to be unassigned

    - #### init

          boolean init(Solver<V,T> solver)

      Notification that the model was initialized by the solver.
      Parameters:
        `solver` - IFS solver
      Returns:
        true if successfully initialized