Module org.maxicp

Class ThetaLambdaTree

java.lang.Object
org.maxicp.cp.engine.constraints.scheduling.ThetaLambdaTree

public class ThetaLambdaTree extends Object
Data Structure described in Global Constraints in Scheduling, 2008 Petr Vilim, PhD thesis See The thesis.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    int
     
    int
     
    void
    insertLambda(int activityIndex, int ect, int dur)
    Insert an activity in the lambda set
    void
    insertTheta(int activityIndex, int est, int dur)
    Insert an activity in the theta set
    void
    moveFromThetaToLambda(int activityIndex)
    Move an activity from the theta set to the lambda set.
    void
    remove(int activityIndex)
    Remove activity from the theta set or lambda set
    void
    Remove all the activities from this theta-tree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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-1
      est - earliest completion time
      dur - 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-1
      ect - earliest completion time
      dur - 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()