Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Adding constraints at each node of a branching tree

  • 1.  Adding constraints at each node of a branching tree

    Posted Thu July 04, 2013 03:03 AM

    Originally posted by: veronicads


    Good morning!

    I'm solving a mixed-integer problem via branch and cut using both a Lazy Constraint callback (where I add the violated constraints) and a User Cut callback to implement other cuts. I would like to check if there are violated constraints at each node of the branching tree and not only when I find an integer feasible solution, so I added the procedure to check the constraints also in the User Cut callback. But I'm wondering if Cplex always adds the violated inequalities or if it only adds the ones that don't cut off integer-feasible solutions, as I'm inside a User Cut callback. If this is the case, is there a way to add violated constraints at each node? (I'm using Cplex 12.4 with Python)

    Thank you very much for your help!

    Veronica


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Adding constraints at each node of a branching tree

    Posted Thu July 04, 2013 03:25 AM

    CPLEX has no way of telling whether a UserCut would cut off integer solutions or not.

    So it will usually add any violated cut that you specify in the UserCutCallback. You can get a little more control over what CPLEX does with your cuts by using different values from the use_cut enumeration as use arguments to the callback's add() function. The default for this argument is force (0) which forces CPLEX to use the cut.

    In general, in a UserCutCallback you are supposed not to add any cuts that may cut off integer solutions. There is one exception to this rule (and this seems to be what you are doing): if you simultaneously use a LazyConstraintCallback that separates the same cuts then it is fine to also add user cuts that may cut off integral solutions.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Adding constraints at each node of a branching tree

    Posted Thu July 04, 2013 03:49 AM

    Originally posted by: veronicads


    Thank you! Yes, that is exactly what I'm doing.


    #CPLEXOptimizers
    #DecisionOptimization