Originally posted by: EdKlotz
>
> Ed,
> thanks for your comments.
> I am kinda familiar with the things you mentioned, perhaps not as good as you ;)
> The thing is that what I am thinking of is branching on objects more general than SOSs rather than hyperplanes.
>
> Think that I identify part of the model to be suitable for branching then I also introduce the branching rule.
>
> Let say I search for best 3d cube with some object. I need an incumbent to be a 3-d cube but I also know that every branch is a cube which has particular Hamming distance to the current incumbent in terms of the distance between the incidence matrices (I dont know why when I get to this point I always remember local branching of Andrea Lodi).
>
> Now, I need to have a branching system where I declare the object to branch on and also the branching rule. Once the incumbent is detected I can perhaps add some optimality cuts or perhaps some more information to cut off the unnecessary parts and accelerate the convergence.
>
> I dont know if it is understandable enough.
Well, CPLEX expects you to provide it with a mathematical programming model.
So, you won't be able to express a 3d cube model explicitly to CPLEX. Now,
if each branch in your cube problem maps to some sort of branch in an associated
MIP, you might be able to make use of CPLEX's branch callback functionality
to implement your model. For example, each branch on one of your objects might
correspond to setting a collection of binary or integer variables to particular
values. But, in such cases, you would need to make sure that the possible branches correspond to all possible values of those integer variables; otherwise
the branch and bound algorithm won't converge. In other words, as an example,
if you have an integer variable x with domain [0,10], you cannot just branch on
x <= 2 and x >= 8. You need other branches that cover the remaining domain
values [3,7].
You might also want to look at some of the modeling objects available in ILOG
CP Optimizer that are not available in CPLEX. Examples include the IloPack and
IloAllDiff constraints. Those or more elaborate constraints that CPLEX doesn't
currently extract. So, they offer you additional discrete modeling objects that
typically translate into multiple integer variables and constraints when you
linearize them in a way that CPLEX can accept.
For example, let's consider the IloAlldiff constraint.
Constructor Summary
public IloAllDiff(const IloEnv env, const IloIntVarArray vars, const char * name=0)
So, in CP-Optimizer, you just input an array of integer variables, and
IloAllDiff constrains them to take on unique values relative to the other
integer variables in the array. CP-Optimizer branches on this constraint;
at any node in the search tree where the variables in the array don't satisfy
the AllDiff constraint, it can alter one or more of the variables to try to
satisfy the constraint. That is a branching step. As long as it branches
in a manner that doesn't miss any possible solutions, the algorithm will terminate
eventually with an optimal solution or proof of infeasibility.
Now, you could implement AllDiff in CPLEX in a couple of ways. First, you could
just provide a linearized representation of the AllDiff constraint. In other
words, for each integer variable, associate some binary variables, then add some
constraints that relate the integer variable to the binaries in a way that each
different set of binary values gives the integer variable a different integral
value within it's domain. Or, you could skip the linearization and create your
own branch callback function that processed the AllDiff directly. You would make
your own branching rules, and you will be responsible to ensure that your
branching rules don't compromise the ability of branch and bound to converge.
Of course, I would only recommend either of these approaches if you had first
tried CP-Optimizer (which now comes as part of CPLEX Optimization Studio, so
doesn't involve any additional cost), and found that you were not getting the
performance you needed from it.
Summarizing, when you have some sort of discrete object that doesn't match any of
the discrete objects (integer variables, SOSs, indicator constraints, IloIfThen,
IloPiecewiseLinear, etc.) that CPLEX explicitly supports, you can either
1) linearize it. But, linearizations like this may lead to weak formulations.
2) create your own branching callback that relates directly to that object.
3) see if CP-Optimizer provides additional discrete objects that help you model
your discrete object. If so, this will save you time from having to formulate
your own branching rules.
Ed
#CPLEXOptimizers#DecisionOptimization