Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Profiling

    Posted 09/28/11 05:11 PM

    Originally posted by: SystemAdmin


    Dear Forum,

    I have a model using CP to solve a(large scale) scheduling problem. For some instances of considerable size I can get the solution in a reasonable and searching hundreds branches per second. On the other hand for other instances smaller than the first one my search "freezes" after some time. It begin with hundreds of branches per second and after some time executing it just deal with three or four branches per second! I'm using the "restart" option as a search strategy and can't realize the reason for such behavior. I'm figuring if it can be related to some constraints and would like to know where each node of search is spending time. The profiler of OPL is not helping me with this issue. Is there another option for profiling or debug my model? I'm running OPL 12.2

    Sincerely
    Tiago
    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Profiling

    Posted 09/30/11 08:08 AM

    Originally posted by: SystemAdmin


    Hello,

    It is hard to say without knowledge of your model what exactly is the problem. However quite sure that what you experience is a long "ping-pong" propagation between multiple constraints.
    Here are two guesses what may help you. You may try each one separately or both together.

    Tip 1: Use reasonable scheduling horizon
    When you declare an interval variable, it pays of to limit maximum end time because the default one is too big. In OPL, instead:
    
    dvar interval foo;
    

    do:
    
    dvar interval foo in 0..1000;
    

    where 1000 is some reasonable number (you may also compute it from the input data).

    Tip 2: Increase PrecedenceInferenceLevel parameter
    By increasing value of this parameter to "Medium" or "Extended", you can force CP Optimizer to use more powerful algorithms to propagate precedences. They take more time, however they can detect fail sooner (especially if there is a propagation cycle) and this way they can save considerable number of time. In OPL, you can change this parameter the following way:
    
    execute 
    { cp.PrecedenceInferenceLevel = 
    "Extended"; 
    }
    


    If the tips above do not help you, please let us know some more details about your problem.

    Best regards, Petr
    #CPOptimizer
    #DecisionOptimization