Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Heuristic Solution constructed in LazyConstraintCallback

    Posted Fri February 21, 2014 05:45 PM

    Originally posted by: MarkusS.


    Hi,

    as a by-product of my separation routine in LazyConstraintCallback, I find a feasible solution. Is there any (easy) way to get this feasible solution to the heuristic callback or tell it to CPLEX in any other way?

    Thanks,

    Markus


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Heuristic Solution constructed in LazyConstraintCallback

    Posted Sat February 22, 2014 11:39 AM

    The "default" strategy for this is to have a global queue of solutions that is shared between the lazy constraint callback and the heuristic callback. The lazy constraint callback posts solutions to that queue and the heuristic callback pulls solutions from that queue and injects them into CPLEX.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Heuristic Solution constructed in LazyConstraintCallback

    Posted Sat February 22, 2014 04:55 PM

    Originally posted by: MarkusS.


    Ok, this means when I am not in the root-node, it can happen that some LPs can get solved, before the solution gets injected? (since the Heuristic callback only gets called at the end of a node according to the manual?)

    To deal with this, could I write a solve-callback, where I insert a solution from the queue as starting solution?


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Heuristic Solution constructed in LazyConstraintCallback

    Posted Mon February 24, 2014 01:09 AM

    A solve callback with setStart() will not do what you want. The setStart() method in the solve callback sets the starting vector for solving the LP relaxation at the node.

    For a particular node, the heuristic callback is invoked after the lazy constraint and the incumbent callback. So there should be no unexpected LP solves at the current node after the lazy constraint callback did terminate and before the heuristic callback is invoked.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Heuristic Solution constructed in LazyConstraintCallback

    Posted Fri March 14, 2014 07:31 AM

    Originally posted by: MarkusS.


    So should the following happen at the root node, or not (i'm writing "lazy" and so on, in the main method of the respective callback, and I'm checking, if the LP-solution when entering the heuristic callback is integer)?

    *     0+    0                         2481.0000   -33457.0000     1134     ---
    lazy
    lazy
          0     0      536.0000     8     2481.0000      536.0000     1134   78.40%
    heuristic
    non-integral solution in heuristic
    better solution found
    *     0+    0                         1390.0000      536.0000     1134   61.44%
    lazy
    user
    lazy
    lazy
    lazy
          0     0      536.0000    18     1390.0000       User: 4     1146   61.44%
    heuristic
    non-integral solution in heuristic
    better solution found

    Why is there a series of lazy/user calls, without a call to heuristic inbetween? I have set  cplex->setParam(IloCplex::HeurFreq, 1);


    #CPLEXOptimizers
    #DecisionOptimization