Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Get values during branch & cut [JAVA]

    Posted 06/14/16 09:28 AM

    Originally posted by: LilTiti


    Hi,

    In order to increase the branch & cut resolution speed, I have a greedy algorithm that build an integer solution from the LP relaxation solution. I already use this algorithm before the branch & cut starts, as a MIPStart for CPLEX.

    I want to use this algorithm during the branch & cut, with a HeuristicCallback. The idea is to build an integer solution at each node from the relaxation of sub-problems.

    The problem is that in my algorithm, I have to access the variables values (values given by the LP relaxation). But I can't access these values during branch & cut, it shows an exception because CPLEX did not solve the sub problem yet. 

    I have no idea how I can manage this, I tried calling solve() method before my algorithm in my callback, but it seems to take effect at the end of the callback I think. Any idea ?

    Thanks


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Get values during branch & cut [JAVA]

    Posted 06/14/16 02:28 PM

    Inside a HeuristicCallback, you can call getValue() and getValues(), which HeuristicCallback inherits from ControlCallback. Note that you call them without prefixing the name of MIP instance. In other words, if you declare your problem with

    IloCplex cplex = ...;

    then you use "cplex.getValue(...)" to fetch a variable value after the call to cplex.solve() has completed, but you use just "getValue(...)" inside the callback.


    #CPLEXOptimizers
    #DecisionOptimization