net.sf.cpsolver.ifs.multi
Class MultiModel

java.lang.Object
  extended by net.sf.cpsolver.ifs.model.Model
      extended by net.sf.cpsolver.ifs.multi.MultiModel

public class MultiModel
extends Model

Multi-variable model. Model containing MultiVariable variables. Such variables are excluded from the solver process, however, they can be included in constraints. Such model can allow us to build a solution on top of another solution (e.g., committed classes in the course timetabling). Constant variable has to implement interface ConstantVariable, returning ConstantVariable.isConstant() true.

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

Field Summary
 
Fields inherited from class net.sf.cpsolver.ifs.model.Model
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat
 
Constructor Summary
MultiModel()
           
 
Method Summary
 void addVariable(Variable variable)
          Adds a variable to the model
 Hashtable conflictConstraints(Value value)
          The list of constraints which are in a conflict with the given value if it is assigned to its variable.
 Set conflictValues(Value value)
          Returns the set of confliction variables with this value, if it is assigned to its variable
 MultiVariable getMultiVariable(Variable variable)
          Returns a MultiVariable for the given "normal" variable.
 void removeVariable(Variable variable)
          Removes a variable from the model
 
Methods inherited from class net.sf.cpsolver.ifs.model.Model
addConstraint, addGlobalConstraint, addModelListener, afterAssigned, afterUnassigned, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, clearBest, constraints, countConstraints, countGlobalConstraints, countVariables, getBestPerturbations, getBestUnassignedVariables, getExtendedInfo, getInfo, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, getTotalValue, globalConstraints, inConflict, init, invalidateVariablesWithInitialValueCache, modelListenerOfType, nrAssignedVariables, nrUnassignedVariables, perturbVariables, perturbVariables, removeConstraint, removeGlobalConstraint, removeModelListener, restoreBest, saveBest, toString, unassignedHardConstraints, unassignedVariables, variables, variablesWithInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiModel

public MultiModel()
Method Detail

addVariable

public void addVariable(Variable variable)
Description copied from class: Model
Adds a variable to the model

Overrides:
addVariable in class Model

removeVariable

public void removeVariable(Variable variable)
Description copied from class: Model
Removes a variable from the model

Overrides:
removeVariable in class Model

getMultiVariable

public MultiVariable getMultiVariable(Variable variable)
Returns a MultiVariable for the given "normal" variable.


conflictValues

public Set conflictValues(Value value)
Description copied from class: Model
Returns the set of confliction variables with this value, if it is assigned to its variable

Overrides:
conflictValues in class Model

conflictConstraints

public Hashtable conflictConstraints(Value value)
Description copied from class: Model
The list of constraints which are in a conflict with the given value if it is assigned to its variable. This means the constraints, which adds a value into the set of conflicting values in Constraint.computeConflicts(Value, Set).

Overrides:
conflictConstraints in class Model