Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Branching on IloRanges

    Posted 05/16/13 09:26 AM

    Originally posted by: 4D3U_Andrea_Peano


    Hello,

    I would implement a branching policy by adding a set of constraints, rather than by changing the bounds of a single variable.

    The BranchCallback has this method:

    protected IloCplex.NodeId makeBranch(IloRange rng, double objestimate,java.lang.Object data)

    So, I implemented a branch callback that uses it. In particular, I defined a new range by means of the main CplexModeler instance (the one used to build the main MILP model):

    IloRange r=model.addEq(expr, 0.0);

    Is that the right way to make this type of branching policy? Unfortunately, I did not find any example about the branching on ranges.

     

    Thank you,

    Andrea

     

    EDITED:

    One should use the method model.eq, instead of model.addEq, am I right?


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Branching on IloRanges

    Posted 05/16/13 09:45 AM

    No, that is wrong. What you need to do in your callback's main() function is something like this:

    protected void main() throws IloException {
       makeBranch(cplex.eq(expr, 0.0), getObjValue());
    }

    That will create a new branch that is defined by the additional constraint expr==0. Note that I used function eq() and not function addEq()!


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Branching on IloRanges

    Posted 05/16/13 09:49 AM

    Originally posted by: 4D3U_Andrea_Peano


    Thank you Daniel.

    Now it works very well!


    #CPLEXOptimizers
    #DecisionOptimization