net.sf.cpsolver.ifs.model
Interface ModelListener

All Known Implementing Classes:
ConflictStatistics, DbtPropagation, DistanceConflict, Extension, MacPropagation, MacRevised, OnFlySectioning, SearchIntensification, StudentConflictStatistics, ViolatedInitials

public interface ModelListener

IFS model listener.

Version:
IFS 1.1 (Iterative Forward Search)
Copyright (C) 2006 Tomáš Müller
muller@unitime.org
Lazenska 391, 76314 Zlin, Czech Republic

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 2.1 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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
See Also:
Model

Method Summary
 void afterAssigned(long iteration, Value value)
          Called after a value is assigned to its variable (Value.variable()).
 void afterUnassigned(long iteration, Value value)
          Called after a value is unassigned from its variable (Value.variable()).
 void beforeAssigned(long iteration, Value value)
          Called before a value is assigned to its variable (Value.variable()).
 void beforeUnassigned(long iteration, Value value)
          Called before a value is unassigned from its variable (Value.variable()).
 void constraintAdded(Constraint constraint)
          Constraint is added to the model
 void constraintRemoved(Constraint constraint)
          Constraint is removed from the model
 boolean init(Solver solver)
          Notification that the model was initialized by the solver.
 void variableAdded(Variable variable)
          Variable is added to the model
 void variableRemoved(Variable variable)
          Variable is removed from the model
 

Method Detail

variableAdded

void variableAdded(Variable variable)
Variable is added to the model

Parameters:
variable - added variable

variableRemoved

void variableRemoved(Variable variable)
Variable is removed from the model

Parameters:
variable - removed variable

constraintAdded

void constraintAdded(Constraint constraint)
Constraint is added to the model

Parameters:
constraint - added constraint

constraintRemoved

void constraintRemoved(Constraint constraint)
Constraint is removed from the model

Parameters:
constraint - removed constraint

beforeAssigned

void beforeAssigned(long iteration,
                    Value value)
Called before a value is assigned to its variable (Value.variable()).

Parameters:
iteration - current iteration
value - value to be assigned

beforeUnassigned

void beforeUnassigned(long iteration,
                      Value value)
Called before a value is unassigned from its variable (Value.variable()).

Parameters:
iteration - current iteration
value - value to be unassigned

afterAssigned

void afterAssigned(long iteration,
                   Value value)
Called after a value is assigned to its variable (Value.variable()).

Parameters:
iteration - current iteration
value - value to be assigned

afterUnassigned

void afterUnassigned(long iteration,
                     Value value)
Called after a value is unassigned from its variable (Value.variable()).

Parameters:
iteration - current iteration
value - value to be unassigned

init

boolean init(Solver solver)
Notification that the model was initialized by the solver.

Parameters:
solver - IFS solver