Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can I use two callback functionalities together??

    Posted 02/11/18 10:56 PM

    Originally posted by: prasenjit mandal


    I am using CPLEX C++ concert technology. 

     

    Can I use two callback functionalities, e.g.- UserCutCallback and HeuristicCallback together and call them from main() function?


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Can I use two callback functionalities together??

    Posted 02/12/18 02:19 AM

    As long as the callbacks have different types you can use multiple callbacks at the same time. So using UserCut and Heuristic callback at the same time is fine.

    I am not clear what you mean by "call them from main() function". You never invoke a callback directly. Can you please elaborate?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Can I use two callback functionalities together??

    Posted 02/12/18 01:29 PM

    Originally posted by: prasenjit mandal


    Please find the following schema of the source code:

    On the top of the main function, I declare two callback functionalities:

     

    ILOUSERCUTCALLBACK (UserCallback, ..) {

    }

     

    ILOHEURISTICCALLBACK1 (Heuristic,..) {

    }

     

    From main() function I can call both of them like the following:

     

    int main() {

     

                   /* Body*/

     

                   cplex.use(UserCallback(env,....,));

                   cplex.use(Heuristic(env,....));

     

    }

     

     

     

    Actually, I am using user cuts at the root node.

    After all the cuts being exhausted, I want to use the values of the dual variables and reduced cost values to find a better upper bound.

     

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Can I use two callback functionalities together??

    Posted 02/12/18 02:02 PM

    This code fragment looks perfectly legal. You are not invoking any callback, just instantiating it and passing the callback instance to CPLEX. CPLEX will then invoke the callbacks in the appropriate place.


    #CPLEXOptimizers
    #DecisionOptimization