choco.cp.solver.constraints.global.scheduling
Class TempTaskConstraintWrapper

java.lang.Object
  extended by choco.kernel.solver.propagation.Propagator
      extended by choco.kernel.solver.constraints.AbstractSConstraint<TaskVar>
          extended by choco.cp.solver.constraints.global.scheduling.TempTaskConstraintWrapper
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<TaskVar>, TaskPropagator, Cloneable, EventListener

public class TempTaskConstraintWrapper
extends AbstractSConstraint<TaskVar>
implements TaskPropagator


Field Summary
protected  AbstractUseResourcesSConstraint constraint
           
 
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
TempTaskConstraintWrapper(TaskVar task, AbstractUseResourcesSConstraint constraint)
           
 
Method Summary
 void awakeOnHypDomMod(int varIdx)
          Default propagation on improved hypothetical domain: propagation on domain revision.
 SConstraintType getConstraintType()
          Return the type of constraint, ie the type of variable involved in the constraint
 boolean isConsistent()
          tests if the constraint is consistent with respect to the current state of domains
 Boolean isEntailed()
          Indicates if the constraint is entailed, from now on will be always satisfied
 boolean isSatisfied()
          Semantic: Testing if the constraint is satisfied.
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, pretty, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, awake, 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

constraint

protected final AbstractUseResourcesSConstraint constraint
Constructor Detail

TempTaskConstraintWrapper

public TempTaskConstraintWrapper(TaskVar task,
                                 AbstractUseResourcesSConstraint constraint)
Method Detail

isConsistent

public boolean isConsistent()
Description copied from class: Propagator
tests if the constraint is consistent with respect to the current state of domains

Specified by:
isConsistent in class Propagator
Returns:
wether the constraint is consistent

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

getConstraintType

public SConstraintType getConstraintType()
Description copied from interface: SConstraint
Return the type of constraint, ie the type of variable involved in the constraint

Specified by:
getConstraintType in interface SConstraint<TaskVar>
Returns:

isSatisfied

public boolean isSatisfied()
Description copied from interface: SConstraint
Semantic: Testing if the constraint is satisfied. Note that all variables involved in the constraint must be instantiated when this method is called.

Specified by:
isSatisfied in interface SConstraint<TaskVar>
Returns:
true if the constraint is satisfied

isEntailed

public Boolean isEntailed()
Description copied from class: AbstractSConstraint
Indicates if the constraint is entailed, from now on will be always satisfied

Overrides:
isEntailed in class AbstractSConstraint<TaskVar>
Returns:
wether the constraint is entailed

awakeOnHypDomMod

public void awakeOnHypDomMod(int varIdx)
                      throws ContradictionException
Description copied from interface: TaskPropagator
Default propagation on improved hypothetical domain: propagation on domain revision.

Specified by:
awakeOnHypDomMod in interface TaskPropagator
Throws:
ContradictionException


Copyright © 2012. All Rights Reserved.