Decision Optimization

Expand all | Collapse all

DoCplex CP - Manual domain pruning/Bounds/Global Constraints

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

    Posted 18 days ago
    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
    ------------------------------


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

    Posted 17 days ago
    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 17 days ago
    Got it. Thanks!

    Louis

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