title: pulp shadow price difference with gurobi
body: <p>I am comparing the values for shadow price (pi) calculated with gurobi and pulp. I get different values for the same input and I am not sure how to do it with pulp. Here is the lp file that I use:</p>
  
  <pre><code>Minimize
    x[0] + x[1] + x[2] + x[3]
  Subject To
    C[0]: 7 x[0] &gt;= 211
    C[1]: 3 x[1] &gt;= 395
    C[2]: 2 x[2] &gt;= 610
    C[3]: 2 x[3] &gt;= 97
  Bounds
  End 
  </code></pre>
  
  <p>For the above lp file, gurobi gives me shadow prices:</p>
  
  <pre><code>[0.14285714285714285, 0.3333333333333333, 0.5, 0.5]
  </code></pre>
  
  <p>and with pulp I get:</p>
  
  <pre><code>[0.14285714, 0.33333333, 0.5, 0.5]
  </code></pre>
  
  <p>But If I execute the following lp model:</p>
  
  <pre><code>Minimize
    x[0] + x[1] + x[2] + x[3] + x[4]
  Subject To
   C[0]: 7 x[0] + 2 x[4] &gt;= 211
   C[1]: 3 x[1] &gt;= 395
   C[2]: 2 x[2] + 2 x[4] &gt;= 610
   C[3]: 2 x[3] &gt;= 97
  Bounds
  End
  </code></pre>
  
  <p>With gurobi I get:</p>
  
  <pre><code>[0.0, 0.3333333333333333, 0.5, 0.5]
  </code></pre>
  
  <p>and with pulp I get:</p>
  
  <pre><code>[0.14285714, 0.33333333, 0.5, 0.5]
  </code></pre>
  
  <p>The correct value is the one that gurobi returns (I think ?). </p>
  
  <p>Why I get the same shadow prices with pulp for different models ? How I can get the same results as gurobi ?</p>
  
  <p>(I did not supply the source code because the question will be too long, I think the lp models are enough)</p>