Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
  • 1.  CP optimizer - opposite of no_overlap

    Posted Mon March 21, 2022 03:49 PM

    Hi, I am using python for CP solving.
    I would like to know if there is constraint that does the opposite of no_overlap.
    This will be like
    overlap(interval, arr, n)
    interval - single interval variable
    arr - array of interval variables
    n - positive integer less than length of arr

    this will mean that atleast n interval variables from arr overlap in the interval of interval

    This is for a situation in job scheduling when a job is not possible to be scheduled on a machine because there are already n higher priority jobs.



    ------------------------------
    Prakash Gawas
    ------------------------------

    #DecisionOptimization


  • 2.  RE: CP optimizer - opposite of no_overlap

    Posted Tue March 22, 2022 02:51 AM
    Same question at https://or.stackexchange.com/questions/8112/opposite-of-no-overlap-constraint-in-docplex-for-cp/8113#8113

    In OPL I would write

    using CP;
    
    int N=4;
    int n=2;
    dvar interval itvs;
    dvar interval arr[1..N];
    
    subject to
    {
      (sum(i in 1..N) (1<=overlapLength(itvs,arr[i])))>=n;
    }​

    and the same can be done with all APIs



    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------