I would like to provide my cp model (cp optimizer 12.5.1+java interface) with a starting point using a heuristically obtained solution. I hope to achieve that:
-starting from a good solution improves the convergence speed of the cp optimizer
-cp optimizer might be able to perform some additional constraint propagation, thereby cutting off solutions which would lead to weaker solutions?
However, it is not entirely clear how to produce such a starting point from my heuristic solution. So the basic start is to create a new IloSolution:
1. Next I should add some variables. Should I add all variables present in my model? In my problem I only have IloInterval variables, most of them being absent. Or should I only add those variables which are present in the heuristic solution?
2. In case I have to add all variables present in the model, should I iterate over *all* of them and set their values? E.g. set for each interval variable whether they are absent or present, and set their ranges? Or does it suffice to set the interval variables present in my heuristic solution?
3. How to set sequence variables? There does not seem to be a way to add a sequence variable to an IloSolution?
4. Some variables are implied by others. E.g. a==b+c. Does it suffice to set b and c, or should I also set a?
5. How can I see whether the provided initial solution is actually being recognized as a correct, feasible initial solution?