choco.cp.solver.constraints.global
Class Geost_Constraint

java.lang.Object
  extended by choco.kernel.solver.propagation.Propagator
      extended by choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
          extended by choco.kernel.solver.constraints.integer.AbstractIntSConstraint
              extended by choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
                  extended by choco.cp.solver.constraints.global.Geost_Constraint
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener

public final class Geost_Constraint
extends AbstractLargeIntSConstraint


Field Summary
protected  Solver s
           
 
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint
cIndices, constraintType, extensions, vars
 
Fields inherited from class choco.kernel.solver.propagation.Propagator
active, constAwakeEvent, priority, propagationEngine
 
Fields inherited from interface choco.kernel.solver.constraints.SConstraint
LOGGER
 
Constructor Summary
Geost_Constraint(IntDomainVar[] vars, int k, List<Obj> objects, List<ShiftedBox> shiftedBoxes, List<ExternalConstraint> ectr, boolean memo, HashMap<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included, Solver solver)
          Creates a geost constraint with the given parameters.
Geost_Constraint(IntDomainVar[] vars, int k, List<Obj> objects, List<ShiftedBox> shiftedBoxes, List<ExternalConstraint> ectr, List<int[]> ctrlVs, boolean memo_active, HashMap<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included, boolean increment_, Solver solver)
          Creates a geost constraint with the given parameters.
 
Method Summary
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
 void awakeOnBounds(int varIndex)
           
 void awakeOnInf(int idx)
          Default propagation on improved lower bound: propagation on domain revision.
 void awakeOnInst(int idx)
          Default propagation on instantiation: full constraint re-propagation.
 void awakeOnRem(int idx, int x)
          Default propagation on one value removal: propagation on domain revision.
 void awakeOnRemovals(int idx, DisposableIntIterator deltaDomain)
          The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally.
 void awakeOnSup(int idx)
          Default propagation on improved upper bound: propagation on domain revision.
 void filter()
           
 Constants getCst()
           
 ExternalLayer getExternalLayer()
           
 List<InternalConstraint> getForbiddenRegions(Obj o)
           
 Setup getStp()
           
 boolean isGreedy()
           
 boolean isSatisfied()
          Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple)
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 void setCst(Constants cst)
           
 void setGreedy(boolean greedy)
           
 void setStp(Setup stp)
           
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, pretty, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, constAwake, fail, getEvent, getFilteredEventMask, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

protected Solver s
Constructor Detail

Geost_Constraint

public Geost_Constraint(IntDomainVar[] vars,
                        int k,
                        List<Obj> objects,
                        List<ShiftedBox> shiftedBoxes,
                        List<ExternalConstraint> ectr,
                        List<int[]> ctrlVs,
                        boolean memo_active,
                        HashMap<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included,
                        boolean increment_,
                        Solver solver)
Creates a geost constraint with the given parameters.

Parameters:
vars - Array of Variables for choco
k - Dimension of the problem we are working with
objects - A vector containing the objects (obj)
shiftedBoxes - A vector containing the shifted boxes
ectr - A vector containing the External Constraints in our problem
ctrlVs - A list of controlling vectors used in the greedy mode
solver -

Geost_Constraint

public Geost_Constraint(IntDomainVar[] vars,
                        int k,
                        List<Obj> objects,
                        List<ShiftedBox> shiftedBoxes,
                        List<ExternalConstraint> ectr,
                        boolean memo,
                        HashMap<com.sun.tools.javac.util.Pair<Integer,Integer>,Boolean> included,
                        Solver solver)
Creates a geost constraint with the given parameters.

Parameters:
vars - Array of Variables for choco
k - Dimension of the problem we are working with
objects - A vector containing the objects (obj)
shiftedBoxes - A vector containing the shifted boxes
ectr - A vector containing the External Constraints in our problem
solver -
Method Detail

filter

public void filter()
            throws ContradictionException
Throws:
ContradictionException

isSatisfied

public boolean isSatisfied()
Description copied from class: AbstractIntSConstraint
Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple)

Specified by:
isSatisfied in interface SConstraint<IntDomainVar>
Overrides:
isSatisfied in class AbstractIntSConstraint
Returns:
true if the constraint is satisfied

propagate

public void propagate()
               throws ContradictionException
Description copied from class: Propagator
Propagation: Propagating the constraint until local consistency is reached.

Specified by:
propagate in class Propagator
Throws:
ContradictionException - contradiction exception

awake

public void awake()
           throws ContradictionException
Description copied from class: Propagator
Propagation: Propagating the constraint for the very first time until local consistency is reached.

Overrides:
awake in class Propagator
Throws:
ContradictionException - contradiction exception

awakeOnInst

public void awakeOnInst(int idx)
                 throws ContradictionException
Description copied from class: AbstractIntSConstraint
Default propagation on instantiation: full constraint re-propagation.

Specified by:
awakeOnInst in interface IntPropagator
Overrides:
awakeOnInst in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnInf

public void awakeOnInf(int idx)
                throws ContradictionException
Description copied from class: AbstractIntSConstraint
Default propagation on improved lower bound: propagation on domain revision.

Specified by:
awakeOnInf in interface IntPropagator
Overrides:
awakeOnInf in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnSup

public void awakeOnSup(int idx)
                throws ContradictionException
Description copied from class: AbstractIntSConstraint
Default propagation on improved upper bound: propagation on domain revision.

Specified by:
awakeOnSup in interface IntPropagator
Overrides:
awakeOnSup in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnBounds

public void awakeOnBounds(int varIndex)
                   throws ContradictionException
Specified by:
awakeOnBounds in interface IntPropagator
Overrides:
awakeOnBounds in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnRem

public void awakeOnRem(int idx,
                       int x)
                throws ContradictionException
Description copied from class: AbstractIntSConstraint
Default propagation on one value removal: propagation on domain revision.

Specified by:
awakeOnRem in interface IntPropagator
Overrides:
awakeOnRem in class AbstractIntSConstraint
Throws:
ContradictionException

awakeOnRemovals

public void awakeOnRemovals(int idx,
                            DisposableIntIterator deltaDomain)
                     throws ContradictionException
Description copied from class: AbstractIntSConstraint
The default implementation of propagation when a variable has been modified consists in iterating all values that have been removed (the delta domain) and propagate them one after another, incrementally.

Specified by:
awakeOnRemovals in interface IntPropagator
Overrides:
awakeOnRemovals in class AbstractIntSConstraint
Throws:
ContradictionException

getCst

public Constants getCst()

getStp

public Setup getStp()

setCst

public void setCst(Constants cst)

setStp

public void setStp(Setup stp)

getExternalLayer

public ExternalLayer getExternalLayer()

getForbiddenRegions

public List<InternalConstraint> getForbiddenRegions(Obj o)

setGreedy

public void setGreedy(boolean greedy)

isGreedy

public boolean isGreedy()


Copyright © 2012. All Rights Reserved.