Decision Optimization

Decision Optimization

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

 View Only
  • 1.  search phase with pre-ordering of variables

    Posted Mon July 04, 2011 02:24 PM

    Originally posted by: davidoff


    Hello

    In order to rank intervals in my search phase, I was thinking using sorted aliases of my intervals

    
    dvar interval bloc[pipes,cycles,Blocs] ...;
    //the initial intervals   tuple Rank 
    { Pipe c; 
    
    int cycle; Bloc b; 
    } sorted 
    {Rank
    } ranks = 
    {<c,cy,b> | c in pipes, cy in cycles, b in Blocs
    }; dvar interval rankBloc[r in ranks] = bloc[r.c,r.cycle,r.b];
    //rankBloc intervals are aliases but sorted
    


    Here is the log of cp

    
    !   Branches  Non-fixed                Branch decision 1 000      9 439       on bloc(
    {1002
    })(4)(
    {,2
    }) 2 000      6 740       on bloc(
    {1012
    })(1)(
    {,3
    }) 3 000      6 739       on bloc(
    {1003
    })(3)(
    {,2
    }) 4 000      5 747       on bloc(
    {1004
    })(4)(
    {,0
    }) 5 000      8 509       on bloc(
    {1010
    })(3)(
    {,2
    })  F 6 000      5 874       on bloc(
    {1017
    })(5)(
    {,2
    }) 7 000      5 686       on bloc(
    {1016
    })(4)(
    {,2
    })  F 8 000      8 483       on bloc(
    {1015
    })(2)(
    {,2
    }) 9 000      8 467       on bloc(
    {1017
    })(1)(
    {,3
    }) 10 000      5 351       on bloc(
    {1000
    })(2)(
    {,2
    }) 11 000      8 573       on bloc(
    {1006
    })(3)(
    {,2
    }) 12 000      7 507       on bloc(
    {1018
    })(5)(
    {,3
    })  F 13 000      7 584       on bloc(
    {1014
    })(3)(
    {,2
    })  F 14 000      7 590       on bloc(
    {1011
    })(5)(
    {,3
    }) 15 000      7 567       on bloc(
    {1016
    })(1)(
    {,3
    }) 16 000      5 544       on bloc(
    {1015
    })(4)(
    {,3
    }) 17 000      5 503       on bloc(
    {1011
    })(5)(
    {,2
    }) 18 000      5 503       on bloc(
    {1011
    })(5)(
    {,1
    }) 19 000      7 567       on bloc(
    {1017
    })(5)(
    {,3
    }) 20 000      7 584       on bloc(
    {1020
    })(3)(
    {,0
    })
    


    I'm surprised to find out that my order seems not to be respected : for instance, we branch on bloc with Pipe 1003 after Pipe 1012.
    Is it an expected behavior ?

    Thanks

    David
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: search phase with pre-ordering of variables

    Posted Tue July 05, 2011 06:27 AM
    Hi

    have you used any search phase?
    If yes please give some info about it.

    Regards
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: search phase with pre-ordering of variables

    Posted Tue July 05, 2011 06:36 AM

    Originally posted by: davidoff


    Yes. That was the purpose of resorting the variables with the alias rankBloc

    
    var f = cp.factory; cp.setSearchPhases( f.searchPhase(rankBloc) );
    

    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: search phase with pre-ordering of variables

    Posted Tue July 05, 2011 08:06 AM
    Hello,

    in documentation IDE and OPL > Optimization Programming Language (OPL) > Language User’s Manual > IBM ILOG Script for OPL > Using IBM ILOG Script in constraint programming > Defining search phases

    we have

    This search phase fixes the start and end values of interval variables in an unidirectional manner, starting to fix first the intervals that will be assigned a small start or end value.

    If what you want to do is to tell which interval should be chosen first then what you could do is write a dvar array that will have presenceOf values of the intervals and then you use a search phase on this dvar array

    Regards
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: search phase with pre-ordering of variables

    Posted Tue July 05, 2011 04:54 PM

    Originally posted by: davidoff


    Thanks Alex
    #DecisionOptimization
    #OPLusingCPOptimizer