How can I inherit branching tree from previous optimization after adding continuous variables
AnsweredHi,
I have a binary MIP model to be solved through Gurobi's BB-tree. However, I will constantly add continuous variables x_c^(k) and new constraints Ax_c^(k) <= b^(k) into the model. During the process, the binary variables x_b will be given at the beginning and will not have new binary variables. Finally, the continuous variable will be x_c^(k), k = 1,2,....,N and the corresponding constraints are Ax_c^(k) <= b^(k), k = 1,2,....,N.
My final target is to minimize a function which only depends on the binary variables x_b.
The specific property of my model is that, if a solution (x_b) is infeasible after adding x_c^(k) and Ax_c^(k) <= b^(k), k = 1,2,....,m, then I know for sure that such a solution is infeasible when new continuous variables and constraints are added.
For each newly added variables and constraints, I need to solve the model and find the optimal x_b once. From my understanding, if I can inherit the B&B tree from previous optimization process, the information about which nodes should be pruned can also be inherited.
Is there any way to achieve this goal for acceleration? Thanks.
-
Hi Yudi,
As long as you do not call the model.reset() method before adding the new variables and constraints, the next call to the model.optimize() method will have access to all the information that affected the solution process such as branching priorities, MIP starts from the previous call to the model.optimize() call.
Please be aware that depending on the model modifications done, the extent the previous history speeds the next optimization process varies. For example, if adding the new variables and the new constraints makes the previous optimal solution infeasible, Gurobi will discard the current optimal solution and will try to find a new incumbent feasible for the modified search space.
0
Please sign in to leave a comment.
Comments
1 comment