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

Difference in relative gap calculation

回答済み

コメント

3件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Eli Towle
    • Gurobi Staff

    The output "MIP Solution", "Final Solve", etc. comes from GAMS, not Gurobi. Gurobi and GAMS use different formulas to calculate the relative MIP gap.

    Gurobi calculates the relative MIP gap as

    $$\begin{align}\textrm{gap} = \frac{|z_P - z_D|}{|z_P|},\end{align}$$

    where \(z_P\) is the primal objective bound and \(z_D\) is the dual objective bound. In contrast, GAMS calculates the relative MIP gap as

    $$\begin{align}\textrm{gap} = \frac{|z_P - z_D|}{\max\{|z_P|, |z_D|\}}.\end{align}$$

    1
  • Kathy Wang
    • Gurobi-versary
    • First Comment
    • First Question

    Oh, that makes sense. Thank you so much!

    0

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