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

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.kernel.solver.constraints.global.scheduling.AbstractTaskSConstraint
                      extended by choco.cp.solver.constraints.global.scheduling.AbstractUseResourcesSConstraint
                          extended by choco.cp.solver.constraints.global.scheduling.UseResourcesGeq
All Implemented Interfaces:
IExtensionnable, IPretty, SConstraint<IntDomainVar>, IntPropagator, TaskPropagator, Cloneable, EventListener

public class UseResourcesGeq
extends AbstractUseResourcesSConstraint


Field Summary
 
Fields inherited from class choco.cp.solver.constraints.global.scheduling.AbstractUseResourcesSConstraint
BOOL_OFFSET, boolSumS
 
Fields inherited from class choco.kernel.solver.constraints.global.scheduling.AbstractTaskSConstraint
endOffset, startOffset, taskIntVarOffset, taskvars
 
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
UseResourcesGeq(IEnvironment environment, TaskVar taskvar, int k, IntDomainVar[] usages, IRTask[] rtasks)
           
 
Method Summary
 void awakeOnInst(int idx)
          Default propagation on instantiation: full constraint re-propagation.
 Boolean isEntailed()
          Indicates if the constraint is entailed, from now on will be always satisfied
 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 !
 AbstractSConstraint<IntDomainVar> opposite(Solver solver)
          Get the opposite constraint
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 
Methods inherited from class choco.cp.solver.constraints.global.scheduling.AbstractUseResourcesSConstraint
filterEarliestStartingTime, filterHypotheticalDomains, filterLatestCompletionTime, filterLatestCompletionTime, getFilteredEventMask
 
Methods inherited from class choco.kernel.solver.constraints.global.scheduling.AbstractTaskSConstraint
addListener, awakeOnHypDomMod, awakeOnRem, awakeOnRemovals, createTaskVarArray, getDurationIndex, getEndIndex, getNbTasks, getStartIndex, getTask, getTaskIntVarOffset, isTaskConsistencyEnforced, makeIntVarArray, pretty, pretty
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
awakeOnBounds, awakeOnInf, awakeOnSup, getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, setConstraintIndex, setExtension, setVar, toString
 
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

UseResourcesGeq

public UseResourcesGeq(IEnvironment environment,
                       TaskVar taskvar,
                       int k,
                       IntDomainVar[] usages,
                       IRTask[] rtasks)
Method Detail

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 AbstractUseResourcesSConstraint
Throws:
ContradictionException

propagate

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

Overrides:
propagate in class AbstractUseResourcesSConstraint
Throws:
ContradictionException - contradiction exception

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

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<IntDomainVar>
Returns:
wether the constraint is entailed

opposite

public AbstractSConstraint<IntDomainVar> opposite(Solver solver)
Description copied from class: AbstractSConstraint
Get the opposite constraint

Specified by:
opposite in interface SConstraint<IntDomainVar>
Overrides:
opposite in class AbstractSConstraint<IntDomainVar>
Parameters:
solver - the current solver
Returns:
the opposite constraint @param solver


Copyright © 2012. All Rights Reserved.