Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  about setSolution and new bounds

    Posted 12/12/11 12:44 PM

    Originally posted by: LeandroCC


    Dear all,

    I have some large MIPs being solved by CPLEX for which I compute (in parallel) lower and upper bounds. I'd like to make use of that information to make CPLEX find optimal solutions faster.

    I understand I should not add better lower bounds as constraints as CPLEX loses the ability to find good variables to branch.

    I plan using a heuristic callback and the setSolution() function to give CPLEX better solutions (upper bounds) that I computed externally. My questions:

    1) My problem has several variables, each with several indices. Can setSolution() handle several pair of variables/values? Or I have to put all variables into a single vector?

    2) Would you share the information about better lower bounds with the solver? (if so, how?)

    It is a minimization problem, I'm using CPLEX 12.3, c++ (concert).

    Any other ideas are welcome.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: about setSolution and new bounds

    Posted 12/12/11 01:21 PM

    Originally posted by: LeandroCC


    Apparently I can put setSolution inside a loop and call it several times, each for a given vector. Is this correct?

    Another question:

    3) how to control the frequency in which the heuristic callback is applied? Calling it for every node is too much. I'd be OK calling it every 10 seconds or every 1000 nodes... But how?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: about setSolution and new bounds

    Posted 12/13/11 02:20 AM

    Originally posted by: SystemAdmin


    From the reference documentation of HeuristicCallbackI::setSolution() here:
    Do not call this method multiple times. Calling it again will overwrite any previously specified solution.
    

    So calling setSolution() in a loop will most probably not achieve what you are trying to do.

    CPLEX calls your heuristic callback at every node. There is no way to change that. However, you may query the number of nodes that CPLEX already processed when your callback is invoked. To do that use the callback's getNnodes() (or getNnodes64()) function. If the number of nodes processed since the last run of the heuristic is too small then just return from the callback without doing anything.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: about setSolution and new bounds

    Posted 12/13/11 02:17 AM

    Originally posted by: SystemAdmin


    Answer 1): Yes, you have to store all variables in one flat vector.
    Answer 2): At the moment, CPLEX cannot exploit a global lower bound for a minimization problem in general. You should of course check whether your lower bound coincides with the best feasible solution found so far and in that case terminate the search.
    #CPLEXOptimizers
    #DecisionOptimization