Module org.maxicp

Class NoOverlapLeftToRight

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

public class NoOverlapLeftToRight extends Object
  • Field Details

    • startMin

      public final int[] startMin
    • endMax

      public final int[] endMax
  • Constructor Details

    • NoOverlapLeftToRight

      public NoOverlapLeftToRight(int nMax)
  • Method Details

    • filter

      public NoOverlapLeftToRight.Outcome filter(int[] startMin, int[] duration, int[] endMax, int n)
      Applies all the filtering algorithms Overload Checker, Not-Last, Detectable Precedence in a loop until a fix point is reached, or an inconsistency is detected. Those algorithms are the ones of Peter Vilim's thesis.
      Parameters:
      startMin - the minimum start time of each activity
      duration - the duration of each activity
      endMax - the maximum end time of each activity
      n - a number between 0 and startMin.length-1, is the number of activities to consider (prefix), The other ones are just ignored
      Returns:
      the outcome of the filtering, either NO_CHANGE, CHANGE or INCONSISTENCY. If a change is detected, the time windows of the instance variables (startMin and endMax) are reduced.
    • update

      protected void update(int[] startMin, int[] duration, int[] endMax, int n)
    • overLoadChecker

      protected boolean overLoadChecker()
      Returns:
      false if the overload checker detects an overload, true if no overload is detected
    • detectablePrecedence

      protected boolean detectablePrecedence()
      Returns:
      true if one domain was changed by the detectable precedence algo
    • notLast

      protected boolean notLast()
      Returns:
      true if one domain was changed by the not last algo
    • edgeFinding

      protected boolean edgeFinding()
      Returns:
      true if one domain was changed by the edge finding algo