Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Error in noOverlap fucntion

    Posted Tue August 25, 2015 11:34 AM

    Originally posted by: Mintch Zulitch


    Hi everybody,

    This post is also cross-posted here.

    I'm developing a CPLEX code for a CP model. After defining my parameters, interval variables, sequence variables and transition matrix I'm getting the error below:

    Exception in presolve: Interval Sequence Variable: Arrays 'IntervalVarArray_338' and 'IntArray_339' have not the same size.. Unknown OPL Problem Marker

    and this is the piece of my code containing noOverlap function:

    forall(i in type){ noOverlap(Q[i],S); }

    where Q is the sequence variables and S is the transition matrix. Any help is highly appreciated.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Error in noOverlap fucntion

    Posted Tue August 25, 2015 12:45 PM

    Hi,

    can you post your model and data ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Error in noOverlap fucntion

    Posted Tue August 25, 2015 12:57 PM

    Originally posted by: Mintch Zulitch


    Yes, of course.

    Please see the attachment.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Error in noOverlap fucntion

    Posted Tue August 25, 2015 02:11 PM

    Hi,

    the issue is not in the noOverlap but in the discrepancy between the index and the types of the array of sequences:

    if you write

    dvar

     

    sequence Q[i in type] in all (o in ind_sur , h in ind_room:a[h][i]==i && b[o][i]==i) U[o,h]

    ;

    // types all(k in type) k;

    then you model works fine

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Error in noOverlap fucntion

    Posted Wed August 26, 2015 02:39 AM

    Originally posted by: Mintch Zulitch


    Thanks,

    But how can I link the" type" of surgeries to sequence variables?

    Actually, after eliminating term "types all(k in type) k;" model run, but i didn't return my desired values for the objective and the decision variables.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Error in noOverlap fucntion

    Posted Wed August 26, 2015 03:04 AM

    Hi,

    yes of course, I wanted to show that the noOverlap was not guilty.

    If you write

    dvar sequence Q[i in type]
    in all (o in ind_sur , h in ind_room:a[h][i]==i && b[o][i]==i) U[o,h]
     types all (o in ind_sur , h in ind_room:a[h][i]==i && b[o][i]==i) (o+h);

    then you do not get an error since you have as many elements in the "in" and "types".

    This will help you to fix your model.

    Regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Error in noOverlap fucntion

    Posted Wed August 26, 2015 01:11 PM

    Originally posted by: Mintch Zulitch


    Again thank you so much. It really helped.

    Another question...Is it mandatory to define a sequence variable based on an interval variable which contains the "size" parameter?

    For example, in my case, Q (sequence variable) is defined over U (interval variable) which doesn't contain any "size" parameter.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Error in noOverlap fucntion

    Posted Wed August 26, 2015 01:34 PM

    Hi,

    size is not compulsory.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer