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

How to use MIPGap in JuMP

回答済み

コメント

2件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Eli Towle
    • Gurobi Staff

    You can set the MIPGap parameter with the set_optimizer_attribute function:

    model = Model(Gurobi.Optimizer)
    set_optimizer_attribute(model, "MIPGap", 0.01)

    Use the set_optimizer_attributes function to set multiple parameters at once:

    set_optimizer_attributes(model, "MIPGap" => 0.01, "MIPFocus" => 1)

    You can also set parameters inside of the \( \texttt{Model} \) constructor with the optimizer_with_attributes function:

    model = Model(
        optimizer_with_attributes(
            Gurobi.Optimizer, "MIPGap" => 0.01, "MIPFocus" => 1
        )
    )
    0

投稿コメントは受け付けていません。