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

java.lang.Object
  extended by choco.cp.solver.constraints.global.scheduling.RTask
All Implemented Interfaces:
IPretty, IRTask
Direct Known Subclasses:
BoundHRTask

public class RTask
extends Object
implements IRTask


Field Summary
static int ELIMINATED
           
 IntDomainVar height
           
protected  ITask htask
           
static int REGULAR
           
 AbstractResourceSConstraint resource
           
 int taskIdx
           
 TaskVar taskvar
           
 IntDomainVar usage
           
 
Constructor Summary
RTask(AbstractResourceSConstraint constraint, int taskIdx)
           
 
Method Summary
 boolean assign()
           
 void checkConsistency()
           
 void fail()
           
 void fireRemoval()
           
 IntDomainVar getHeight()
           
 ITask getHTask()
           
 long getMaxConsumption()
           
 int getMaxHeight()
           
 long getMinConsumption()
           
 int getMinHeight()
           
 int getStoredValue()
           
 int getTaskIndex()
           
 TaskVar getTaskVar()
           
 IntDomainVar getUsage()
           
 boolean isEliminated()
           
 boolean isOptional()
           
 boolean isRegular()
           
 String pretty()
          pretty printing of the object.
 boolean remove()
           
 boolean setDuration(int duration)
           
 boolean setECT(int val)
          Update the Earliest Completion Time (ECT).
 boolean setEndingTime(int endingTime)
           
 boolean setEndNotIn(int a, int b)
          The task can not end in the interval [a,b].
 boolean setEST(int val)
          Update the Earliest Starting Time (EST).
 boolean setLCT(int val)
          Update the Latest Completion Time (LCT).
 boolean setLST(int val)
          Update the Latest Starting Time (LST).
 boolean setMaxDuration(int val)
           
 boolean setMinDuration(int val)
           
 boolean setStartingTime(int startingTime)
           
 boolean setStartNotIn(int min, int max)
          The task can not start in the interval [a,b].
 void storeValue(int val)
          Utility: A filtering algorithm can store a value to perform update operations (noargs) later.
 String toString()
           
 void updateCompulsoryPart()
           
 boolean updateDuration(int duration)
           
 boolean updateECT()
          Update using IRTask.getStoredValue() .
 boolean updateECT(int val)
          Update the Earliest Completion Time (ECT).
 boolean updateEndingTime(int endingTime)
           
 boolean updateEndNotIn(int a, int b)
          The task can not end in the interval [a,b].
 boolean updateEST()
          Update using IRTask.getStoredValue() .
 boolean updateEST(int val)
          Update the Earliest Starting Time (EST).
 boolean updateLCT()
          Update using IRTask.getStoredValue() .
 boolean updateLCT(int val)
          Update the Latest Completion Time (LCT).
 boolean updateLST()
          Update using IRTask.getStoredValue() .
 boolean updateLST(int val)
          Update the Latest Starting Time (LST).
 boolean updateMaxDuration(int val)
           
 boolean updateMaxHeight(int val)
           
 boolean updateMinDuration(int val)
           
 boolean updateMinHeight(int val)
           
 boolean updateStartingTime(int startingTime)
           
 boolean updateStartNotIn(int a, int b)
          The task can not start in the interval [a,b].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resource

public final AbstractResourceSConstraint resource

taskIdx

public final int taskIdx

taskvar

public final TaskVar taskvar

htask

protected ITask htask

usage

public final IntDomainVar usage

height

public final IntDomainVar height

ELIMINATED

public static final int ELIMINATED
See Also:
Constant Field Values

REGULAR

public static final int REGULAR
See Also:
Constant Field Values
Constructor Detail

RTask

public RTask(AbstractResourceSConstraint constraint,
             int taskIdx)
Method Detail

getTaskIndex

public final int getTaskIndex()
Specified by:
getTaskIndex in interface IRTask

getStoredValue

public final int getStoredValue()
Specified by:
getStoredValue in interface IRTask

storeValue

public final void storeValue(int val)
Description copied from interface: IRTask
Utility: A filtering algorithm can store a value to perform update operations (noargs) later.

Specified by:
storeValue in interface IRTask

getTaskVar

public final TaskVar getTaskVar()
Specified by:
getTaskVar in interface IRTask

getHTask

public final ITask getHTask()
Specified by:
getHTask in interface IRTask

checkConsistency

public void checkConsistency()
                      throws ContradictionException
Specified by:
checkConsistency in interface IRTask
Throws:
ContradictionException

updateECT

public final boolean updateECT()
                        throws ContradictionException
Description copied from interface: IRTask
Update using IRTask.getStoredValue() .

Specified by:
updateECT in interface IRTask
Throws:
ContradictionException

updateEST

public final boolean updateEST()
                        throws ContradictionException
Description copied from interface: IRTask
Update using IRTask.getStoredValue() .

Specified by:
updateEST in interface IRTask
Throws:
ContradictionException

updateLCT

public final boolean updateLCT()
                        throws ContradictionException
Description copied from interface: IRTask
Update using IRTask.getStoredValue() .

Specified by:
updateLCT in interface IRTask
Throws:
ContradictionException

updateLST

public final boolean updateLST()
                        throws ContradictionException
Description copied from interface: IRTask
Update using IRTask.getStoredValue() .

Specified by:
updateLST in interface IRTask
Throws:
ContradictionException

updateDuration

public boolean updateDuration(int duration)
                       throws ContradictionException
Specified by:
updateDuration in interface IRTask
Throws:
ContradictionException

updateECT

public boolean updateECT(int val)
                  throws ContradictionException
