choco.cp.model.managers.constraints.global
Class AbstractResourceManager

java.lang.Object
  extended by choco.kernel.model.constraints.ConstraintManager<Variable>
      extended by choco.cp.model.managers.MixedConstraintManager
          extended by choco.cp.model.managers.constraints.global.AbstractResourceManager
All Implemented Interfaces:
ExpressionManager
Direct Known Subclasses:
CumulativeManager, DisjunctiveManager

public abstract class AbstractResourceManager
extends MixedConstraintManager

Since:
27 janv. 2009 version 2.0.0
Version:
2.0.3
Author:
Arnaud Malapert

Field Summary
 
Fields inherited from interface choco.kernel.model.constraints.ExpressionManager
LOGGER
 
Constructor Summary
AbstractResourceManager()
           
 
Method Summary
 int[] getFavoriteDomains(List<String> options)
          Bounded.
protected  IntDomainVar getHorizon(CPSolver s, Variable[] variables, ResourceParameters p)
           
protected abstract  SConstraint makeConstraint(CPSolver solver, Variable[] variables, ResourceParameters rdata, List<String> options)
           
 SConstraint makeConstraint(Solver solver, Variable[] variables, Object parameters, List<String> options)
          Build a constraint for the given solver and "model variables"
 
Methods inherited from class choco.cp.model.managers.MixedConstraintManager
makeConstraintAndOpposite, makeNode
 
Methods inherited from class choco.kernel.model.constraints.ConstraintManager
checkParameter, fail, fail, getACFavoriteIntDomains, getBCFavoriteIntDomains
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourceManager

public AbstractResourceManager()
Method Detail

makeConstraint

public SConstraint makeConstraint(Solver solver,
                                  Variable[] variables,
                                  Object parameters,
                                  List<String> options)
Description copied from class: ConstraintManager
Build a constraint for the given solver and "model variables"

Specified by:
makeConstraint in class ConstraintManager<Variable>
Parameters:
solver - solver to build constraint in
variables - array of variables
parameters - Object defining the paramaters
options - set of options
Returns:
One SConstraint

makeConstraint

protected abstract SConstraint makeConstraint(CPSolver solver,
                                              Variable[] variables,
                                              ResourceParameters rdata,
                                              List<String> options)

getHorizon

protected final IntDomainVar getHorizon(CPSolver s,
                                        Variable[] variables,
                                        ResourceParameters p)

getFavoriteDomains

public int[] getFavoriteDomains(List<String> options)
Bounded.

Overrides:
getFavoriteDomains in class MixedConstraintManager
Parameters:
options - : the set of options on the constraint (Typically the level of consistency)
Returns:
a list of domains accepted by the constraint and sorted by order of preference
See Also:
choco.kernel.model.constraints.ConstraintManager#getFavoriteDomains(java.util.List


Copyright © 2012. All Rights Reserved.