Module org.maxicp

Interface CPCumulFunction

All Superinterfaces:
CumulFunction
All Known Implementing Classes:
CPFlatCumulFunction, CPMinusCumulFunction, CPPlusCumulFunction, CPPulseCumulFunction, CPStepAtEndCumulFunction, CPStepAtStartCumulFunction, CPSumCumulFunction

public interface CPCumulFunction extends CumulFunction
CP implementation of a Cumulative Function
Author:
Pierre Schaus, Charles Thomas, Augustin Delecluse
  • Method Summary

    Modifier and Type
    Method
    Description
    flatten(boolean positive)
    Returns a list of all the activities contributing to this cumulative function.
    Returns an IntExpression representing the height of the cumul function at the end of the interval variable given in parameter.
    Returns an IntExpression representing the height of the cumul function at the start of the interval variable given in parameter.
    boolean
    inScope(IntervalVar interval)
    Returns whether the interval var given in parameter contributes to the cumul function
  • Method Details

    • flatten

      List<Activity> flatten(boolean positive)
      Returns a list of all the activities contributing to this cumulative function. Transformations are applied to the activities following the internal AST of the cumul function.
      Parameters:
      positive - A boolean indicating the sign to be applied when flattening the cumul function
      Returns:
      A list of all the flattened activities contributing to this cumulative function.
    • heightAtStart

      CPIntVar heightAtStart(IntervalVar interval)
      Description copied from interface: CumulFunction
      Returns an IntExpression representing the height of the cumul function at the start of the interval variable given in parameter.
      Specified by:
      heightAtStart in interface CumulFunction
      Parameters:
      interval - an IntervalVar
      Returns:
      an int expression representing the height of the cumul function at the start of interval
    • heightAtEnd

      CPIntVar heightAtEnd(IntervalVar interval)
      Description copied from interface: CumulFunction
      Returns an IntExpression representing the height of the cumul function at the end of the interval variable given in parameter.
      Specified by:
      heightAtEnd in interface CumulFunction
      Parameters:
      interval - an IntervalVar
      Returns:
      an int expression representing the height of the cumul function at the end of interval
    • inScope

      boolean inScope(IntervalVar interval)
      Description copied from interface: CumulFunction
      Returns whether the interval var given in parameter contributes to the cumul function
      Specified by:
      inScope in interface CumulFunction
      Parameters:
      interval - an IntervalVar
      Returns:
      a boolean that indicates if interval contributes to the cumul function.