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

Why are the dual prices different for the same Gurobi LP model?

回答済み

コメント

4件のコメント

  • 正式なコメント
    Simranjit Kaur
    • Gurobi Staff 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 Gurobi Staff

    Hi SJ,

    This is the result of degeneracy (caused by the upper bounds of x and y). While these two programs produce the same feasible solution, the optimal bases are different for each of the solutions. You can verify this by checking the VBasis variable attributes and CBasis constraint attributes. Shadow prices can differ for different bases corresponding to the same feasible solution.

    Does this help? Thanks!

    Eli

    1
  • S J
    • Gurobi-versary
    • First Comment
    • First Question

    @Eli Towle

    Hi Eli, thanks for your answer.

     

    Still have a very beginner question...

    In dual program, [100] does not seem to be feasible.  Is [100] a *correct* shadow price of optimal solution?

    0
  • Thomas Opfer
    • Gurobi-versary
    • Thought Leader

    Let's w.l.o.g. rewrite your problem to the following standard form:

    min 100 x + y
    s.t.
    x + y >= 1
    - x >= - 1
    - y >= - 1
    x, y >= 0

    Then the dual problem is:

    max d1 - d2 - d3
    s.t.
    d1 - d2 <= 100
    d1 - d3 <= 1
    d1, d2, d3 >= 0

    For this dual, ( d1 = 1, d2 = 0, d3 = 0 ) and ( d1 = 100, d2 = 0, d3 = 99 ) produce the same optimal value (= 1).

    Of course, one could define the signs in the dual a little different, but the result is the same.

    So 100 is a perfectly correct shadow price for the constaint x + y >= 1.

    Best regards,
    Thomas

    2

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