choco.cp.solver.constraints.global.scheduling.trees
Class AltDisjTreeTLTO

java.lang.Object
  extended by choco.kernel.common.opres.graph.ProperBinaryTree
      extended by choco.cp.solver.constraints.global.scheduling.trees.AbstractVilimTree
          extended by choco.cp.solver.constraints.global.scheduling.trees.AltDisjTreeTLTO
All Implemented Interfaces:
IThetaLambdaTree, IThetaOmegaTree, IThetaTree, IVilimTree, IDotty, ITree

public class AltDisjTreeTLTO
extends AbstractVilimTree
implements IThetaLambdaTree, IThetaOmegaTree

Author:
abadr

Nested Class Summary
protected  class AltDisjTreeTLTO.AltDisjStatusTLTO
           
 
Nested classes/interfaces inherited from interface choco.cp.solver.constraints.global.scheduling.trees.IVilimTree
IVilimTree.TreeMode
 
Constructor Summary
AltDisjTreeTLTO(List<? extends ITask> tasks)
           
 
Method Summary
 int getGrayTime()
           
 int getNbOmegaTasks()
           
protected  AltDisjTreeTLTO.AltDisjStatusTLTO getNodeStatus(IBinaryNode node)
           
 Object getResponsibleTask()
           
 Object getResponsibleTOTask()
           
protected  ThetaOmegaStatus getRootStatus()
           
 int getTaskType(IRTask rtask)
          Checks whether a regular task is not in Theta tree.
 int getTime()
           
 int getTOTime()
           
 void initializeEdgeFinding(IVilimTree.TreeMode mode, Iterable<IRTask> rtasks)
           
 void insert(ITask task)
           
 boolean insertInLambda(IRTask rtask)
           
 boolean insertInOmega(IRTask rtask)
           
 boolean insertInTheta(IRTask rtask)
          insert the task into the tree.
 boolean insertInTheta(ITask task)
          insert the task into the tree (optional operation).
 boolean removeFromLambda(ITask task)
           
 boolean removeFromOmega(IRTask task)
           
 boolean removeFromOmegaAndInsertInLambda(IRTask task)
          Removes task from Omega, and insert it in Lambda.
 boolean removeFromTheta(ITask task)
           
 boolean removeFromThetaAndInsertInLambda(IRTask task)
           
 boolean removeFromThetaAndInsertInLambda(ITask task)
          remove from the set thea and insert the atsk into lambda (optional operation).
 
Methods inherited from class choco.cp.solver.constraints.global.scheduling.trees.AbstractVilimTree
applySort, contains, getLeaf, getMode, getTaskComparator, insertTask, remove, reset, setMode, sort, toDotty
 
Methods inherited from class choco.kernel.common.opres.graph.ProperBinaryTree
fireTreeChanged, fireTreeChanged, getDepth, getNbInternalNodes, getNbLeaves, getRoot, insert, isLeftOrRight, remove, removeLast, setRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface choco.cp.solver.constraints.global.scheduling.trees.IThetaTree
insertInTheta, insertInTheta, removeFromTheta
 
Methods inherited from interface choco.cp.solver.constraints.global.scheduling.trees.IVilimTree
contains, getMode, remove, reset, setMode, sort
 
Methods inherited from interface choco.kernel.common.IDotty
toDotty
 
Methods inherited from interface choco.kernel.common.opres.graph.ITree
getDepth, getNbInternalNodes, getNbLeaves
 

Constructor Detail

AltDisjTreeTLTO

public AltDisjTreeTLTO(List<? extends ITask> tasks)
Method Detail

insert

public void insert(ITask task)
Specified by:
insert in interface IVilimTree

getTaskType

public int getTaskType(IRTask rtask)
Checks whether a regular task is not in Theta tree.

Parameters:
rtask -
Returns:
true if task is not in Theta, false otherwise.

initializeEdgeFinding

public void initializeEdgeFinding(IVilimTree.TreeMode mode,
                                  Iterable<IRTask> rtasks)

getRootStatus

protected ThetaOmegaStatus getRootStatus()

getNodeStatus

protected final AltDisjTreeTLTO.AltDisjStatusTLTO getNodeStatus(IBinaryNode node)

getTime

public int getTime()
Specified by:
getTime in interface IVilimTree

getGrayTime

public int getGrayTime()
Specified by:
getGrayTime in interface IThetaLambdaTree

getResponsibleTask

public Object getResponsibleTask()
Specified by:
getResponsibleTask in interface IThetaLambdaTree

getTOTime

public int getTOTime()
Specified by:
getTOTime in interface IThetaOmegaTree
Returns:
ECT(Theta,Omega)

getResponsibleTOTask

public Object getResponsibleTOTask()
Specified by:
getResponsibleTOTask in interface IThetaOmegaTree
Returns:
task responsible for highest ECT(Theta,Omega)

insertInLambda

public boolean insertInLambda(IRTask rtask)
Specified by:
insertInLambda in interface IThetaLambdaTree

removeFromLambda

public boolean removeFromLambda(ITask task)
Specified by:
removeFromLambda in interface IThetaLambdaTree

removeFromThetaAndInsertInLambda

public boolean removeFromThetaAndInsertInLambda(ITask task)
Description copied from interface: IThetaLambdaTree
remove from the set thea and insert the atsk into lambda (optional operation). If some additional information is needed, it throws an UnsupportedOperationException and you should use IThetaLambdaTree.removeFromThetaAndInsertInLambda(IRTask)

Specified by:
removeFromThetaAndInsertInLambda in interface IThetaLambdaTree
Returns:
true if it succeeds

removeFromThetaAndInsertInLambda

public boolean removeFromThetaAndInsertInLambda(IRTask task)
Specified by:
removeFromThetaAndInsertInLambda in interface IThetaLambdaTree

insertInOmega

public boolean insertInOmega(IRTask rtask)
Specified by:
insertInOmega in interface IThetaOmegaTree
Returns:
true if the insertion is successful.

removeFromOmega

public boolean removeFromOmega(IRTask task)
Specified by:
removeFromOmega in interface IThetaOmegaTree
Returns:
true if the removal is sucessful.

removeFromOmegaAndInsertInLambda

public boolean removeFromOmegaAndInsertInLambda(IRTask task)
Description copied from interface: IThetaOmegaTree
Removes task from Omega, and insert it in Lambda.

Specified by:
removeFromOmegaAndInsertInLambda in interface IThetaOmegaTree
Returns:
true if the operation is successful.

getNbOmegaTasks

public int getNbOmegaTasks()

insertInTheta

public boolean insertInTheta(ITask task)
Description copied from interface: IThetaTree
insert the task into the tree (optional operation). If some additional information is needed, it throws an UnsupportedOperationException and you should use IThetaTree.insertInTheta(IRTask)

Specified by:
insertInTheta in interface IThetaTree
Returns:
true if it succeeds

insertInTheta

public final boolean insertInTheta(IRTask rtask)
Description copied from interface: IThetaTree
insert the task into the tree.

Specified by:
insertInTheta in interface IThetaTree
Returns:
true if it succeeds

removeFromTheta

public final boolean removeFromTheta(ITask task)
Specified by:
removeFromTheta in interface IThetaTree


Copyright © 2012. All Rights Reserved.