choco.cp.solver.constraints.global.scheduling.precedence
Class PrecedenceVSDisjoint

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.scheduling.precedence.AbstractPrecedenceSConstraint
                      extended by choco.cp.solver.constraints.global.scheduling.precedence.PrecedenceVSDisjoint
All Implemented Interfaces:
ITemporalSRelation, IExtensionnable, IPretty, ITemporalRelation<TaskVar<?>,IntDomainVar>, SConstraint<IntDomainVar>, IntPropagator, Cloneable, EventListener

public final class PrecedenceVSDisjoint
extends AbstractPrecedenceSConstraint

The precedence disjoint constraint with setup times and variable duration. b = 1 <=> e1 + k1 <= s2 b = 0 <=> e2 + k2 <= s1


Field Summary
 
Fields inherited from class choco.cp.solver.constraints.global.scheduling.precedence.AbstractPrecedenceSConstraint
BIDX, k1, k2, reuseBool, task1, task2
 
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.cp.solver.constraints.global.scheduling.precedence.ITemporalSRelation
PRESERVED_PRECISION
 
Fields inherited from interface choco.kernel.model.constraints.ITemporalRelation
BWD, FWD
 
Fields inherited from interface choco.kernel.solver.constraints.SConstraint
LOGGER
 
Constructor Summary
PrecedenceVSDisjoint(IntDomainVar b, IntDomainVar s1, IntDomainVar e1, int k1, IntDomainVar s2, IntDomainVar e2, int k2)
           
PrecedenceVSDisjoint(IntDomainVar b, TaskVar t1, int k1, TaskVar t2, int k2)
           
 
Method Summary
 Boolean isP1Entailed()
           
 Boolean isP2Entailed()
           
 boolean isSatisfied()
          Default implementation of the isSatisfied by delegating to the isSatisfied(int[] tuple)
 boolean isSatisfied(int[] tuple)
          TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet !
 String pretty()
          pretty printing of the object.
 void propagateP1()
           
 void propagateP2()
           
 
Methods inherited from class choco.cp.solver.constraints.global.scheduling.precedence.AbstractPrecedenceSConstraint
awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRemovals, awakeOnSup, backwardSetup, filterOnP1P2TowardsB, forwardSetup, getBackwardPreserved, getDestination, getDirection, getDirVal, getFilteredEventMask, getForwardPreserved, getOrigin, getTotalSlack, isEntailed, isEntailed, isFixed, isSatisfied, isSatisfied, pretty, pretty, pretty, propagate, propagate, propagate, setTasks, toString
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
awakeOnRem, getConstraintType, isConsistent
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, awake, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrecedenceVSDisjoint

public PrecedenceVSDisjoint(IntDomainVar b,
                            IntDomainVar s1,
                            IntDomainVar e1,
                            int k1,
                            IntDomainVar s2,
                            IntDomainVar e2,
                            int k2)

PrecedenceVSDisjoint

public PrecedenceVSDisjoint(IntDomainVar b,
                            TaskVar t1,
                            int k1,
                            TaskVar t2,
                            int k2)
Method Detail

isP1Entailed

public Boolean isP1Entailed()
Specified by:
isP1Entailed in class AbstractPrecedenceSConstraint

isP2Entailed

public Boolean isP2Entailed()
Specified by:
isP2Entailed in class AbstractPrecedenceSConstraint

propagateP1

public void propagateP1()
                 throws ContradictionException
Specified by:
propagateP1 in class AbstractPrecedenceSConstraint
Throws:
ContradictionException

propagateP2

public void propagateP2()
                 throws ContradictionException
Specified by:
propagateP2 in class AbstractPrecedenceSConstraint
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

isSatisfied

public boolean isSatisfied(int[] tuple)
Description copied from class: AbstractIntSConstraint
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet !

Specified by:
isSatisfied in interface IntPropagator
Overrides:
isSatisfied in class AbstractIntSConstraint

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
Overrides:
pretty in class AbstractSConstraint<IntDomainVar>
Returns:
a readable string representation of the object


Copyright © 2012. All Rights Reserved.