Decision Optimization

 View Only
  • 1.  DoCplex CP - Manual domain pruning/Bounds/Global Constraints

    Posted Mon April 19, 2021 11:39 AM
    Hi,

    I would like to confirm if there is a way to reduce the domain of variables or improve either primal or dual bound during the CP search manually (e.g via a callback) using the DoCplex library in Python. 

    Also, does DoCplex support creating custom global constraints?

    What I would like to do is to solve a linear program with a set of variables during the CP search which will reduce the domain of another set of variables drastically. Any help would be appreciated!

    Best,
    Louis




    ------------------------------
    Louis Luo
    ------------------------------

    #DecisionOptimization


  • 2.  RE: DoCplex CP - Manual domain pruning/Bounds/Global Constraints

    Posted Tue April 20, 2021 06:40 AM
    Hi Louis,

    This cannot be done in Python. Callbacks in CP Optimizer do not permit to change the state of the engine (like reducing the domain of some variables).

    You need to write a custom constraint. Custom constraints are available in C++ only.

    ------------------------------
    Philippe Laborie
    ------------------------------



  • 3.  RE: DoCplex CP - Manual domain pruning/Bounds/Global Constraints

    Posted Tue April 20, 2021 09:59 AM
    Got it. Thanks!

    Louis

    ------------------------------
    Louis Luo
    ------------------------------