choco.kernel.model.constraints
Class MetaTaskConstraint

java.lang.Object
  extended by choco.kernel.model.VariableArray
      extended by choco.kernel.model.ModelObject
          extended by choco.kernel.model.constraints.AbstractConstraint
              extended by choco.kernel.model.constraints.ComponentConstraint
                  extended by choco.kernel.model.constraints.MetaTaskConstraint
All Implemented Interfaces:
IPretty, IIndex, Constraint, IFindManager, IOptions, IVariableArray, Serializable, Comparable

public class MetaTaskConstraint
extends ComponentConstraint

An wrapper for constraint involving some Taskvariable. It contains additional variables (tasks) added to the model. For example, if you have the constraint (T1 precedes T2) then T1 and T2 should be added to the model with the constraint end(T1) <= start(T2).

Since:
28 janv. 2009 version 2.0.3
Version:
2.0.3
Author:
Arnaud Malapert
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class choco.kernel.model.VariableArray
VariableArray.VConstraintsDataStructure
 
Field Summary
protected  Constraint constraint
           
 
Fields inherited from class choco.kernel.model.constraints.ComponentConstraint
parameters
 
Fields inherited from class choco.kernel.model.constraints.AbstractConstraint
manager
 
Fields inherited from class choco.kernel.model.VariableArray
NO_CONSTRAINTS
 
Fields inherited from interface choco.kernel.model.constraints.Constraint
LOGGER
 
Constructor Summary
MetaTaskConstraint(TaskVariable[] taskvariables, Constraint constraint)
           
 
Method Summary
 Variable[] doExtractVariables()
          Extract variables of a constraint and return an array of variables.
 void findManager(Properties propertiesFile)
          Set the class manager
 int[] getFavoriteDomains()
           
 
Methods inherited from class choco.kernel.model.constraints.ComponentConstraint
getParameters
 
Methods inherited from class choco.kernel.model.constraints.AbstractConstraint
compareTo, getConstraintManager, getConstraintType, getExpressionManager, getIntVariableScope, getManager, getName, pretty
 
Methods inherited from class choco.kernel.model.ModelObject
addOption, addOptions, addOptions, addOptions, addOptions, containsOption, getIndex, getOptions, hashCode, toString
 
Methods inherited from class choco.kernel.model.VariableArray
cancelExtractVariables, extractVariables, forceExtractVariables, getNbVars, getVariable, getVariableIterator, getVariables, replaceBy, replaceByConstantAt, setVariables, setVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface choco.kernel.common.IIndex
getIndex
 
Methods inherited from interface choco.kernel.model.IVariableArray
extractVariables, getNbVars, getVariable, getVariableIterator, getVariables, replaceBy
 
Methods inherited from interface choco.kernel.model.IOptions
addOption, addOptions, addOptions, addOptions, addOptions, containsOption, getOptions
 

Field Detail

constraint

protected Constraint constraint
Constructor Detail

MetaTaskConstraint

public MetaTaskConstraint(TaskVariable[] taskvariables,
                          Constraint constraint)
Method Detail

doExtractVariables

public Variable[] doExtractVariables()
Extract variables of a constraint and return an array of variables.

Overrides:
doExtractVariables in class VariableArray
Returns:
an array of every variables contained in the Constraint.

findManager

public void findManager(Properties propertiesFile)
Description copied from interface: IFindManager
Set the class manager

Specified by:
findManager in interface IFindManager
Overrides:
findManager in class AbstractConstraint

getFavoriteDomains

public int[] getFavoriteDomains()
Specified by:
getFavoriteDomains in interface Constraint
Overrides:
getFavoriteDomains in class ComponentConstraint
Returns:
a list of domains accepted by the constraint and sorted by order of preference


Copyright © 2012. All Rights Reserved.