java.lang.Object
org.maxicp.cp.engine.constraints.scheduling.ThetaLambdaTree
Data Structure described in
Global Constraints in Scheduling, 2008 Petr Vilim, PhD thesis
See The thesis.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThetaLambdaTree(int size) Creates a theta-tree able to store the specified number of activities, each identified as a number between 0 and size-1. -
Method Summary
Modifier and TypeMethodDescriptionintintintvoidinsertLambda(int activityIndex, int ect, int dur) Insert an activity in the lambda setvoidinsertTheta(int activityIndex, int est, int dur) Insert an activity in the theta setvoidmoveFromThetaToLambda(int activityIndex) Move an activity from the theta set to the lambda set.voidremove(int activityIndex) Remove activity from the theta set or lambda setvoidreset()Remove all the activities from this theta-tree
-
Field Details
-
UNDEF
protected static final int UNDEF- See Also:
-
-
Constructor Details
-
ThetaLambdaTree
public ThetaLambdaTree(int size) Creates a theta-tree able to store the specified number of activities, each identified as a number between 0 and size-1. The activities inserted in a theta tree are assumed to be of increasing earliest start time. That is activity identified as i must possibly start earlier than activity i+1.- Parameters:
size- the number of activities that can possibly be inserted in the tree
-
-
Method Details
-
reset
public void reset()Remove all the activities from this theta-tree -
insertTheta
public void insertTheta(int activityIndex, int est, int dur) Insert an activity in the theta set- Parameters:
activityIndex- assumed to start at 0 from left to right up to size-1est- earliest completion timedur- duration
-
insertLambda
public void insertLambda(int activityIndex, int ect, int dur) Insert an activity in the lambda set- Parameters:
activityIndex- assumed to start at 0 from left to right up to size-1ect- earliest completion timedur- duration
-
moveFromThetaToLambda
public void moveFromThetaToLambda(int activityIndex) Move an activity from the theta set to the lambda set. Of course this activity must be present in the theta set (not verified).- Parameters:
activityIndex- assumed to start at 0 up to size-1
-
remove
public void remove(int activityIndex) Remove activity from the theta set or lambda set- Parameters:
activityIndex- assumed to start at 0 up to size-1
-
getThetaEct
public int getThetaEct() -
getThetaLambdaEct
public int getThetaLambdaEct() -
getResponsibleForThetaLambdaEct
public int getResponsibleForThetaLambdaEct()
-