choco.cp.solver.constraints.global.scheduling.cumulative
Class Cumulative

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.AbstractResourceSConstraint
                          extended by choco.cp.solver.constraints.global.scheduling.cumulative.AbstractCumulativeSConstraint
                              extended by choco.cp.solver.constraints.global.scheduling.cumulative.Cumulative
All Implemented Interfaces:
IExtensionnable, IPretty, ICapacitedResource<TaskVar>, ICumulativeResource<TaskVar>, IResource<TaskVar>, IResourceParameters, SConstraint<IntDomainVar>, IntPropagator, TaskPropagator, Serializable, Cloneable, EventListener
Direct Known Subclasses:
AltCumulative

public class Cumulative
extends AbstractCumulativeSConstraint

Author:
Arnaud Malapert
See Also:
Serialized Form

Field Summary
protected  ICumulRules cumulRules
           
protected  ICumulSweep cumulSweep
           
protected  boolean noFixPoint
           
 
Fields inherited from class choco.cp.solver.constraints.global.scheduling.cumulative.AbstractCumulativeSConstraint
indexCapacity, indexConsumption, TASK_INTERVAL, TASK_INTERVAL_SLOW, VHM_CEF_ALGO_N2K, VILIM_CEF_ALGO
 
Fields inherited from class choco.cp.solver.constraints.global.scheduling.AbstractResourceSConstraint
flags, indexUB, makespan, name, rtasks, TASK_MASK
 
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
  Cumulative(Solver solver, String name, TaskVar[] taskvars, IntDomainVar[] heights, IntDomainVar consumption, IntDomainVar capacity, IntDomainVar uppBound)
           
protected Cumulative(Solver solver, String name, TaskVar[] taskvars, int nbOptionalTasks, IntDomainVar consumption, IntDomainVar capacity, IntDomainVar uppBound, IntDomainVar... otherVars)
           
 
Method Summary
 void awake()
          Propagation: Propagating the constraint for the very first time until local consistency is reached.
protected  void checkRulesRequirement()
           
 void filter()
          Main loop to achieve the fix point over the sweep and edge-finding algorithms
 ICumulRules getRules()
           
 ICumulSweep getSweep()
           
 void propagate()
          Propagation: Propagating the constraint until local consistency is reached.
 
Methods inherited from class choco.cp.solver.constraints.global.scheduling.cumulative.AbstractCumulativeSConstraint
getCapacity, getConsumption, getHeight, getMaxCapacity, getMaxConsumption, getMinCapacity, getMinConsumption, hasOnlyPosisiveHeights, isEntailed, isInstantiatedHeights, isSatisfied, isTaskConsistencyEnforced, readOptions, updateMaxCapacity, updateMaxConsumption, updateMinCapacity, updateMinConsumption
 
Methods inherited from class choco.cp.solver.constraints.global.scheduling.AbstractResourceSConstraint
asRTaskList, asTaskList, awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnSup, checkTask, enforceTaskConsistency, fireTaskRemoval, getFilteredEventMask, getFlags, getHeight, getHeightIndex, getNbOptionalTasks, getNbRegularTasks, getRscName, getRTask, getRTaskIterator, getTaskIterator, getUsageIndex, indexOf, isCumulativeSatisfied, isRegular, isTaskSatisfied, pretty
 
Methods inherited from class choco.kernel.solver.constraints.global.scheduling.AbstractTaskSConstraint
addListener, awakeOnHypDomMod, awakeOnRem, awakeOnRemovals, createTaskVarArray, getDurationIndex, getEndIndex, getNbTasks, getStartIndex, getTask, getTaskIntVarOffset, makeIntVarArray, pretty
 
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint
getConstraintType, isConsistent, isSatisfied
 
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint
addExtension, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, opposite, setConstraintIndex, setExtension, setVar, toString
 
Methods inherited from class choco.kernel.solver.propagation.Propagator
activate, 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
 
Methods inherited from interface choco.kernel.solver.constraints.global.scheduling.IResource
asRTaskList, asTaskList, getNbTasks, getRTask, getRTaskIterator, getTask, getTaskIterator
 
Methods inherited from interface choco.kernel.solver.constraints.global.scheduling.IResourceParameters
getNbOptionalTasks, getNbRegularTasks, getRscName
 

Field Detail

cumulSweep

protected ICumulSweep cumulSweep

cumulRules

protected ICumulRules cumulRules

noFixPoint

protected boolean noFixPoint
Constructor Detail

Cumulative

protected Cumulative(Solver solver,
                     String name,
                     TaskVar[] taskvars,
                     int nbOptionalTasks,
                     IntDomainVar consumption,
                     IntDomainVar capacity,
                     IntDomainVar uppBound,
                     IntDomainVar... otherVars)

Cumulative

public Cumulative(Solver solver,
                  String name,
                  TaskVar[] taskvars,
                  IntDomainVar[] heights,
                  IntDomainVar consumption,
                  IntDomainVar capacity,
                  IntDomainVar uppBound)
Method Detail

getSweep

public final ICumulSweep getSweep()

getRules

public final ICumulRules getRules()

checkRulesRequirement

protected void checkRulesRequirement()

filter

public final void filter()
                  throws ContradictionException
Main loop to achieve the fix point over the sweep and edge-finding algorithms

Throws:
ContradictionException

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 AbstractResourceSConstraint
Throws:
ContradictionException - contradiction exception

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
See Also:
Propagator.propagate()


Copyright © 2012. All Rights Reserved.