Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Search phase ordering

    Posted 10/03/09 01:28 AM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Hi,

    I'm working with search phases over sequence variables. I've split up my interval variables on non-intersectioning sequence sets, and then ordered such sequences to define a searching strategy using CP. Something like this:


    cp.searchPhases(
      cp.factory.searchPhase(sequenceA),
      cp.factory.searchPhase(sequenceB),
      ...,
      cp.factory.searchPhase(sequenceZ));


    After that, I tried reversing the sequences order, I mean doing this:

    cp.searchPhases(
      cp.factory.searchPhase(sequenceZ),
      ...,
      cp.factory.searchPhase(sequenceB),
      cp.factory.searchPhase(sequenceA));


    And the result was the same in all possible ways: objective function value, number of branches and processing time for the first solution found for any instance given.

    I double checked that all sequences are non-empty and that no interval variable is shared among any two of them.

    Am I using the search phase specification the right way?
    Is there any reasoning done by CP engine on pre-processing that might affect the results?

    TIA for any possible hint,
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Search phase ordering

    Posted 10/05/09 08:59 PM

    Originally posted by: SystemAdmin


    [pvilim said:]

    Hello Tiago.

    Yes, from the code snippet you give it seems you're using the search phases right. However without data I cannot explain why it behaves exactly the same. Could you send me the model and its data so I can analyze the problem to petr_vilim (at) cz (dot) ibm (dot) com?

    Note that search phase on a sequence decides only relative positions of the tasks in the sequence. It does not set start and end dates. If intervals are already ordered in the sequence then the phase is skipped. Do you post noOverlap constraint on all these sequences?

    Petr
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Search phase ordering

    Posted 10/05/09 09:14 PM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Hi Petr,

    Actually, I'm not using the noOverlap predicate for those sequences I've mentioned above.

    My intention using search phases is to determine that a given interval present on a sequence A should be instatiated before any interval present on a sequence B, for example. Is that possible without using noOverlap?

    TIA,
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Search phase ordering

    Posted 10/05/09 09:39 PM

    Originally posted by: SystemAdmin


    [pvilim said:]

    Hello Tiago.

    In this case, you should use search phases on arrays of intervals, not on sequences. See sched_square example delivered with CP Optimizer. Here is a part of it:


    ....                                                                                                                                                                               

    dvar interval x[s in Squares] in 0..SizeSquare size Size[s];                                                                                                                   
    dvar interval y[s in Squares] in 0..SizeSquare size Size[s];                                                                                                                   

    ...
                                                                                                                                                                                   
    execute {
      var f = cp.factory;
      cp.setSearchPhases(f.searchPhase(x), 
                        f.searchPhase(y));
    };


    The search phase on sequence variable is intended to be use with noOverlap constraint. With noOverlap constraint the search phase decides relative positions of the intervals, i.e., which one executes first, which one second etc. Without noOverlap, solution of a sequence variable is one of the permutations of the intervals, but this permutation doesn't have any influence on the start/end times of these intervals. Therefore the behavior you see is expected.

    Petr
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: Search phase ordering

    Posted 10/06/09 04:18 PM

    Originally posted by: SystemAdmin


    [thiago.serra said:]

    Ok,I will try that.

    Thank you for your answers, Petr.
    #DecisionOptimization
    #OPLusingCPOptimizer