メインコンテンツへスキップ

Omit Variable in Branch and Bound

回答済み

コメント

2件のコメント

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    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
  • Robert Fourer
    • Gurobi-versary
    • Collaborator

    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

サインインしてコメントを残してください。