Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Callbacks OPL API

    Posted 01/28/10 10:48 AM

    Originally posted by: Zhouwei


    Is it possible to implement callbacks using OPL API or from ILOG Script?

    I am aware that it can be done with CPLEX API but am not sure how to do it when the original model is in OPL and is being called from C++,C#, etc. If, it is possible then how can we use abort method to terminate cplex solve process based on user input?

    Thanks!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Callbacks OPL API

    Posted 02/23/10 05:40 AM

    Originally posted by: SystemAdmin


    Yes, it is possible.
    You can use the IloCplex object as if the model was posted using Concert APIs.

    For an example how to create OPL and CPLEX objects, see http://publib.boulder.ibm.com/infocenter/oplinfoc/v6r3/topic/ilog.odms.ide.help/Content/Optimization/Documentation/OPL_Studio/_pubskel/globals/eclipse_and_xplatform/ps_opl1264.html.

    Tschau,
    Frank
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Callbacks OPL API

    Posted 05/12/10 09:46 AM

    Originally posted by: ubrannlund


    I have a solution to this in a separate thread (Aborter missing in oplall) posted today . However, I believe it is a bit unsatisfactory and would appreciate comments to it.

    /Ulf
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Callbacks OPL API

    Posted 05/12/10 10:48 AM

    Originally posted by: Zhouwei


    What I did was: I added 'Abort()' in the callback. This stops the execution of the CPLEX.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Callbacks OPL API

    Posted 05/12/10 01:25 PM

    Originally posted by: ubrannlund


    That is ok. I used to have that solution too. However, my problem was that I solved both LPs and MIPs in the same OPL model. I wanted to use "Dynamic search" for the MIPs. This means I was restricted to use only MIPInfoCallbacks. The other callbacks are incompatible with "Dynamic Search". However, the MIPInfoCallback is never called for the LPs. Therefore, if I wanted to be able to stop in the middle of an LP, I needed the abort function.

    /Ulf
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Callbacks OPL API

    Posted 05/14/10 05:51 PM

    Originally posted by: GuangFeng


    Have you tried to use ContinuousCallback for LPs?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Callbacks OPL API

    Posted 05/17/10 03:17 AM

    Originally posted by: ubrannlund


    Yes. Also continuous callback is not compatible with dynamic search.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Callbacks OPL API

    Posted 05/18/10 12:20 AM

    Originally posted by: GuangFeng


    Maybe you can check Cplex.isMIP property before "using" the callbacks. If isMIP is true, you only MIPInfoCallbacks. If isMIP is false, you use ContinuousCallbacks.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer