Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  An easy predicate for asserting sequence continuity

    Posted 07/28/08 06:05 PM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Hi folks,

    I was just wondering whether it would be usefull to define a predicate for CP so that the next interval in a sequence always starts right after the last one ended. In the same sense noOverlap states that no two of them can be active at the same time, I´d be like something stating that no interval slice can be left uncovered by the sequence.

    Course there are ways of achieving this right now, but in a more verbose fashion. Also, sometimes it is not even necessary according to what objective function do you have, but sometimes there is no objective function at all.

    Thanks for reading,
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: An easy predicate for asserting sequence continuity

    Posted 07/28/08 09:17 PM

    Originally posted by: SystemAdmin


    [Sylvain said:]

    I don't how you could use predicates to do that but I would suggest the following :

    Once you know the two non-overlapping activities that should be sequenced with no uncovered time period, you could simply equal the variable corresponding to the end time of the first activity for the variable corresponding to the start time of the second activity.

    You could use IfThen constraint or a specific goal (or some other techniques) to do that.
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: An easy predicate for asserting sequence continuity

    Posted 07/28/08 09:25 PM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Possible it is, right the way you said.
    But a specific predicate for a common-place need would help CP engine working faster over such models. Isn´t that?
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: An easy predicate for asserting sequence continuity

    Posted 07/28/08 09:38 PM

    Originally posted by: SystemAdmin


    [phlab said:]

    If I get it well, you would like a constraint stronger than the noOverlap constraint on the sequence that also states that the end of an interval variable has the same value as the start of the next interval variable in the sequence.
    Then, I would suggest to model it as a cumulFunction with a maximal level of 1 (this will model the 'noOverlap' part of the constraint) and a minimal level of 1 (to model the absence of holes in between intervals) over the interval that spans all the intervals in the sequence.

    Something like:


    dvar interval a[i in ...] ...; // Intervals in the sequence
    dvar interval cover;         // Spanning interval
    cumulFunction f = sum(i in ...) pulse(a[i],1);
    // ...
    subject to {
     span(cover, a); // Span constraint
     alwaysIn(f, cover, 1, 1); // no overlap (f<=1) and no "holes" (f>=1)
     // ...
    }


    Hope it helps,
    Philippe

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: An easy predicate for asserting sequence continuity

    Posted 07/29/08 09:48 PM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Yes. It worked very well.

    Still, wouldn´t a predicate for such things be a good feature for a newer version of OPL?

    Thanks a lot for the help.
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 6.  Re: An easy predicate for asserting sequence continuity

    Posted 07/30/08 08:55 PM

    Originally posted by: SystemAdmin


    [phlab said:]

    In ILOG OPL / CP Optimizer, our policy is to keep the modeling language as simple and concise as possible so we resist in adding new modeling features unless there is no existing alternative in the language or the modeling feature is a common one and all alternatives to model it with the existing language are qualitatively worse.

    We have noted your use-case. If it turns out to be a commonly requested feature, then we will consider extending the language (until now, I must admit I have seldom seen such a need).

    Thanks a lot for your interest in ILOG OPL / CP Optimizer.

    Philippe



    #DecisionOptimization
    #OPLusingCPOptimizer