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

java.lang.Object
  extended by choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules
All Implemented Interfaces:
ICumulRules

public class CumulRules
extends Object
implements ICumulRules

Since:
4 mars 2009 version 2.0.3
Version:
2.0.3
Author:
Arnaud Malapert

Field Summary
protected  long[][] R
          temporary data for edge finding (initialized by dynprog) to store the inner maximization of the edge finding bound on the start/end variables of each task.
 AbstractCumulativeSConstraint rsc
           
protected  choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption[] Sc
          The different ressource consumptions of all tasks.
protected  choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption[] taskheights
          Reference to the consumption object related to each task
protected  LinkedList<IRTask> tasksLX
           
protected  List<IRTask> tasksLY
           
protected  CumTreeT<TaskVar> thetatree
           
 
Constructor Summary
CumulRules(AbstractCumulativeSConstraint rsc)
           
 
Method Summary
 boolean calcEF_end()
          Edge finding algorithm for ending dates in O(n^2 \times k) where k is the number of distinct heights.
 boolean calcEF_start()
          Edge finding algorithm for starting dates in O(n^2 \times k) where k is the number of distinct heights.
protected  void calcR_end(choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption cons)
          precomputation for the edge finding using dynamic programming this method assumes that the task intervals have not failed !
protected  void calcR_start(choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption cons)
          Lazy computation of the inner maximization of the edge finding.
 void initializeEdgeFindingData()
          Initialize some data structure for the edge finding.
 void initializeEdgeFindingEnd()
           
 void initializeEdgeFindingStart()
           
 void oldSlowTaskIntervals()
           
 void reinitConsumption()
          reset all the flags for dynamic computation of R
 void slowTaskIntervals()
          a basic n^2 tasks interval
 void taskIntervals()
          fast task intervals in n*log(n)
 boolean vilimEndEF()
          Edge finding algorithm for ending dates in O(n^2 \times k) where k is the number of distinct heights.
 boolean vilimStartEF()
          Edge finding algorithm for starting dates in O(n^2 \times k) where k is the number of distinct heights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rsc

public final AbstractCumulativeSConstraint rsc

tasksLX

protected final LinkedList<IRTask> tasksLX

tasksLY

protected final List<IRTask> tasksLY

thetatree

protected CumTreeT<TaskVar> thetatree

Sc

protected choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption[] Sc
The different ressource consumptions of all tasks. Sc.lenght <= nbTask It can varies over time with variable consumption (or heights) !


taskheights

protected choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption[] taskheights
Reference to the consumption object related to each task


R

protected long[][] R
temporary data for edge finding (initialized by dynprog) to store the inner maximization of the edge finding bound on the start/end variables of each task.

Constructor Detail

CumulRules

public CumulRules(AbstractCumulativeSConstraint rsc)
Method Detail

initializeEdgeFindingData

public void initializeEdgeFindingData()
Description copied from interface: ICumulRules
Initialize some data structure for the edge finding. If the height are constant, this is done only once at the beginning, otherwise it has to be recomputed at each call. Shall we maintain it incrementally ?

Specified by:
initializeEdgeFindingData in interface ICumulRules

initializeEdgeFindingEnd

public void initializeEdgeFindingEnd()
Specified by:
initializeEdgeFindingEnd in interface ICumulRules

initializeEdgeFindingStart

public void initializeEdgeFindingStart()
Specified by:
initializeEdgeFindingStart in interface ICumulRules

reinitConsumption

public void reinitConsumption()
Description copied from interface: ICumulRules
reset all the flags for dynamic computation of R

Specified by:
reinitConsumption in interface ICumulRules

oldSlowTaskIntervals

public void oldSlowTaskIntervals()
                          throws ContradictionException
Throws:
ContradictionException

slowTaskIntervals

public void slowTaskIntervals()
                       throws ContradictionException
Description copied from interface: ICumulRules
a basic n^2 tasks interval

Specified by:
slowTaskIntervals in interface ICumulRules
Throws:
ContradictionException

taskIntervals

public void taskIntervals()
                   throws ContradictionException
Description copied from interface: ICumulRules
fast task intervals in n*log(n)

Specified by:
taskIntervals in interface ICumulRules
Throws:
ContradictionException

calcR_start

protected void calcR_start(choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption cons)
Lazy computation of the inner maximization of the edge finding. Instead of precumputed the R values, we call this method for a given consumption this method assumes that the task intervals have not failed !


calcEF_start

public boolean calcEF_start()
                     throws ContradictionException
Description copied from interface: ICumulRules
Edge finding algorithm for starting dates in O(n^2 \times k) where k is the number of distinct heights.

Specified by:
calcEF_start in interface ICumulRules
Throws:
ContradictionException

vilimStartEF

public boolean vilimStartEF()
                     throws ContradictionException
Description copied from interface: ICumulRules
Edge finding algorithm for starting dates in O(n^2 \times k) where k is the number of distinct heights. Vilim version based on the theta- lambda tree.

Specified by:
vilimStartEF in interface ICumulRules
Throws:
ContradictionException

calcR_end

protected void calcR_end(choco.cp.solver.constraints.global.scheduling.cumulative.CumulRules.Consumption cons)
precomputation for the edge finding using dynamic programming this method assumes that the task intervals have not failed !


calcEF_end

public boolean calcEF_end()
                   throws ContradictionException
Description copied from interface: ICumulRules
Edge finding algorithm for ending dates in O(n^2 \times k) where k is the number of distinct heights.

Specified by:
calcEF_end in interface ICumulRules
Throws:
ContradictionException

vilimEndEF

public boolean vilimEndEF()
                   throws ContradictionException
Description copied from interface: ICumulRules
Edge finding algorithm for ending dates in O(n^2 \times k) where k is the number of distinct heights. Vilim version based on the theta- lambda tree.

Specified by:
vilimEndEF in interface ICumulRules
Throws:
ContradictionException


Copyright © 2012. All Rights Reserved.