Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Troubleshooting CP warm start

  • 1.  Troubleshooting CP warm start

    Posted 07/06/16 10:02 PM

    Originally posted by: JorisK


    CP: 12.6.3
    language: java 8
    OS: linux

    I have an algorithm which computes a solution to an optimization problem. This solution I provide as a starting point to CP optimizer. When I solve my CP problem using multiple workers, the warm-start solution does not show up. Only after a while, the CP log indicates that a solution has found (a solution better than the one I initially provided. Here's the output (no solution has been found before the branching starts):

    ! ----------------------------------------------------------------------------
     ! Minimization problem - 347 variables, 388 constraints
     ! Using starting point solution
     ! SequenceInferenceLevel = Extended
     ! LogPeriod            = 1
     ! TimeLimit            = 600
     ! Initial process time : 0.03s (0.03s extraction + 0.00s propagation)
     !  . Log search space  : 477.8 (before), 477.8 (after)
     !  . Memory usage      : 6.3 MB (before), 7.9 MB (after)
     ! Using parallel search with 8 workers.
     ! ----------------------------------------------------------------------------
     !          Best Branches  Non-fixed    W       Branch decision
                            1        347    1            -
                            1        347    2            -
                            1        347    3            -
                            1        347    4            -
                            1        347    5            -
                            1        347    6            -
                            1        347    7            -
                            1        347    8            -
                            2        347    1   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    2   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    3   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    4   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    5   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    6   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    7   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            2        347    8   F   on assignment_v4_3rdDiv(TENTON)_(s9,d5)
                            3        347    1            -
                            3        347    2            -
                            3        347    3            -
                            3        347    4            -
     ! Time = 0.33s, Explored branches = 8000, Memory usage = 64.6 MB
     !          Best Branches  Non-fixed    W       Branch decision
                            3        347    5            -
                            3        347    6            -
                            3        347    7            -
                            3        347    8            -
                            4        286    1       on start_depot
    ...
    

     

    Whenever I switch to 1 worker (IloCP.IntParam.Workers=1), I get the following output:

     

    ----------------------------------------------------------------------------
     ! Minimization problem - 347 variables, 388 constraints
     ! Using starting point solution
     ! SequenceInferenceLevel = Extended
     ! LogPeriod            = 1
     ! Workers              = 1
     ! TimeLimit            = 600
     ! Initial process time : 0.03s (0.01s extraction + 0.01s propagation)
     !  . Log search space  : 477.8 (before), 477.8 (after)
     !  . Memory usage      : 5.4 MB (before), 7.0 MB (after)
     ! Using sequential search.
     ! ----------------------------------------------------------------------------
     !          Best Branches  Non-fixed            Branch decision
                            1        347                 -
     *           486        1 0.03s  
    

                       -

    Here 486 is indeed the solution of my warm start. Is there a reason why this solution does not show up when using multiple threads?

    As far as I can tell, there are usually 2 reasons why a warmstart is ignored:
    a. the provided solution is infeasible
    b. not all variables have been fixed
    To rule out (a), I simply fix all variables to the values in the initial solution; if the initial solution is infeasible, then the resulting CP model with fixed variables must be infeasible as well. Here's the output of CP optimizer (IloCP.IntParam.LogPeriod=1, IloCP.IntParam.Workers=1) on the model with fixed variables:

     

    ! ----------------------------------------------------------------------------
     ! Minimization problem - 347 variables, 388 constraints
     ! SequenceInferenceLevel = Extended
     ! LogPeriod            = 1
     ! Workers              = 1
     ! TimeLimit            = 600
     ! Initial process time : 0.01s (0.01s extraction + 0.00s propagation)
     !  . Log search space  : 0.0 (before), 0.0 (after)
     !  . Memory usage      : 3.0 MB (before), 3.2 MB (after)
     !  . Variables fixed   : 5
     ! Using sequential search.
     ! ----------------------------------------------------------------------------
     !          Best Branches  Non-fixed            Branch decision
                            1 9223372036854775807                 -
     *           486        1 0.01s                      -
                 486        2 9223372036854775807                 -
                 486        3          0        F        -
     ! ----------------------------------------------------------------------------
     ! Search terminated normally, 1 solution found.
     ! Best objective         : 486 (optimal - effective tol. is 0)
     ! Number of branches     : 3
     ! Number of fails        : 3
     ! Total memory usage     : 4.7 MB (3.7 MB CP Optimizer + 1.0 MB Concert)
     ! Time spent in solve    : 0.01s (0.00s engine + 0.01s extraction)
     ! Search speed (br. / s) : 300.0
     ! ----------------------------------------------------------------------------
    

    So it finds a solution with an objective equal to the initial solution, so my initial solution is not infeasible. What puzzles me is the output: it says non-fixed=9223372036854775807 which seems like an incorrect number (I have far less variables than this...). Furthermore, it says: "Number of branches=3" but no branching decisions are being shown. So I wonder what's going on.       


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Troubleshooting CP warm start

    Posted 07/11/16 05:28 AM

    Originally posted by: Petr Vilím


    Hello Joris,

    the behavior you report is indeed strange. Unfortunatelly I can't tell what is the problem just from those logs.

    Could you please send me (petr_vilim (at) cz.ibm.com) your problem in .cpo file format (using dumpModel function)? And please send me also your starting point (in whatever text format you prefer).

    Thanks a lot! Petr


    #CPOptimizer
    #DecisionOptimization