Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Heuristic Callback only entered randomly

    Posted Thu April 17, 2014 02:26 PM

    Originally posted by: MarkusS.


    Hi,

    in the manual, it is specified, that (at least) at the root node, the heuristic callback should be entered everytime before adding cuts. So when I also have a lazy and a usercut callback, I would expect that everytime after/before executing the cut-callbacks, CPLEX should go into the heuristic callback. However, it often happens that the cut-callbacks are called 10 times and more in a row, and then only we go into the heuristic callback. This is very bad in my case, since my separation routines are very time-consuming and I would be able to construct a really good heuristic solution based on the LP-values I can read in the cut-callbacks.

    Right now, I am dealing with the situation by constructing the heuristic solution in the cut callbacks and store it in some pointer, which the heuristic callback can also access (something like this was suggested here somewhere). This is, however, not very satisfying, since it can take such a long time, until the heuristic callback is entered (and the thing with the pointer is maybe also not very thread-safe, when running CPLEX with more than one thread).

    So is it normal, that the heuristic callback is entered only very randomly, or may I have set some bad parameter setting? If it is normal, is there a better way to deal with this situation? (I am using C++)

    Thank you for your help!

    Markus

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Heuristic Callback only entered randomly

    Posted Tue April 22, 2014 12:47 PM

    At the root node, every invocation of the heuristic callback should be followed by an invocation of the user cut callback (unless optimality is proved between the two).

    Lazy constraint callbacks however are very different. They are not invoked on a regular basis but only when a feasible solution is found. It can easily happen that CPLEX heuristics find a bunch of feasible solutions in a row and will therefore invoke the lazy constraint callback multiple times before CPLEX gets back to generating cuts.

    Is it really the user cut callback that gets invoked multiple times before the heuristic callback is called or is it only the lazy constraint callback that is invoked without interleaving calls to the heuristic callback?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Heuristic Callback only entered randomly

    Posted Tue April 22, 2014 01:20 PM

    Originally posted by: MarkusS.


    I have made some testruns, what seems to happen is user cut followed by some lazy constraints, without heuristic after the user cut, is this expected behavior? If I have two consecutive calls to the user cut callbacks, the heuristic callback gets called inbetween, so this seems to be ok.

    I also have some other problems with the heuristic callback, my set solution (using setSolution) does not get accepted sometimes (so CPLEX does somehow seem to check the solution it gets in a heuristic callback, but it does not seems to invoke the lazy constraint callback?). Is there some way to find out why the set solution was rejected? I tried to fix the bounds of all variables in the heuristic callback according to my constructed solution (using setBounds) and then call solve, to get some information, but setBounds gave me an exception 1006.


    #CPLEXOptimizers
    #DecisionOptimization