Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can Python use the CP optimizer extensions?

    Posted 03/19/19 08:12 AM

    Originally posted by: beyondzhao


    From the website of CP optimizer, https://www.ibm.com/support/knowledgecenter/SSSA5P_12.5.1/ilog.odms.cpo.help/CP_Optimizer/Advanced_user_manual/topics/advcpoptimizer.html, I learned something useful about the cp optimizer extensions. But the version that I use is Python, namely docplex.cp. 

    I just want to know whether it's possible to use CP Optimizer extensions in Python. And how to implement same functions such as defining a new propagator, writing goals, and so on.


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Can Python use the CP optimizer extensions?

    Posted 03/19/19 01:32 PM

    Originally posted by: Olivier OUDOT


    Hello Xiqiang,

    Python interface to CPO is limited to the modeling functions, and more generally to all what can be exported in a CPO file format.

    All functions that you are talking about have to be implemented as "callbacks" that are called from the solver. These are available from the native C++ interface, but not from Python.

    Hope this helps.


    #CPOptimizer
    #DecisionOptimization


  • 3.  Re: Can Python use the CP optimizer extensions?

    Posted 03/19/19 10:42 PM

    Originally posted by: beyondzhao


    Hi Olivier, 

    Thanks for your reply.

    Does you mean that it's impossible to custom steps of search algorithms in Python?

    Is there any other way defineing a new propagator in Python? Or I have to switch to C++ interface?


    #CPOptimizer
    #DecisionOptimization


  • 4.  Re: Can Python use the CP optimizer extensions?

    Posted 03/20/19 05:57 AM

    Originally posted by: Olivier OUDOT


    Hello Xiqiang,

     

    Yes, it is what I mean. You can do that only in C++ and Java, C++ being the more complete and powerful API.

    Anyway, it is usually not a good idea to do that because it avoids solver to use existing or future specific enhancements on your model. 

    Did you have a look to Search Phases that may help you to solve your problem ? They are available in Python using modeling function search_phase().

     


    #CPOptimizer
    #DecisionOptimization