Omit Variable in Branch and Bound
回答済みIf I have a model with two integer variables:
Y_i: integer time to schedule activity i
X_it: binary indicator if activity i is scheduled in time t
How can I communicate to Gurobi (preferably in the context of AMPL) that I would only like to branch and bound on Y_i? I would like to make sure X_it is never branched or bounded on.
0
-
You can set the BranchPriority attribute to make Gurobi branch more often on specific variables. Note that it is not possible to completely turn off branching for a variable. This is to ensure finite convergence of the algorithm.
I don't know whether it is possible to directly set this variable attribute in AMPL. Maybe you are able to write an ATTR file and read it into the Gurobi model in AMPL.
Best regards,
Jaromił1 -
Use AMPL's \(\texttt{.priority}\) suffix to set priorities of variables for Gurobi. For example:
suffix priority IN;
let {i in ACTIVITIES} Y[i].priority := 100;
let {i in ACTIVITIES, t in 1..T} X[i,t].priority := T - t;Variables not explicitly assigned a \(\texttt{.priority}\) value will have a priority of 0 by default.
1
サインインしてコメントを残してください。
コメント
2件のコメント