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

Difference in relative gap calculation

回答済み

コメント

2件のコメント

  • 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

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