Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Python CPLEX incumbent callback

    Posted 02/10/11 12:59 PM

    Originally posted by: Tnash310


    Has anyone tried to use the incumbent callback in Python? I get the following error when I tried to register the callback.

    File "/home/arulselv/python/x86_debian4.0_4.1/cplex/callbacks.py", line 1565, in __init__
    self._cb_set_function = _internal._procedural.setincumbentcallbackfunc
    AttributeError: 'module' object has no attribute 'setincumbentcallbackfunc'

    This specific callback is not used in the example files I have seen. The above error seems to be present in _init__ of the IncumbentCallback class in callbacks.py. Does it mean that I have to set some parameters before I register? I can't recall doing this in C++. I seem to be goofing up somewhere :(

    Any help is appreciated. Thanks in advance.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Python CPLEX incumbent callback

    Posted 02/10/11 01:45 PM

    Originally posted by: Tnash310


    It does look like the setincumbentcallbackfunc was not defined in _internal/_procedural.py file. I defined this and now it is registering the callback properly. I don't know if this has any repercussions.

    We'll see :)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Python CPLEX incumbent callback

    Posted 02/11/11 01:33 AM

    Originally posted by: SystemAdmin


    Hello,

    This was a known issue in an early version of the CPLEX Python API. It has been fixed since CPLEX version 12.2. While the fix that you implemented yourself should allow you to use an incumbent callback, there are several other bug fixes in the more recent versions of CPLEX. If you can upgrade to the latest version, I encourage you to do so.

    Thanks,

    Philip Starhill
    CPLEX Research Engineer
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Python CPLEX incumbent callback

    Posted 02/11/11 05:16 AM

    Originally posted by: Tnash310


    Hello Phillip,
    Thanks for the reply. I will get upgraded.

    Regards,
    Ashwin
    #CPLEXOptimizers
    #DecisionOptimization