Description copied from interface: IRTask
Update the Earliest Completion Time (ECT).

Specified by:
updateECT in interface IRTask
Throws:
ContradictionException

updateEndingTime

public boolean updateEndingTime(int endingTime)
                         throws ContradictionException
Specified by:
updateEndingTime in interface IRTask
Throws:
ContradictionException

updateEndNotIn

public boolean updateEndNotIn(int a,
                              int b)
                       throws ContradictionException
Description copied from interface: IRTask
The task can not end in the interval [a,b].

Specified by:
updateEndNotIn in interface IRTask
Throws:
ContradictionException

updateEST

public boolean updateEST(int val)
                  throws ContradictionException
Description copied from interface: IRTask
Update the Earliest Starting Time (EST).

Specified by:
updateEST in interface IRTask
Throws:
ContradictionException

updateLCT

public boolean updateLCT(int val)
                  throws ContradictionException
Description copied from interface: IRTask
Update the Latest Completion Time (LCT).

Specified by:
updateLCT in interface IRTask
Throws:
ContradictionException

updateLST

public boolean updateLST(int val)
                  throws ContradictionException
Description copied from interface: IRTask
Update the Latest Starting Time (LST).

Specified by:
updateLST in interface IRTask
Throws:
ContradictionException

updateMaxDuration

public boolean updateMaxDuration(int val)
                          throws ContradictionException
Specified by:
updateMaxDuration in interface IRTask
Throws:
ContradictionException

updateMinDuration

public boolean updateMinDuration(int val)
                          throws ContradictionException
Specified by:
updateMinDuration in interface IRTask
Throws:
ContradictionException

updateStartingTime

public boolean updateStartingTime(int startingTime)
                           throws ContradictionException
Specified by:
updateStartingTime in interface IRTask
Throws:
ContradictionException

updateStartNotIn

public boolean updateStartNotIn(int a,
                                int b)
                         throws ContradictionException
Description copied from interface: IRTask
The task can not start in the interval [a,b].

Specified by:
updateStartNotIn in interface IRTask
Throws:
ContradictionException

setDuration

public boolean setDuration(int duration)
                    throws ContradictionException
Specified by:
setDuration in interface IRTask
Throws:
ContradictionException

setStartingTime

public boolean setStartingTime(int startingTime)
                        throws ContradictionException
Specified by:
setStartingTime in interface IRTask
Throws:
ContradictionException

setEndingTime

public boolean setEndingTime(int endingTime)
                      throws ContradictionException
Specified by:
setEndingTime in interface IRTask
Throws:
ContradictionException

setEndNotIn

public boolean setEndNotIn(int a,
                           int b)
                    throws ContradictionException
Description copied from interface: IRTask
The task can not end in the interval [a,b].

Specified by:
setEndNotIn in interface IRTask
Throws:
ContradictionException

setStartNotIn

public boolean setStartNotIn(int min,
                             int max)
                      throws ContradictionException
Description copied from interface: IRTask
The task can not start in the interval [a,b].

Specified by:
setStartNotIn in interface IRTask
Throws:
ContradictionException

setECT

public boolean setECT(int val)
               throws ContradictionException
Description copied from interface: IRTask
Update the Earliest Completion Time (ECT).

Specified by:
setECT in interface IRTask
Throws:
ContradictionException

setEST

public boolean setEST(int val)
               throws ContradictionException
Description copied from interface: IRTask
Update the Earliest Starting Time (EST).

Specified by:
setEST in interface IRTask
Throws:
ContradictionException

setLCT

public boolean setLCT(int val)
               throws ContradictionException
Description copied from interface: IRTask
Update the Latest Completion Time (LCT).

Specified by:
setLCT in interface IRTask
Throws:
ContradictionException

setLST

public boolean setLST(int val)
               throws ContradictionException
Description copied from interface: IRTask
Update the Latest Starting Time (LST).

Specified by:
setLST in interface IRTask
Throws:
ContradictionException

setMaxDuration

public boolean setMaxDuration(int val)
                       throws ContradictionException
Specified by:
setMaxDuration in interface IRTask
Throws:
ContradictionException

setMinDuration

public boolean setMinDuration(int val)
                       throws ContradictionException
Specified by:
setMinDuration in interface IRTask
Throws:
ContradictionException

updateCompulsoryPart

public final void updateCompulsoryPart()
                                throws ContradictionException
Specified by:
updateCompulsoryPart in interface IRTask
Throws:
ContradictionException

fail

public final void fail()
                throws ContradictionException
Specified by:
fail in interface IRTask
Throws:
ContradictionException

getUsage

public final IntDomainVar getUsage()

assign

public boolean assign()
               throws ContradictionException
Throws:
ContradictionException

isOptional

public final boolean isOptional()

isRegular

public final boolean isRegular()

isEliminated

public final boolean isEliminated()

remove

public final boolean remove()
                     throws ContradictionException
Throws:
ContradictionException

fireRemoval

public final void fireRemoval()

getHeight

public final IntDomainVar getHeight()

updateMaxHeight

public final boolean updateMaxHeight(int val)
                              throws ContradictionException
Throws:
ContradictionException

updateMinHeight

public final boolean updateMinHeight(int val)
                              throws ContradictionException
Throws:
ContradictionException

getMaxHeight

public final int getMaxHeight()

getMinHeight

public final int getMinHeight()

getMaxConsumption

public final long getMaxConsumption()

getMinConsumption

public final long getMinConsumption()

toString

public String toString()
Overrides:
toString in class Object

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
Returns:
a readable string representation of the object


Copyright © 2012. All Rights Reserved.